Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Complex Event Processing
11g Release 1 (11.1.1.4.0)

E14303-04
FRAMES    NO FRAMES
DETAIL:  FIELD | CONSTR | METHOD


com.bea.wlevs.deployment.mbean
Interface AppDeploymentMBean

All Known Subinterfaces:
DeploymentServiceMBean

public interface AppDeploymentMBean
extends WebLogicMBean, javax.management.NotificationEmitter

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

MBEAN_TYPE

public static final java.lang.String MBEAN_TYPE
This MBean is registered using the following MBEAN_TYPE.

Method Detail

deployApplication

public void deployApplication(java.lang.String applicationName,
                              java.io.File jarFile)
                       throws javax.management.MBeanException,
                              javax.management.OperationsException,
                              javax.management.RuntimeOperationsException
This method will deploy the jar file in the Weblogic Event Server. The application is guaranteed to have been installed when this method returns successfully. The deployment is scoped to this server only, and not scoped to any other groups that this server may be member of in the case of a clustered domain.
Parameters:
applicationName - - String name of the application for the deployed jar file
jarFile - - File application jar file
Throws:
javax.management.MBeanException - wrapping IOException - if jarFile is corrupt or cannot be written to disk
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application with the same name already exists
javax.management.OperationsException - - if operations fails for some other unspecied reason

deployApplication

public void deployApplication(java.lang.String groupName,
                              java.lang.String applicationName,
                              java.io.File jarFile)
                       throws javax.management.MBeanException,
                              javax.management.OperationsException,
                              javax.management.RuntimeOperationsException
This method will deploy the jar file as a clustered application in a group of WebLogic Event Servers. The group must exist, otherwise 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.
Parameters:
groupName - - String name of the group
applicationName -  
jarFile -  
Throws:
javax.management.MBeanException - wrapping IOException - if jarFile is corrupt or cannot be written to disk
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application with the same name already exists, or group does not exist
javax.management.OperationsException - - if operations fails for some other unspecied reason

deployApplication

public void deployApplication(java.lang.String applicationName,
                              byte[] contentsOfJarFile)
                       throws javax.management.MBeanException,
                              javax.management.OperationsException,
                              javax.management.RuntimeOperationsException
This method will deploy a serialized byte array to the Weblogic Event Server.
Parameters:
applicationName - - String name of the application for the deployed jar file as serialized bytes
contentsOfJarFile - - byte[] byte array representing a jar file to be deployed
Throws:
javax.management.MBeanException - wrapping IOException - if byte array is corrupt or cannot be written to disk
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application with the same name already exists, or group does not exist
javax.management.OperationsException - - if operations fails for some other unspecied reason

deployApplication

public void deployApplication(java.lang.String groupName,
                              java.lang.String applicationName,
                              byte[] contentsOfJarFile)
                       throws javax.management.MBeanException,
                              javax.management.OperationsException,
                              javax.management.RuntimeOperationsException
This method will deploy a serialized byte array as a clustered application in a group of WebLogic Event Servers. The group must exist, otherwise 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.
Parameters:
groupName - - String name of the group
applicationName - - String name of the application for the deployed jar file as serialized bytes
contentsOfJarFile - - byte[] byte array representing a jar file to be deployed
Throws:
javax.management.MBeanException - wrapping IOException - if byte array is corrupt or cannot be written to disk
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application with the same name already exists, or group does not exist
javax.management.OperationsException - - if operations fails for some other unspecied reason

undeployApplication

public void undeployApplication(java.lang.String applicationName)
                         throws javax.management.MBeanException,
                                javax.management.OperationsException,
                                javax.management.RuntimeOperationsException
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. If any server containing application is not available, then the application will be undeployed when server becomes available again.
Parameters:
applicationName - - String name of the application to undeploy
Throws:
javax.management.MBeanException - wrapping IOException - if the state of the undeployed application could not be updated to disk
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application does not exist
javax.management.OperationsException - - if operations fails for some other unspecied reason

updateDeployedApplication

public void updateDeployedApplication(java.lang.String applicationName)
                               throws javax.management.MBeanException,
                                      javax.management.OperationsException,
                                      javax.management.RuntimeOperationsException
This method will update a deployed application in the Weblogic Event Server. If application is clustered, then it will update application in all servers where it has been deployed. If any server containing application is not available, then the application will be updated when server becomes available again.
Parameters:
applicationName - - String name of the application to update
Throws:
javax.management.MBeanException - wrapping IOException - if jarFile content is corrupt or cannot be written to disk
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application does not exist
javax.management.OperationsException - - if operations fails for some other unspecied reason

updateDeployedApplication

public void updateDeployedApplication(java.lang.String applicationName,
                                      java.io.File jarFile)
                               throws javax.management.MBeanException,
                                      javax.management.OperationsException,
                                      javax.management.RuntimeOperationsException
This method will update a deployed application in the Weblogic Event Server. If application is clustered, then it will update application in all servers where it has been deployed. If any server containing application is not available, then the application will be updated when server becomes available again.
Parameters:
applicationName - - String name of the application to update
jarFile - - File a jarfile representing the appliction to be updated
Throws:
javax.management.MBeanException - wrapping IOException - if jarFile content is corrupt or cannot be written to disk
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application does not exist
javax.management.OperationsException - - if operations fails for some other unspecied reason

updateDeployedApplication

public void updateDeployedApplication(java.lang.String applicationName,
                                      byte[] contentsOfJarFile)
                               throws javax.management.MBeanException,
                                      javax.management.OperationsException,
                                      javax.management.RuntimeOperationsException
This method will update a deployed appliction in the Weblogic Event Server. If application is clustered, then it will update application in all servers where it has been deployed. If any server containing application is not available, then the application will be updated when server becomes available again.
Parameters:
applicationName - - String name of the application
contentsOfJarFile - - byte[] - serialized byte array of a deployable jar file
Throws:
javax.management.MBeanException - wrapping IOException - if byte array is corrupt or cannot be written to disk
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application does not exist
javax.management.OperationsException - - if operations fails for some other unspecied reason

suspend

public void suspend(java.lang.String applicationName)
             throws javax.management.RuntimeOperationsException
This method suspends a deployed application. If application is clustered, then it will suspend application in all servers where it has been deployed. If any server containing application is not available, then the application will be suspended when server becomes available again.
Parameters:
applicationName - - the name of the application to update
Throws:
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application does not exist

resume

public void resume(java.lang.String applicationName)
            throws javax.management.RuntimeOperationsException
This method resumes a deployed application. If application is clustered, then it will resume application in all servers where it has been deployed. If any server containing application is not available, then the application will be resumed when server becomes available again.
Parameters:
applicationName - - the name of the application to update
Throws:
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application does not exist

getState

public java.lang.String getState(java.lang.String applicationName)
                          throws javax.management.RuntimeOperationsException
This method gets the deployment state of an application. Legal values are RESOLVED, STARTING, INITIALIZING, RUNNING, SUSPENDED, STOPPING and FAILED.
Parameters:
applicationName - - the name of the application to update
Returns:
the application state
Throws:
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application does not exist

listDeployedApplications

public java.util.Collection listDeployedApplications()
                                              throws javax.management.JMException
This method returns a 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.
Returns:
- Collection collection of application names deployed in this WebLogic Event Server instance.
Throws:
javax.management.JMException -  

listDeployedLibraries

public java.util.Collection listDeployedLibraries()
                                           throws javax.management.JMException
This method returns a 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.
Returns:
- Collection collection of bundle names deployed in this WebLogic Event Server instance.
Throws:
javax.management.JMException -  

getLibraryState

public java.lang.String getLibraryState(java.lang.String bundleName)
                                 throws javax.management.RuntimeOperationsException
This method returns a string state of the installed library bundle.
Parameters:
bundleName - - the name of the bundle.
Returns:
- the bundle state.
Throws:
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application does not exist

listDeployedExtLibraries

public java.util.Collection listDeployedExtLibraries()
                                              throws javax.management.JMException
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. This java.util.Collection does not include the libraries installed through library directory.
Returns:
- Collection collection of bundle names deployed in this WebLogic Event Server instance.
Throws:
javax.management.JMException -  

getExtLibraryState

public java.lang.String getExtLibraryState(java.lang.String bundleName)
                                    throws javax.management.RuntimeOperationsException
This method returns a string state of the installed library extension bundle.
Parameters:
bundleName - - the name of the bundle.
Returns:
- the bundle state.
Throws:
javax.management.RuntimeOperationsException - wrapping IllegalArgumentException - if application does not exist

Overview  Package   Class   Use  Tree  Deprecated  Index  Help 
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