public abstract class MBeanFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
MBeanFactory.MBeanFactorySingleton |
Constructor and Description |
---|
MBeanFactory() |
Modifier and Type | Method and Description |
---|---|
abstract void |
cleanupMBeans(DomainMBean domain,
ApplicationMBean application)
This method is the reverse of 'initializeMBeans(ApplicationMBean)'
in that it cleans up the application and related component mbeans for
a deployment, if present.
|
static MBeanFactory |
getMBeanFactory()
Returns the singleton MBeanFactory object
|
abstract ApplicationMBean |
initializeMBeans(DomainMBean domain,
java.io.File deploymentPath,
java.lang.String name,
java.lang.String altAppURI,
java.lang.String altWebAppURI,
AppDeploymentMBean mbean)
This method is similar to 'initializeDeployment(ApplicationMBean)'
It can be passed the absolute file path and the deployment name.
|
abstract void |
reconcileMBeans(AppDeploymentMBean appDepMBean,
java.io.File appPath)
This checks the descriptors for
any new modules, app scoped pools and creates mbeans for them.
|
public static MBeanFactory getMBeanFactory()
public abstract ApplicationMBean initializeMBeans(DomainMBean domain, java.io.File deploymentPath, java.lang.String name, java.lang.String altAppURI, java.lang.String altWebAppURI, AppDeploymentMBean mbean) throws ApplicationException
If the deployment path points to an .ear file or an exploded .ear, it behaves exactly as 'initializeDeployment(ApplicationMBean)' and returns an ApplicationMBean, representing the structure of the enterprise application.
If the path points to a Java EE module (.war, .jar, .rar), in archived or exploded form, it wraps the component within an application mbean after creating the required component and application mbean. It sets ComponentMBean.URI and ApplicationMBean.Path . The application mbean returned can be used for deploying that component.
Exploded deployments
If the path provided for deployment is not an archive it must be either an exploded enterprise application i.e. have a valid 'deploymentPath/META-INF/application.xml' OR a directory which contains an archived module e.g. 'deploymentPath/myejb.jar' OR a dir which contains a module descriptor e.g. 'deploymentPath/WEB-INF/wapp.war' OR a dir which contains a dir which contains a module descriptor e.g. 'deploymentPath/ejb1/META-INF/ejb-jar.xml'. The above formats are the only formats supported for exploded applications and modules. Note that archived modules within an exploded application must be in the dir specified by the path for the exploded application. Only exploded modules can be 1 level "deeper" to prevent sharing META-INF or WEB-INF directories between different modules of the same type.For example: If the path is '/usr/apps/myapp.war', this method would set ComponentMBean.URI to 'myapp.war'. AppMBean.Path would also be '/usr/apps'. The same convention needs to be followed when creating a wrapped application directly in config.xml.
deploymentPath
- local path to the application on our servername
- of the ApplicationMBean to createaltAppURI
- alternate application.xmlaltWebAppURI
- alternate web.xmlmbean
- If this is non-null, the factory uses compatibility names
to name ComponentMBean. This is used for creating ApplicationMBeans from
AppDeploymentMBeans, where the latter was created as a result of
migration of an 8.1 config.xmlApplicationException
java.lang.IllegalArgumentException
- If no valid deployment is found at
the path provided.ApplicationException
public abstract void reconcileMBeans(AppDeploymentMBean appDepMBean, java.io.File appPath) throws java.io.FileNotFoundException, ApplicationException
The 'Targets' attribute of components is not affected by this method.
application
- An AppDeployment MBean with a valid 'Path'
attribute.appPath
- Path to the application on local server.ApplicationException
java.io.FileNotFoundException
- If there is no file or directory as
indicated by the application.getPath() or if the deployment
descriptors are not found.ApplicationException
public abstract void cleanupMBeans(DomainMBean domain, ApplicationMBean application)
application
- The application to clean up and remove.