Google

JBoss API: Class ContainerFactory

org.jboss.ejb
Class ContainerFactory

java.lang.Object
  |
  +--javax.management.NotificationBroadcasterSupport
        |
        +--org.jboss.util.ServiceMBeanSupport
              |
              +--org.jboss.ejb.ContainerFactory
All Implemented Interfaces:
ContainerFactoryMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, Service, ServiceMBean

public class ContainerFactory
extends ServiceMBeanSupport
implements ContainerFactoryMBean

A ContainerFactory is used to deploy EJB applications. It can be given a URL to an EJB-jar or EJB-JAR XML file, which will be used to instantiate containers and make them available for invocation. Now also works with message driven beans

Version:
$Revision: 1.77.2.11 $
Author:
Rickard Öberg (rickard.oberg@telkel.com), Marc Fleury, Juha Lindfors, Sebastien Alborini, Peter Antman (peter.antman@tim.se), Scott Stark(Scott.Stark@jboss.org)
See Also:
Container

Field Summary
static int ANY
           
static int BMT
           
static int CMT
           
static java.lang.String DEFAULT_ENTITY_BMP_CONFIGURATION
           
static java.lang.String DEFAULT_ENTITY_CMP_CONFIGURATION
           
static java.lang.String DEFAULT_MESSAGEDRIVEN_CONFIGURATION
           
static java.lang.String DEFAULT_STATEFUL_CONFIGURATION
           
static java.lang.String DEFAULT_STATELESS_CONFIGURATION
           
 
Fields inherited from class org.jboss.util.ServiceMBeanSupport
log, server
 
Fields inherited from interface org.jboss.ejb.ContainerFactoryMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.util.ServiceMBean
STARTED, STARTING, states, STOPPED, STOPPING
 
Constructor Summary
ContainerFactory()
           
 
Method Summary
 void deploy(java.lang.String url, java.lang.String appId)
          Deploy the file at this URL.
 void deploy(java.lang.String appUrl, java.lang.String[] jarUrls, java.lang.String appId)
          Deploy an application
 void deploy(java.net.URL url, java.lang.String appId)
          Deploy EJBs pointed to by an URL.
 void deploy(java.net.URL appUrl, java.net.URL[] jarUrls, java.lang.String appId)
           
 void destroyService()
          Implements the template method in superclass.
 java.util.Iterator getDeployedApplications()
          Returns the deployed applications.
 java.lang.String getName()
          Implements the abstract getName() method in superclass to return the name of this object.
 javax.management.ObjectName getObjectName(javax.management.MBeanServer server, javax.management.ObjectName name)
          Implements the abstract getObjectName() method in superclass to return this service's name.
 boolean getValidateDTDs()
          Get the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.
 boolean getVerifierVerbose()
          Returns the state of the bean verifier (verbose/non-verbose mode)
 boolean getVerifyDeployments()
          Returns the state of bean verifier (on/off)
 boolean isDeployed(java.lang.String url)
          is the aplication with this url deployed
 boolean isDeployed(java.net.URL url)
          check if the application with this url is deployed
 boolean isMetricsEnabled()
          Checks if this container factory initializes the metrics interceptor.
 void setBeanCacheJMSMonitoringEnabled(boolean enable)
          Set JMS monitoring of the bean cache.
 void setMetricsEnabled(boolean enable)
          Enables/disables the metrics interceptor for containers.
 void setValidateDTDs(boolean validate)
          Set the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.
 void setVerifierVerbose(boolean verbose)
          Enables/disables the verbose mode on the verifier.
 void setVerifyDeployments(boolean verify)
          Enables/disables the application bean verification upon deployment.
 void stopService()
          Implements the template method in superclass.
 void undeploy(java.lang.String url)
          Undeploy the file at this URL.
 void undeploy(java.net.URL url)
          Remove previously deployed EJBs.
 
Methods inherited from class org.jboss.util.ServiceMBeanSupport
destroy, getServer, getState, getStateString, init, initService, nextSequenceNumber, postDeregister, postRegister, preDeregister, preRegister, start, startService, stop
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.util.ServiceMBean
getState, getStateString
 
Methods inherited from interface org.jboss.util.Service
destroy, init, start, stop
 

Field Detail

DEFAULT_STATELESS_CONFIGURATION

public static java.lang.String DEFAULT_STATELESS_CONFIGURATION

DEFAULT_STATEFUL_CONFIGURATION

public static java.lang.String DEFAULT_STATEFUL_CONFIGURATION

DEFAULT_ENTITY_BMP_CONFIGURATION

public static java.lang.String DEFAULT_ENTITY_BMP_CONFIGURATION

DEFAULT_ENTITY_CMP_CONFIGURATION

public static java.lang.String DEFAULT_ENTITY_CMP_CONFIGURATION

DEFAULT_MESSAGEDRIVEN_CONFIGURATION

public static java.lang.String DEFAULT_MESSAGEDRIVEN_CONFIGURATION

BMT

public static final int BMT

CMT

public static final int CMT

ANY

public static final int ANY
Constructor Detail

ContainerFactory

public ContainerFactory()
Method Detail

getDeployedApplications

public java.util.Iterator getDeployedApplications()
Returns the deployed applications.
Specified by:
getDeployedApplications in interface ContainerFactoryMBean

getObjectName

public javax.management.ObjectName getObjectName(javax.management.MBeanServer server,
                                                 javax.management.ObjectName name)
                                          throws javax.management.MalformedObjectNameException
Implements the abstract getObjectName() method in superclass to return this service's name.
Overrides:
getObjectName in class ServiceMBeanSupport
Parameters:
server -  
name -  
Returns:
 
Throws:
MalformedObjectNameException -  

getName

public java.lang.String getName()
Implements the abstract getName() method in superclass to return the name of this object.
Specified by:
getName in interface ServiceMBean
Overrides:
getName in class ServiceMBeanSupport
Returns:
'Container factory'

stopService

public void stopService()
Implements the template method in superclass. This method stops all the applications in this server.
Overrides:
stopService in class ServiceMBeanSupport

destroyService

public void destroyService()
Implements the template method in superclass. This method destroys all the applications in this server and clears the deployments list.
Overrides:
destroyService in class ServiceMBeanSupport

setVerifyDeployments

public void setVerifyDeployments(boolean verify)
Enables/disables the application bean verification upon deployment.
Specified by:
setVerifyDeployments in interface ContainerFactoryMBean
Parameters:
verify - true to enable; false to disable

getVerifyDeployments

public boolean getVerifyDeployments()
Returns the state of bean verifier (on/off)
Specified by:
getVerifyDeployments in interface ContainerFactoryMBean
Returns:
true if enabled; false otherwise

setVerifierVerbose

public void setVerifierVerbose(boolean verbose)
Enables/disables the verbose mode on the verifier.
Specified by:
setVerifierVerbose in interface ContainerFactoryMBean
Parameters:
verbose - true to enable; false to disable

getVerifierVerbose

public boolean getVerifierVerbose()
Returns the state of the bean verifier (verbose/non-verbose mode)
Specified by:
getVerifierVerbose in interface ContainerFactoryMBean
Returns:
true if enabled; false otherwise

setMetricsEnabled

public void setMetricsEnabled(boolean enable)
Enables/disables the metrics interceptor for containers.
Specified by:
setMetricsEnabled in interface ContainerFactoryMBean
Parameters:
enable - true to enable; false to disable

isMetricsEnabled

public boolean isMetricsEnabled()
Checks if this container factory initializes the metrics interceptor.
Specified by:
isMetricsEnabled in interface ContainerFactoryMBean
Returns:
true if metrics are enabled; false otherwise

setBeanCacheJMSMonitoringEnabled

public void setBeanCacheJMSMonitoringEnabled(boolean enable)
Set JMS monitoring of the bean cache.
Specified by:
setBeanCacheJMSMonitoringEnabled in interface ContainerFactoryMBean

getValidateDTDs

public boolean getValidateDTDs()
Get the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.
Specified by:
getValidateDTDs in interface ContainerFactoryMBean

setValidateDTDs

public void setValidateDTDs(boolean validate)
Set the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.
Specified by:
setValidateDTDs in interface ContainerFactoryMBean

deploy

public void deploy(java.lang.String url,
                   java.lang.String appId)
            throws java.net.MalformedURLException,
                   DeploymentException
Deploy the file at this URL. This method is typically called from remote administration tools that cannot handle java.net.URL's as parameters to methods
Specified by:
deploy in interface ContainerFactoryMBean
Parameters:
url -  
Throws:
java.net.MalformedURLException -  
DeploymentException -  

deploy

public void deploy(java.lang.String appUrl,
                   java.lang.String[] jarUrls,
                   java.lang.String appId)
            throws java.net.MalformedURLException,
                   DeploymentException
Description copied from interface: ContainerFactoryMBean
Deploy an application
Specified by:
deploy in interface ContainerFactoryMBean
Following copied from interface: org.jboss.ejb.ContainerFactoryMBean
Parameters:
appUrl - Url to the application itself
jarUrls - Array of URLs to the JAR files containing the EJBs
appId - Id of the application this EJBs belongs to used for management
Throws:
java.net.MalformedURLException -  
DeploymentException -  

undeploy

public void undeploy(java.lang.String url)
              throws java.net.MalformedURLException,
                     DeploymentException
Undeploy the file at this URL. This method is typically called from remote administration tools that cannot handle java.net.URL's as parameters to methods
Specified by:
undeploy in interface ContainerFactoryMBean
Parameters:
url -  
Throws:
java.net.MalformedURLException -  
DeploymentException -  

deploy

public void deploy(java.net.URL url,
                   java.lang.String appId)
            throws DeploymentException
Deploy EJBs pointed to by an URL. The URL may point to an EJB-JAR, an EAR-JAR, or an codebase whose structure resembles that of an EJB-JAR.

The latter is useful for development since no packaging is required.

Parameters:
url - URL where EJB deployment information is contained
Throws:
DeploymentException -  

deploy

public void deploy(java.net.URL appUrl,
                   java.net.URL[] jarUrls,
                   java.lang.String appId)
            throws DeploymentException

undeploy

public void undeploy(java.net.URL url)
              throws DeploymentException
Remove previously deployed EJBs.
Parameters:
url -  
Throws:
DeploymentException -  

isDeployed

public boolean isDeployed(java.lang.String url)
                   throws java.net.MalformedURLException
is the aplication with this url deployed
Specified by:
isDeployed in interface ContainerFactoryMBean
Parameters:
url -  
Throws:
java.net.MalformedURLException -  

isDeployed

public boolean isDeployed(java.net.URL url)
check if the application with this url is deployed
Parameters:
url -  
Returns:
true if deployed


Copyright © 2000 The JBoss Organization. All Rights Reserved.