[jboss-cvs] JBossAS SVN: r86058 - projects/ejb3/trunk/proxy-impl/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Mar 18 13:26:56 EDT 2009
Author: ALRubinger
Date: 2009-03-18 13:26:56 -0400 (Wed, 18 Mar 2009)
New Revision: 86058
Modified:
projects/ejb3/trunk/proxy-impl/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiSessionRegistrarBase.java
Log:
[EJBTHREE-1778] Take the EAR name into account when making unique registration names for Proxy Factories
Modified: projects/ejb3/trunk/proxy-impl/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiSessionRegistrarBase.java
===================================================================
--- projects/ejb3/trunk/proxy-impl/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiSessionRegistrarBase.java 2009-03-18 17:26:17 UTC (rev 86057)
+++ projects/ejb3/trunk/proxy-impl/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiSessionRegistrarBase.java 2009-03-18 17:26:56 UTC (rev 86058)
@@ -47,6 +47,7 @@
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
import org.jboss.metadata.ejb.jboss.RemoteBindingMetaData;
+import org.jboss.metadata.ejb.jboss.jndipolicy.spi.DeploymentSummary;
import org.jboss.metadata.ejb.jboss.jndipolicy.spi.JbossSessionBeanJndiNameResolver;
import org.jboss.metadata.ejb.spec.BusinessLocalsMetaData;
import org.jboss.metadata.ejb.spec.BusinessRemotesMetaData;
@@ -324,11 +325,11 @@
bindingSet.addDefaultRemoteBinding(new JndiReferenceBinding(defaultRemoteJndiName, defaultRemoteRef));
}
-
+
/*
* If there are @RemoteBindings and a remote view
*/
-
+
// Remote Bindings are defined, create a binding for each
else if (remoteBindings != null && hasRemoteView)
{
@@ -537,7 +538,7 @@
/*
* Bind ObjectFactory for default local businesses (and LocalHome if bound together)
*/
-
+
if (hasLocalBusinessView)
{
// Get Classname to set for Reference
@@ -980,7 +981,7 @@
// Not bound together
return false;
}
-
+
// If no business locals defined
BusinessLocalsMetaData businessLocals = smd.getBusinessLocals();
if (businessLocals == null || businessLocals.size() == 0)
@@ -1001,7 +1002,7 @@
// Not bound together
return false;
}
-
+
// If no business remotes defined
BusinessRemotesMetaData businessRemotes = smd.getBusinessRemotes();
if (businessRemotes == null || businessRemotes.size() == 0)
@@ -1009,7 +1010,7 @@
// Not bound together
return false;
}
-
+
// Bind together if Remote Default JNDI Name == Remote Home JNDI Name
bindTogether = smd.getJndiName().equals(smd.getHomeJndiName());
}
@@ -1060,8 +1061,18 @@
assert suffix != null && !suffix.equals("") : ProxyFactory.class.getSimpleName()
+ " key prefix for binding to registry is not specified";
+ // Get EAR name (if defined)
+ String earName = null;
+ DeploymentSummary summary = smd.getEjbJarMetaData().getDeploymentSummary();
+ if (summary != null)
+ {
+ earName = summary.getDeploymentScopeBaseName();
+ }
+ String earPrefix = earName == null ? "" : earName + "/";
+
// Assemble and return
- String key = JndiSessionRegistrarBase.KEY_PREFIX_PROXY_FACTORY_REGISTRY + smd.getEjbName() + "/" + suffix;
+ String key = JndiSessionRegistrarBase.KEY_PREFIX_PROXY_FACTORY_REGISTRY + earPrefix + smd.getEjbName() + "/"
+ + suffix;
return key;
}
More information about the jboss-cvs-commits
mailing list