[jboss-cvs] JBoss Messaging SVN: r5026 - in branches/Branch_1_4: integration/EAP4/etc/remoting and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 25 04:58:27 EDT 2008
Author: timfox
Date: 2008-09-25 04:58:27 -0400 (Thu, 25 Sep 2008)
New Revision: 5026
Modified:
branches/Branch_1_4/integration/AS5/etc/remoting/remoting-http-service.xml
branches/Branch_1_4/integration/EAP4/etc/remoting/remoting-http-service.xml
branches/Branch_1_4/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
Log:
https://jira.jboss.org/jira/browse/JBMESSAGING-1132
Modified: branches/Branch_1_4/integration/AS5/etc/remoting/remoting-http-service.xml
===================================================================
--- branches/Branch_1_4/integration/AS5/etc/remoting/remoting-http-service.xml 2008-09-25 08:42:18 UTC (rev 5025)
+++ branches/Branch_1_4/integration/AS5/etc/remoting/remoting-http-service.xml 2008-09-25 08:58:27 UTC (rev 5026)
@@ -23,12 +23,19 @@
<attribute name="serverBindPort">4458</attribute>
<attribute name="callbackStore">org.jboss.remoting.callback.BlockingCallbackStore</attribute>
<!-- End immutable parameters -->
-
- <!-- The period for polling for messages on the server -->
- <attribute name="callbackPollPeriod" isParam="true">102</attribute>
-
+
<!-- The period of sending pings to the server -->
<attribute name="clientLeasePeriod" isParam="true">10000</attribute>
+
+ <!-- Set this to true if you want the HTTP transport to block waiting for server->client traffic.
+ Or false if you want it to poll for new traffic periodically. Recommended is true -->
+ <attribute name="blockingMode" isParam="true">blocking</attribute>
+
+ <-- Timeout for blocking. Only has relevance if blockingMode = true -->
+ <attribute name="blockingTimeout" isParam="true">30000</attribute>
+
+ <!-- The periodicity of polling. Only has relevance if blockingMode = false -->
+ <attribute name="callbackPollPeriod" isParam="true">10000</attribute>
</invoker>
<handlers>
<handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
Modified: branches/Branch_1_4/integration/EAP4/etc/remoting/remoting-http-service.xml
===================================================================
--- branches/Branch_1_4/integration/EAP4/etc/remoting/remoting-http-service.xml 2008-09-25 08:42:18 UTC (rev 5025)
+++ branches/Branch_1_4/integration/EAP4/etc/remoting/remoting-http-service.xml 2008-09-25 08:58:27 UTC (rev 5026)
@@ -24,11 +24,18 @@
<attribute name="callbackStore">org.jboss.remoting.callback.BlockingCallbackStore</attribute>
<!-- End immutable parameters -->
- <!-- The period for polling for messages on the server -->
- <attribute name="callbackPollPeriod" isParam="true">102</attribute>
-
<!-- The period of sending pings to the server -->
<attribute name="clientLeasePeriod" isParam="true">10000</attribute>
+
+ <!-- Set this to true if you want the HTTP transport to block waiting for server->client traffic.
+ Or false if you want it to poll for new traffic periodically. Recommended is true -->
+ <attribute name="blockingMode" isParam="true">blocking</attribute>
+
+ <-- Timeout for blocking. Only has relevance if blockingMode = true -->
+ <attribute name="blockingTimeout" isParam="true">30000</attribute>
+
+ <!-- The periodicity of polling. Only has relevance if blockingMode = false -->
+ <attribute name="callbackPollPeriod" isParam="true">10000</attribute>
</invoker>
<handlers>
<handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
Modified: branches/Branch_1_4/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2008-09-25 08:42:18 UTC (rev 5025)
+++ branches/Branch_1_4/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2008-09-25 08:58:27 UTC (rev 5026)
@@ -57,8 +57,6 @@
{
// Constants ------------------------------------------------------------------------------------
- public static final String CALLBACK_POLL_PERIOD_DEFAULT = "100";
-
private static final Logger log = Logger.getLogger(JMSRemotingConnection.class);
// Static ---------------------------------------------------------------------------------------
@@ -172,23 +170,54 @@
}
else
{
- // "jboss.messaging.callback.pollPeriod" system property, if set, has the
- // highest priority ...
- String callbackPollPeriod = getPropertySafely("jboss.messaging.callback.pollPeriod");
-
- if (callbackPollPeriod == null)
+ String blockingMode = getPropertySafely("jboss.messaging.callback.blockingMode");
+
+ if (blockingMode == null)
{
- // followed by the value configured on the HTTP connector ("callbackPollPeriod") ...
- callbackPollPeriod = (String)serverLocator.getParameters().get("callbackPollPeriod");
- if (callbackPollPeriod == null)
+ blockingMode = (String)serverLocator.getParameters().get(ServerInvoker.BLOCKING_MODE);
+ }
+
+ if (blockingMode == null)
+ {
+ //Default to blocking
+
+ blockingMode = ServerInvoker.BLOCKING;
+ }
+
+ metadata.put(ServerInvoker.BLOCKING_MODE, blockingMode);
+
+ if (blockingMode.equals(ServerInvoker.BLOCKING))
+ {
+ String blockingTimeout = getPropertySafely("jboss.messaging.callback.blockingTimeout");
+
+ if (blockingTimeout == null)
{
- // followed by the hardcoded value.
- callbackPollPeriod = CALLBACK_POLL_PERIOD_DEFAULT;
+ blockingTimeout = (String)serverLocator.getParameters().get(ServerInvoker.BLOCKING_TIMEOUT);
}
+
+ if (blockingTimeout != null)
+ {
+ metadata.put(ServerInvoker.BLOCKING_TIMEOUT, blockingTimeout);
+ }
}
+ else
+ {
+ // "jboss.messaging.callback.pollPeriod" system property, if set, has the
+ // highest priority ...
+ String callbackPollPeriod = getPropertySafely("jboss.messaging.callback.pollPeriod");
- metadata.put(CallbackPoller.CALLBACK_POLL_PERIOD, callbackPollPeriod);
+ if (callbackPollPeriod == null)
+ {
+ // followed by the value configured on the HTTP connector ("callbackPollPeriod") ...
+ callbackPollPeriod = (String)serverLocator.getParameters().get(CallbackPoller.CALLBACK_POLL_PERIOD);
+ }
+ if (callbackPollPeriod != null)
+ {
+ metadata.put(CallbackPoller.CALLBACK_POLL_PERIOD, callbackPollPeriod);
+ }
+ }
+
String reportPollingStatistics =
getPropertySafely("jboss.messaging.callback.reportPollingStatistics");
More information about the jboss-cvs-commits
mailing list