[jboss-cvs] JBossAS SVN: r63643 - trunk/ejb3/src/main/org/jboss/ejb3/stateful.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 26 13:28:36 EDT 2007
Author: wolfc
Date: 2007-06-26 13:28:36 -0400 (Tue, 26 Jun 2007)
New Revision: 63643
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
Log:
EJBTHREE-994: made jndiName + partitionName the unique identifier for a clustered proxy
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java 2007-06-26 15:30:10 UTC (rev 63642)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java 2007-06-26 17:28:36 UTC (rev 63643)
@@ -63,7 +63,7 @@
{
private static final Logger log = Logger.getLogger(StatefulClusterProxyFactory.class);
- public static final String FACTORY_ATTRIBUTE = ",element=ProxyFactory,partition=";
+// public static final String FACTORY_ATTRIBUTE = ",element=ProxyFactory,partition=";
private RemoteBinding binding;
private InvokerLocator locator;
@@ -131,6 +131,7 @@
namingException.setRootCause(e);
throw namingException;
}
+ assert !Dispatcher.singleton.isRegistered(targetId) : targetId + " is already registered";
Dispatcher.singleton.registerTarget(targetId, this);
}
@@ -195,10 +196,14 @@
return handle;
}
+ /**
+ * @return unique name for this proxy factory
+ */
protected String getTargetId()
- {
+ {
+ assert jndiName != null : "jndiName is null";
String partition = ((StatefulContainer) container).getPartitionName();
- return container.getObjectName().getCanonicalName() + FACTORY_ATTRIBUTE + partition;
+ return jndiName + PROXY_FACTORY_NAME + "@" + partition;
}
public synchronized void replicantsChanged (String key,
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java 2007-06-26 15:30:10 UTC (rev 63642)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java 2007-06-26 17:28:36 UTC (rev 63643)
@@ -55,7 +55,7 @@
{
private static final Logger log = Logger.getLogger(StatefulRemoteProxyFactory.class);
- public static final String FACTORY_ATTRIBUTE = ",element=ProxyFactory";
+// public static final String FACTORY_ATTRIBUTE = ",element=ProxyFactory";
private RemoteBinding binding;
private InvokerLocator locator;
@@ -129,6 +129,7 @@
namingException.setRootCause(e);
throw namingException;
}
+ assert !Dispatcher.singleton.isRegistered(targetId) : targetId + " is already registered";
Dispatcher.singleton.registerTarget(targetId, this);
StatefulContainer statefulContainer = (StatefulContainer) container;
@@ -260,9 +261,13 @@
}
}
+ /**
+ * @return unique name for this proxy factory
+ */
protected String getTargetId()
{
- return container.getObjectName().getCanonicalName() + FACTORY_ATTRIBUTE;
+ assert jndiName != null : "jndiName is null";
+ return jndiName + PROXY_FACTORY_NAME;
}
protected Object createPojiProxy(Object oid, Class[] interfaces, String uri) throws Exception
More information about the jboss-cvs-commits
mailing list