FileDocCategorySizeDatePackage
Ejb3Module.javaAPI DocJBoss 4.2.14265Fri Jul 13 20:53:58 BST 2007org.jboss.ejb3

Ejb3Module

public class Ejb3Module extends org.jboss.system.ServiceMBeanSupport implements Ejb3ModuleMBean
An EjbModule represents a collection of beans that are deployed as a unit.
author
Bill Burke
version
$Revision: 60233 $

Fields Summary
public static final String
BASE_EJB3_JMX_NAME
private static final Logger
log
private Ejb3JmxDeployment
deployment
private org.jboss.deployment.DeploymentInfo
di
Constructors Summary
public Ejb3Module(org.jboss.deployment.DeploymentInfo di)


      
    
       DeploymentScope deploymentScope = null;
       if (di.parent != null)
       {
          if (di.parent.shortName.endsWith(".ear") || di.parent.shortName.endsWith(".ear/"))
          {
             synchronized(di.parent.context)
             {
                deploymentScope = (DeploymentScope)di.parent.context.get("EJB3_EAR_METADATA");
                if (deploymentScope == null)
                {
                   deploymentScope = new JmxDeploymentScopeImpl(di.parent.shortName);
                   di.parent.context.put("EJB3_EAR_METADATA", deploymentScope);
                }
             }
          }
       }
       deployment = new Ejb3JmxDeployment(di, deploymentScope);
       if (deploymentScope != null)
       {
          deploymentScope.register(deployment);
       }
       this.di = di;
    
Methods Summary
protected voidcreateService()

      super.createService();
      ClassLoader old = Thread.currentThread().getContextClassLoader();
      try
      {
         Thread.currentThread().setContextClassLoader(di.ucl);
         deployment.create();
      }
      finally
      {
         Thread.currentThread().setContextClassLoader(old);
      }
   
protected voiddestroyService()

      ClassLoader old = Thread.currentThread().getContextClassLoader();
      try
      {
         Thread.currentThread().setContextClassLoader(di.ucl);
         deployment.destroy();
      }
      finally
      {
         Thread.currentThread().setContextClassLoader(old);
      }
      super.destroyService();
   
public ContainergetContainer(javax.management.ObjectName name)

      return deployment.getContainer(name);
   
public java.util.MapgetContainers()

      return deployment.getEjbContainers();
   
protected voidstartService()

      ClassLoader old = Thread.currentThread().getContextClassLoader();
      try
      {
         Thread.currentThread().setContextClassLoader(di.ucl);
         deployment.start();
      }
      finally
      {
         Thread.currentThread().setContextClassLoader(old);
      }
      super.startService();

   
protected voidstopService()

      ClassLoader old = Thread.currentThread().getContextClassLoader();
      try
      {
         Thread.currentThread().setContextClassLoader(di.ucl);
         deployment.stop();
      }
      finally
      {
         Thread.currentThread().setContextClassLoader(old);
      }
      super.stopService();