[jboss-cvs] JBoss Messaging SVN: r3409 - in branches/Branch_Stable/src: main/org/jboss/jms/client/remoting and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Dec 4 16:32:54 EST 2007
Author: timfox
Date: 2007-12-04 16:32:54 -0500 (Tue, 04 Dec 2007)
New Revision: 3409
Modified:
branches/Branch_Stable/src/etc/remoting/remoting-bisocket-service.xml
branches/Branch_Stable/src/etc/remoting/remoting-sslbisocket-service.xml
branches/Branch_Stable/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
branches/Branch_Stable/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
Log:
Use JBM_clientMaxPoolSize hack
Modified: branches/Branch_Stable/src/etc/remoting/remoting-bisocket-service.xml
===================================================================
--- branches/Branch_Stable/src/etc/remoting/remoting-bisocket-service.xml 2007-12-04 13:59:34 UTC (rev 3408)
+++ branches/Branch_Stable/src/etc/remoting/remoting-bisocket-service.xml 2007-12-04 21:32:54 UTC (rev 3409)
@@ -43,7 +43,7 @@
<!-- Max Number of connections in client pool. This should be significantly higher than
the max number of sessions/consumers you expect -->
- <attribute name="clientMaxPoolSize" isParam="true">200</attribute>
+ <attribute name="JBM_clientMaxPoolSize" isParam="true">200</attribute>
<!-- Use these parameters to specify values for binding and connecting control connections to
work with your firewall/NAT configuration
Modified: branches/Branch_Stable/src/etc/remoting/remoting-sslbisocket-service.xml
===================================================================
--- branches/Branch_Stable/src/etc/remoting/remoting-sslbisocket-service.xml 2007-12-04 13:59:34 UTC (rev 3408)
+++ branches/Branch_Stable/src/etc/remoting/remoting-sslbisocket-service.xml 2007-12-04 21:32:54 UTC (rev 3409)
@@ -42,7 +42,7 @@
<!-- Max Number of connections in client pool. This should be significantly higher than
the max number of sessions/consumers you expect -->
- <attribute name="clientMaxPoolSize" isParam="true">200</attribute>
+ <attribute name="JBM_clientMaxPoolSize" isParam="true">200</attribute>
<!-- Use these parameters to specify values for binding and connecting control connections to
work with your firewall/NAT configuration
Modified: branches/Branch_Stable/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-12-04 13:59:34 UTC (rev 3408)
+++ branches/Branch_Stable/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-12-04 21:32:54 UTC (rev 3409)
@@ -24,7 +24,6 @@
import java.security.AccessController;
import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import org.jboss.jms.server.ServerPeer;
@@ -266,6 +265,8 @@
// Public ---------------------------------------------------------------------------------------
+ private static final String JBM_MAX_POOL_SIZE_KEY = "JBM_clientMaxPoolSize";
+
public void start() throws Throwable
{
// Enable client pinging. Server leasing is enabled separately on the server side.
@@ -273,6 +274,23 @@
Map config = new HashMap();
config.put(Client.ENABLE_LEASE, String.valueOf(clientPing));
+
+ if (serverLocator.getParameters().containsKey(MicroSocketClientInvoker.MAX_POOL_SIZE_FLAG))
+ {
+ throw new IllegalArgumentException("Invalid remoting configuration - do not specify clientMaxPoolSize" +
+ " use " + JBM_MAX_POOL_SIZE_KEY +" instead");
+ }
+
+ String val = (String)serverLocator.getParameters().get(JBM_MAX_POOL_SIZE_KEY);
+
+ if (val == null)
+ {
+ log.warn(JBM_MAX_POOL_SIZE_KEY + " not specified - defaulting to 200");
+
+ val = "200";
+ }
+
+ config.put(MicroSocketClientInvoker.MAX_POOL_SIZE_FLAG, val);
client = new Client(serverLocator, config);
@@ -280,7 +298,6 @@
Map config2 = new HashMap();
- //config.putAll(serverLocator.getParameters());
config2.put(Client.ENABLE_LEASE, "false");
config2.put(MicroSocketClientInvoker.MAX_POOL_SIZE_FLAG, "1");
Modified: branches/Branch_Stable/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java 2007-12-04 13:59:34 UTC (rev 3408)
+++ branches/Branch_Stable/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java 2007-12-04 21:32:54 UTC (rev 3409)
@@ -165,13 +165,13 @@
}
}
- val = (String)params.get("clientMaxPoolSize");
+ val = (String)params.get("JBM_clientMaxPoolSize");
if (val != null)
{
int i = Integer.parseInt(val);
if (i < 50)
{
- log.warn("Value of clientMaxPoolSize at " + i + " seems low. Normal values are >= 50");
+ log.warn("Value of JBM_clientMaxPoolSize at " + i + " seems low. Normal values are >= 50");
}
}
}
More information about the jboss-cvs-commits
mailing list