[jboss-cvs] JBoss Messaging SVN: r3196 - in trunk/src: main/org/jboss/jms/client and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 18 05:13:13 EDT 2007
Author: timfox
Date: 2007-10-18 05:13:13 -0400 (Thu, 18 Oct 2007)
New Revision: 3196
Modified:
trunk/src/etc/remoting/remoting-bisocket-service.xml
trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java
trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java
trunk/src/main/org/jboss/jms/server/security/SecurityMetadataStore.java
trunk/src/main/org/jboss/messaging/core/jmx/JDBCServiceSupport.java
Log:
http://jira.jboss.com/jira/browse/JBMESSAGING-1114
Modified: trunk/src/etc/remoting/remoting-bisocket-service.xml
===================================================================
--- trunk/src/etc/remoting/remoting-bisocket-service.xml 2007-10-18 08:49:34 UTC (rev 3195)
+++ trunk/src/etc/remoting/remoting-bisocket-service.xml 2007-10-18 09:13:13 UTC (rev 3196)
@@ -17,6 +17,9 @@
<attribute name="Configuration">
<config>
<invoker transport="bisocket">
+
+ <!-- There should be no reason to change these parameters - warning!
+ Changing them may stop JBoss Messaging working correctly -->
<attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
<attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
<attribute name="dataType" isParam="true">jms</attribute>
@@ -24,22 +27,23 @@
<attribute name="timeout" isParam="true">0</attribute>
<attribute name="serverBindAddress">${jboss.bind.address}</attribute>
<attribute name="serverBindPort">4457</attribute>
- <attribute name="clientLeasePeriod" isParam="true">10000</attribute>
<attribute name="clientSocketClass" isParam="true">org.jboss.jms.client.remoting.ClientSocketWrapper</attribute>
<attribute name="serverSocketClass" isParam="true">org.jboss.jms.server.remoting.ServerSocketWrapper</attribute>
+ <attribute name="numberOfCallRetries" isParam="true">1</attribute>
+ <attribute name="pingFrequency" isParam="true">214748364</attribute>
+ <attribute name="pingWindowFactor" isParam="true">10</attribute>
+ <attribute name="onewayThreadPool">org.jboss.jms.server.remoting.DirectThreadPool</attribute>
+
+ <!-- Periodicity of client pings. Server window by default is twice this figure -->
+ <attribute name="clientLeasePeriod" isParam="true">10000</attribute>
- <!-- Number of seconds to wait for a connection in the client pool to become free -->
+ <!-- Number of seconds to wait for a connection in the client pool to become free -->
<attribute name="numberOfRetries" isParam="true">10</attribute>
- <!-- NUmber of times to retry an ionvocation -->
- <attribute name="numberOfCallRetries" isParam="true">1</attribute>
- <!-- Max Number of connections in client pool. This should be significantly higher than the max number of sessions/consumers you expect -->
+ <!-- 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="pingFrequency" isParam="true">214748364</attribute>
-
- <attribute name="pingWindowFactor" isParam="true">10</attribute>
-
- <attribute name="onewayThreadPool">org.jboss.jms.server.remoting.DirectThreadPool</attribute>
+
</invoker>
<handlers>
<handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
Modified: trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java 2007-10-18 08:49:34 UTC (rev 3195)
+++ trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java 2007-10-18 09:13:13 UTC (rev 3196)
@@ -35,7 +35,7 @@
private static boolean trace = log.isTraceEnabled();
- // Attributes -----------------------------------------------------------------------------------
+ // Attributes-----------------------------------------------------------------------------------
private ConnectionState state;
@@ -71,7 +71,7 @@
JMSRemotingConnection remotingConnection)
throws Exception
{
- log.debug("failure detected by " + source);
+ log.debug("failure detected by " + source, reason);
// generate a FAILURE_DETECTED event
broadcastFailoverEvent(new FailoverEvent(FailoverEvent.FAILURE_DETECTED, source));
Modified: trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java 2007-10-18 08:49:34 UTC (rev 3195)
+++ trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java 2007-10-18 09:13:13 UTC (rev 3196)
@@ -25,6 +25,7 @@
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.Serializable;
+import java.net.SocketException;
import javax.jms.JMSException;
@@ -214,10 +215,29 @@
{
return (JMSException)t;
}
- else if ((t instanceof CannotConnectException) ||
- (t instanceof IOException) ||
- (t instanceof ConnectionFailedException))
+ else if (t instanceof CannotConnectException)
{
+ boolean failover = true;
+ CannotConnectException cc = (CannotConnectException)t;
+ Throwable underlying = cc.getCause();
+ if (underlying != null && underlying instanceof SocketException)
+ {
+ //If remoting fails to find a connection because the client pool is full
+ //then it throws a SocketException! - in this case we DO NOT want to failover
+ //See http://jira.jboss.com/jira/browse/JBMESSAGING-1114
+ if (underlying.getMessage() != null &&
+ underlying.getMessage().startsWith("Can not obtain client socket connection from pool"))
+ {
+ failover = false;
+ }
+ }
+ if (failover)
+ {
+ return new MessagingNetworkFailureException(cc);
+ }
+ }
+ else if ((t instanceof IOException) || (t instanceof ConnectionFailedException))
+ {
return new MessagingNetworkFailureException((Exception)t);
}
//This can occur if failure happens when Client.connect() is called
@@ -244,8 +264,7 @@
}
}
- return new MessagingJMSException("Failed to invoke", t);
-
+ return new MessagingJMSException("Failed to invoke", t);
}
public Client getClient()
Modified: trunk/src/main/org/jboss/jms/server/security/SecurityMetadataStore.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/security/SecurityMetadataStore.java 2007-10-18 08:49:34 UTC (rev 3195)
+++ trunk/src/main/org/jboss/jms/server/security/SecurityMetadataStore.java 2007-10-18 09:13:13 UTC (rev 3196)
@@ -310,7 +310,7 @@
{
log.warn("WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component " +
"which sucks messages from one node to another has not had its password changed from the installation default. " +
- "Please see the userguide for instructions on how to do this.");
+ "Please see the JBoss Messaging userguide for instructions on how to do this.");
}
}
More information about the jboss-cvs-commits
mailing list