[jboss-cvs] JBossAS SVN: r92554 - branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 18 23:55:35 EDT 2009


Author: jason.greene at jboss.com
Date: 2009-08-18 23:55:35 -0400 (Tue, 18 Aug 2009)
New Revision: 92554

Modified:
   branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/deployers/EjbDeployer.java
Log:
Make module name unique


Modified: branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/deployers/EjbDeployer.java
===================================================================
--- branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/deployers/EjbDeployer.java	2009-08-19 03:31:11 UTC (rev 92553)
+++ branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/deployers/EjbDeployer.java	2009-08-19 03:55:35 UTC (rev 92554)
@@ -65,7 +65,7 @@
 /**
  * A real deployer that translates JBossMetaData into ServiceMetaData for
  * the ejb module service mbeans.
- * 
+ *
  * @author Scott.Stark at jboss.org
  * @author adrian at jboss.org
  * @version $Revision$
@@ -81,7 +81,7 @@
    private String ccmServiceName;
    /** The ejb timer service */
    private String timerServiceName;
-   
+
    private boolean callByValue;
 
    private String unauthenticatedIdentity = null;
@@ -100,10 +100,10 @@
    private boolean strictVerifier;
 
    /**
-    * Inject Policy Registration Bean Name 
+    * Inject Policy Registration Bean Name
     */
    private String policyRegistrationName;
-   
+
    /**
     * Create a new EjbDeployer.
     */
@@ -169,7 +169,7 @@
 
    /**
     * Obtain an unauthenticated identity
-    * 
+    *
     * @return the unauthenticated identity
     */
    public String getUnauthenticatedIdentity()
@@ -185,7 +185,7 @@
    {
       this.unauthenticatedIdentity = unauthenticatedIdentity;
    }
-   
+
    public void setDefaultSecurityDomain(String defaultSecurityDomain)
    {
       this.defaultSecurityDomain = defaultSecurityDomain;
@@ -195,11 +195,11 @@
    {
       this.securityManagementName = sm;
    }
-  
+
    public void setSecurityContextClassName(String securityContextClassName)
    {
       this.securityContextClassName = securityContextClassName;
-   } 
+   }
 
    /**
     * Get the PolicyRegistration Name
@@ -222,7 +222,7 @@
    @Override
    public void deploy(VFSDeploymentUnit unit, JBossMetaData deployment)
       throws DeploymentException
-   {      
+   {
       // If it is a deployment with ejbVersion unknown or 3
       if (!deployment.isEJB2x() && !deployment.isEJB1x())
          return; // let EJB3 deployer handle this
@@ -275,7 +275,7 @@
             throw new DeploymentException("Verification of Enterprise Beans failed, see above for error messages.");
          }
       }
-      
+
       ServiceMetaData ejbModule = new ServiceMetaData();
       ejbModule.setCode(EjbModule.class.getName());
 
@@ -322,7 +322,7 @@
       attr.setName("PolicyRegistration");
       ServiceInjectionValueMetaData prInjectionValue = new ServiceInjectionValueMetaData(policyRegistrationName);
       attr.setValue(prInjectionValue);
-      attrs.add(attr); 
+      attrs.add(attr);
       // Add injection of the WebServiceName
       String wsName = getWebServiceName();
       if (wsName != null)
@@ -343,8 +343,8 @@
       tms.setValue(tmsDepends);
       attrs.add(tms);
 
-      ejbModule.setAttributes(attrs); 
-      
+      ejbModule.setAttributes(attrs);
+
       List<ServiceDependencyMetaData> dependencies = new ArrayList<ServiceDependencyMetaData>();
       // CCM for CachedConnectionInterceptor dependency
       // TODO: this should be injected directly to the interceptor
@@ -437,7 +437,7 @@
             ObjectName n = new ObjectName(depend);
             ServiceDependencyMetaData sdmd = new ServiceDependencyMetaData();
             sdmd.setIDependOn(n.toString());
-            dependencies.add(sdmd);         
+            dependencies.add(sdmd);
          }
       }
       catch(MalformedObjectNameException e)
@@ -459,7 +459,7 @@
       //Pass the unauthenticated identity
       if(this.unauthenticatedIdentity != null)
          unit.addAttachment("EJB.unauthenticatedIdentity", this.unauthenticatedIdentity, String.class);
-      //Pass the SecurityContextClassName 
+      //Pass the SecurityContextClassName
       if(this.securityContextClassName != null)
          unit.addAttachment("EJB.securityContextClassName", securityContextClassName, String.class);
       //Pass the Default SecurityDomain
@@ -469,7 +469,7 @@
 
    @Override
    public void undeploy(VFSDeploymentUnit unit, JBossMetaData deployment)
-   { 
+   {
    }
 
    /**
@@ -480,7 +480,7 @@
     * @param unit the deployment unit
     * @param metaData - the ejb jar metaData
     * @return "jboss.j2ee:service=EjbModule,module="+unit.getSimpleName()
-    * @throws MalformedObjectNameException 
+    * @throws MalformedObjectNameException
     */
    protected ObjectName getObjectName(VFSDeploymentUnit unit, JBossMetaData metaData)
       throws MalformedObjectNameException
@@ -500,9 +500,9 @@
          }
 
          unitShortName = unitShortName.substring(unitShortName.lastIndexOf("/") + 1);
-         // 
+         //
          unitShortName = ObjectName.quote(unitShortName);
-         name = EjbModule.BASE_EJB_MODULE_NAME + ",module=" + unitShortName;
+         name = EjbModule.BASE_EJB_MODULE_NAME + ",module=" + unitShortName + ",uid=" + System.identityHashCode(metaData);
       }
 
       return new ObjectName(name);




More information about the jboss-cvs-commits mailing list