Wie können wir eine Anwendung starten oder stoppen, die auf Weblogic bereitgestellt wird

345
MoHaN K RaJ

Ich möchte eine Anwendung beenden, die vorübergehend auf Weblogic bereitgestellt wird. Das heißt, ich sollte die Anwendung sofort starten können, ohne Weblogic bereitzustellen.

-1

1 Antwort auf die Frage

0
MoHaN K RaJ

Dies erreichen wir durch den Einsatz von Weblogic-MBeans. Nachstehend finden Sie den Code für Ihre Referenz.

appRuntime.stop ();

appRuntime.start ();

 @Override public void stop(String deploymentName) { System.out.println("*** Stopping webapp...");  // The DeploymentManagerMBean is used for the initial deployment of an application. // After the initial deployment, the AppDeploymentRuntimeMBean is used for stop, start, // redeploy, and undeploy of an application.  AppDeploymentRuntimeMBean appRuntime = deploymentManager.lookupAppDeploymentRuntime(deploymentName);  DeploymentProgressObjectMBean progressObj = appRuntime.stop(); printCompletionStatus(progressObj); }  @Override public void start(String deploymentName) { System.out.println("*** Starting webapp...");  // The DeploymentManagerMBean is used for the initial deployment of an application. // After the initial deployment, the AppDeploymentRuntimeMBean is used for stop, start, // redeploy, and undeploy of an application.  AppDeploymentRuntimeMBean appRuntime = deploymentManager.lookupAppDeploymentRuntime(deploymentName);  DeploymentProgressObjectMBean progressObj = appRuntime.start(); printCompletionStatus(progressObj); } 

Der Implementierungsname muss beim Zugriff auf appRuntime als Parameter übergeben werden