[jboss-cvs] JBoss Messaging SVN: r7313 - trunk/src/main/org/jboss/messaging/core/remoting/server/impl.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jun 12 03:55:37 EDT 2009
Author: jmesnil
Date: 2009-06-12 03:55:37 -0400 (Fri, 12 Jun 2009)
New Revision: 7313
Modified:
trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java
Log:
fixed RemotingServiceImpl code which adds a default invm acceptor if none is configured
Modified: trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java 2009-06-11 18:52:50 UTC (rev 7312)
+++ trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java 2009-06-12 07:55:37 UTC (rev 7313)
@@ -188,9 +188,22 @@
//Now we also need to create a invmacceptor with id 0 if it doesn't already exist - this is simple because
//lots of tests assume this - this requirement should also be removed
//this is a bad thing to do since does not play well when there are multiple servers in the same VM.
-
- if (InVMRegistry.instance.getAcceptor(0) == null)
+
+ boolean foundInvmAcceptor = false;
+ for (TransportConfiguration config : transportConfigs)
{
+ if (config.getFactoryClassName().equals(InVMAcceptorFactory.class.getName())
+ && (!config.getParams().containsKey(TransportConstants.SERVER_ID_PROP_NAME)
+ || (config.getParams().containsKey(TransportConstants.SERVER_ID_PROP_NAME)
+ && (Integer)config.getParams().get(TransportConstants.SERVER_ID_PROP_NAME) == 0)))
+ {
+ foundInvmAcceptor = true;
+ break;
+ }
+ }
+
+ if (!foundInvmAcceptor)
+ {
transportConfigs.add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
}
More information about the jboss-cvs-commits
mailing list