|
Oracle Fusion Middleware Java API Reference for Oracle Complex Event Processing 11g Release 1 (11.1.1.4.0) E14303-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This MBean will manage the deployment of a deployable application in the Weblogic Event Server or in a cluster of WebLogic Event Servers.
In a non-clustered environment, a Weblogic Event Server domain contains a single Event Server instance. In a clustered environment, a Weblogic Event Server domain contains groups of servers. A group represents a collection of homogeneous Weblogic Event Server instances. The application name is unique within a domain. Likewise, the group name is unique withing a domain.
This Mbean also manages the following lifecycle of a deployable application:
An example of using this MBean to manage the life cycle of a deployed application is given below
//get the remote JMX service URL assuming RMI protocol and the listening RMI port is 1099 JMXServiceURL url = new JMXServiceURL("rmi", "localhost",1099, "/jndi/rmi://localhost:" + 1099 + "/jmxrmi"); //get a remote JMX connector JMXConnector jmxc = JMXConnectorFactory.connect(url,null); //get the MBean server connection MBeanServerConnection mbsc = jmxc.getMBeanServerConnection(); //get the AppDeployment MBean name as registered in the MBean server ObjectName deploymentName = ObjectName.getInstance("com.bea.wlevs:Domain=" + domainName + ",Name=AppDeployment,Type=AppDeployment"); //look up the AppDeployment MBean AppDeploymentMBean deploymentMBean = (AppDeploymentMBean) MBeanServerInvocationHandler.newProxyInstance( mbsc, deploymentName, AppDeploymentMBean.class, true); //deploy System.out.println("\n\t Deploying application - helloworld"); deploymentMBean.deployApplication("helloworld", new File("com.bea.wlevs.example.helloworld_3.0.0.0.jar")); //get the list of applications deployed in the server Collection<String> deployments = deploymentMBean.listDeployedApplications(); for(String s : deployments) { System.out.println("\n\t Deployed Application " + s); } //suspend the application Thread.sleep(10000); System.out.println("\n\tSuspend application helloworld"); deploymentMBean.suspend("helloworld"); //resume the application Thread.sleep(10000); System.out.println("\n\tResume application helloworld"); deploymentMBean.resume("helloworld"); //undeploy Thread.sleep(10000); System.out.println("\n\tUndeploying application helloworld"); deploymentMBean.undeployApplication("helloworld"); //close the MBean remote connection jmxc.close();
Field Summary | |
static java.lang.String |
MBEAN_TYPE This MBean is registered using the following MBEAN_TYPE. |
Method Summary | |
void |
deployApplication(java.lang.String applicationName, byte[] contentsOfJarFile) This method will deploy a serialized byte array to the Weblogic Event Server. |
void |
deployApplication(java.lang.String applicationName, java.io.File jarFile) This method will deploy the jar file in the Weblogic Event Server. |
void |
deployApplication(java.lang.String groupName, java.lang.String applicationName, byte[] contentsOfJarFile) This method will deploy a serialized byte array as a clustered application in a group of WebLogic Event Servers. |
void |
deployApplication(java.lang.String groupName, java.lang.String applicationName, java.io.File jarFile) This method will deploy the jar file as a clustered application in a group of WebLogic Event Servers. |
java.lang.String |
getExtLibraryState(java.lang.String bundleName) This method returns a string state of the installed library extension bundle. |
java.lang.String |
getLibraryState(java.lang.String bundleName) This method returns a string state of the installed library bundle. |
java.lang.String |
getState(java.lang.String applicationName) This method gets the deployment state of an application. |
java.util.Collection |
listDeployedApplications() This method returns a java.util.Collection of application names which has been deployed in this Weblogic Event Server instance. |
java.util.Collection |
listDeployedExtLibraries() This method returns a java.util.Collection of library extension bundle name which has been deployed in this Weblogic Event Server instance from library extension directory. |
java.util.Collection |
listDeployedLibraries() This method returns a java.util.Collection of library bundle name which has been deployed in this Weblogic Event Server instance from library directory. |
void |
resume(java.lang.String applicationName) This method resumes a deployed application. |
void |
suspend(java.lang.String applicationName) This method suspends a deployed application. |
void |
undeployApplication(java.lang.String applicationName) This method will undeploy an application named applicationName If application is clustered, then it will undeploy application from all servers where it has been deployed. |
void |
updateDeployedApplication(java.lang.String applicationName) This method will update a deployed application in the Weblogic Event Server. |
void |
updateDeployedApplication(java.lang.String applicationName, byte[] contentsOfJarFile) This method will update a deployed appliction in the Weblogic Event Server. |
void |
updateDeployedApplication(java.lang.String applicationName, java.io.File jarFile) This method will update a deployed application in the Weblogic Event Server. |
Methods inherited from interface com.bea.wlevs.management.WebLogicMBean |
getName, getObjectName, getType |
Methods inherited from interface javax.management.NotificationEmitter |
removeNotificationListener |
Methods inherited from interface javax.management.NotificationBroadcaster |
addNotificationListener, getNotificationInfo, removeNotificationListener |
Field Detail |
public static final java.lang.String MBEAN_TYPE
Method Detail |
public void deployApplication(java.lang.String applicationName, java.io.File jarFile) throws javax.management.MBeanException, javax.management.OperationsException, javax.management.RuntimeOperationsException
applicationName
- - String name of the application for the deployed jar filejarFile
- - File application jar filepublic void deployApplication(java.lang.String groupName, java.lang.String applicationName, java.io.File jarFile) throws javax.management.MBeanException, javax.management.OperationsException, javax.management.RuntimeOperationsException
IllegalArgumentException
, wrapped in RuntimeOperationsException
is raised. This server does not need to be a member of the target group, however this server and the target group must be part of the same domain.groupName
- - String name of the groupapplicationName
- jarFile
- public void deployApplication(java.lang.String applicationName, byte[] contentsOfJarFile) throws javax.management.MBeanException, javax.management.OperationsException, javax.management.RuntimeOperationsException
applicationName
- - String name of the application for the deployed jar file as serialized bytescontentsOfJarFile
- - byte[] byte array representing a jar file to be deployedpublic void deployApplication(java.lang.String groupName, java.lang.String applicationName, byte[] contentsOfJarFile) throws javax.management.MBeanException, javax.management.OperationsException, javax.management.RuntimeOperationsException
IllegalArgumentException
, wrapped in RuntimeOperationsException
is raised. This server does not need to be a member of the target group, however this server and the target group must be part of the same domain.groupName
- - String name of the groupapplicationName
- - String name of the application for the deployed jar file as serialized bytescontentsOfJarFile
- - byte[] byte array representing a jar file to be deployedpublic void undeployApplication(java.lang.String applicationName) throws javax.management.MBeanException, javax.management.OperationsException, javax.management.RuntimeOperationsException
applicationName
If application is clustered, then it will undeploy application from all servers where it has been deployed. If any server containing application is not available, then the application will be undeployed when server becomes available again.applicationName
- - String name of the application to undeploypublic void updateDeployedApplication(java.lang.String applicationName) throws javax.management.MBeanException, javax.management.OperationsException, javax.management.RuntimeOperationsException
applicationName
- - String name of the application to updatepublic void updateDeployedApplication(java.lang.String applicationName, java.io.File jarFile) throws javax.management.MBeanException, javax.management.OperationsException, javax.management.RuntimeOperationsException
applicationName
- - String name of the application to updatejarFile
- - File a jarfile representing the appliction to be updatedpublic void updateDeployedApplication(java.lang.String applicationName, byte[] contentsOfJarFile) throws javax.management.MBeanException, javax.management.OperationsException, javax.management.RuntimeOperationsException
applicationName
- - String name of the applicationcontentsOfJarFile
- - byte[] - serialized byte array of a deployable jar filepublic void suspend(java.lang.String applicationName) throws javax.management.RuntimeOperationsException
applicationName
- - the name of the application to updatepublic void resume(java.lang.String applicationName) throws javax.management.RuntimeOperationsException
applicationName
- - the name of the application to updatepublic java.lang.String getState(java.lang.String applicationName) throws javax.management.RuntimeOperationsException
applicationName
- - the name of the application to updatepublic java.util.Collection listDeployedApplications() throws javax.management.JMException
java.util.Collection
of application names which has been deployed in this Weblogic Event Server instance. This java.util.Collection
does not include other applications that may have been deployed to other servers through this MBean.public java.util.Collection listDeployedLibraries() throws javax.management.JMException
java.util.Collection
of library bundle name which has been deployed in this Weblogic Event Server instance from library directory. This java.util.Collection
does not include the libraries installed through library extension directory.public java.lang.String getLibraryState(java.lang.String bundleName) throws javax.management.RuntimeOperationsException
bundleName
- - the name of the bundle.public java.util.Collection listDeployedExtLibraries() throws javax.management.JMException
java.util.Collection
of library extension bundle name which has been deployed in this Weblogic Event Server instance from library extension directory. This java.util.Collection
does not include the libraries installed through library directory.public java.lang.String getExtLibraryState(java.lang.String bundleName) throws javax.management.RuntimeOperationsException
bundleName
- - the name of the bundle.
|
Copyright © 2007, 2011 Oracle and/or its affiliates. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |