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