[jboss-cvs] JBoss Messaging SVN: r5004 - in branches/Branch_1_4: integration/AS5/etc/server/default/deploy and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Sep 22 14:18:43 EDT 2008
Author: timfox
Date: 2008-09-22 14:18:43 -0400 (Mon, 22 Sep 2008)
New Revision: 5004
Modified:
branches/Branch_1_4/docs/userguide/en/modules/configuration.xml
branches/Branch_1_4/integration/AS5/etc/server/default/deploy/connection-factories-service.xml
branches/Branch_1_4/integration/AS5/etc/xmdesc/ConnectionFactory-xmbean.xml
branches/Branch_1_4/integration/EAP4/etc/server/default/deploy/connection-factories-service.xml
branches/Branch_1_4/integration/EAP4/etc/xmdesc/ConnectionFactory-xmbean.xml
branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java
branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
branches/Branch_1_4/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
branches/Branch_1_4/src/main/org/jboss/jms/server/ConnectionFactoryManager.java
branches/Branch_1_4/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
branches/Branch_1_4/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
branches/Branch_1_4/tests/build.properties
Log:
https://jira.jboss.org/jira/browse/JBMESSAGING-1397
Modified: branches/Branch_1_4/docs/userguide/en/modules/configuration.xml
===================================================================
--- branches/Branch_1_4/docs/userguide/en/modules/configuration.xml 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/docs/userguide/en/modules/configuration.xml 2008-09-22 18:18:43 UTC (rev 5004)
@@ -2153,6 +2153,8 @@
<attribute name="SlowConsumers">false</attribute>
<attribute name="StrictTck">true</attribute>
+
+ <attribute name="SendAcksAsync">false</attribute>
<attribute name="DefaultTempQueueFullSize">50000</attribute>
@@ -2219,6 +2221,12 @@
<para>Set this to true if you want strict JMS behaviour as required by
the TCK.</para>
</section>
+
+ <section id="conf.connectionfactory.attributes.sendacksasync">
+ <title>SendAcksAsync</title>
+
+ <para>Set this to true if you want acknowledgements to be sent asynchronously. This can speed up performance especially if you are using auto_acknowledge mode</para>
+ </section>
<section id="conf.connectionfactory.attributes.tempqueuepaging">
<title>Temporary queue paging parameters</title>
Modified: branches/Branch_1_4/integration/AS5/etc/server/default/deploy/connection-factories-service.xml
===================================================================
--- branches/Branch_1_4/integration/AS5/etc/server/default/deploy/connection-factories-service.xml 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/integration/AS5/etc/server/default/deploy/connection-factories-service.xml 2008-09-22 18:18:43 UTC (rev 5004)
@@ -18,7 +18,7 @@
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
<depends>jboss.messaging:service=PostOffice</depends>
-
+
<attribute name="JNDIBindings">
<bindings>
<binding>/ConnectionFactory</binding>
@@ -120,6 +120,10 @@
<attribute name="StrictTck">true</attribute>
+ <!- - Should acknowledgements be sent asynchronously? - ->
+
+ <attribute name="SendAcksAsync">false</attribute>
+
<!- - Disable JBoss Remoting Connector sanity checks - There is rarely a good reason to set this to true - ->
<attribute name="DisableRemotingChecks">false</attribute>
Modified: branches/Branch_1_4/integration/AS5/etc/xmdesc/ConnectionFactory-xmbean.xml
===================================================================
--- branches/Branch_1_4/integration/AS5/etc/xmdesc/ConnectionFactory-xmbean.xml 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/integration/AS5/etc/xmdesc/ConnectionFactory-xmbean.xml 2008-09-22 18:18:43 UTC (rev 5004)
@@ -118,6 +118,12 @@
<type>boolean</type>
</attribute>
+ <attribute access="read-write" getMethod="isSendAcksAsync" setMethod="setSendAcksAsync">
+ <description>Should acknowledgements be sent asynchronously?</description>
+ <name>SendAcksAsync</name>
+ <type>boolean</type>
+ </attribute>
+
<attribute access="read-write" getMethod="isDisableRemotingChecks" setMethod="setDisableRemotingChecks">
<description>Disable remoting connector parameter sanity checks. There is rarely a good reason to set this to true</description>
<name>DisableRemotingChecks</name>
Modified: branches/Branch_1_4/integration/EAP4/etc/server/default/deploy/connection-factories-service.xml
===================================================================
--- branches/Branch_1_4/integration/EAP4/etc/server/default/deploy/connection-factories-service.xml 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/integration/EAP4/etc/server/default/deploy/connection-factories-service.xml 2008-09-22 18:18:43 UTC (rev 5004)
@@ -120,6 +120,10 @@
<attribute name="StrictTck">true</attribute>
+ <!- - Should acknowledgements be sent asynchronously? - ->
+
+ <attribute name="SendAcksAsync">false</attribute>
+
<!- - Disable JBoss Remoting Connector sanity checks - There is rarely a good reason to set this to true - ->
<attribute name="DisableRemotingChecks">false</attribute>
Modified: branches/Branch_1_4/integration/EAP4/etc/xmdesc/ConnectionFactory-xmbean.xml
===================================================================
--- branches/Branch_1_4/integration/EAP4/etc/xmdesc/ConnectionFactory-xmbean.xml 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/integration/EAP4/etc/xmdesc/ConnectionFactory-xmbean.xml 2008-09-22 18:18:43 UTC (rev 5004)
@@ -118,6 +118,12 @@
<type>boolean</type>
</attribute>
+ <attribute access="read-write" getMethod="isSendAcksAsync" setMethod="setSendAcksAsync">
+ <description>Should acknowledgements be sent asynchronously?</description>
+ <name>SendAcksAsync</name>
+ <type>boolean</type>
+ </attribute>
+
<attribute access="read-write" getMethod="isDisableRemotingChecks" setMethod="setDisableRemotingChecks">
<description>Disable remoting connector parameter sanity checks. There is rarely a good reason to set this to true</description>
<name>DisableRemotingChecks</name>
Modified: branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java 2008-09-22 18:18:43 UTC (rev 5004)
@@ -95,7 +95,7 @@
if (trace) log.trace("Trying communication on server(" + server + ")=" + delegates[server].getServerLocatorURI());
try
{
- remoting = new JMSRemotingConnection(delegates[server].getServerLocatorURI(), true, delegates[server].getStrictTck());
+ remoting = new JMSRemotingConnection(delegates[server].getServerLocatorURI(), true, delegates[server].getStrictTck(), delegates[server].isSendAcksAsync());
remoting.start();
currentDelegate = delegates[server];
if (trace) log.trace("Adding callback");
Modified: branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java 2008-09-22 18:18:43 UTC (rev 5004)
@@ -77,6 +77,8 @@
private boolean strictTck;
+ private boolean sendAcksAsync;
+
// Static ---------------------------------------------------------------------------------------
/*
@@ -106,7 +108,8 @@
// Constructors ---------------------------------------------------------------------------------
public ClientConnectionFactoryDelegate(String uniqueName, String objectID, int serverID, String serverLocatorURI,
- Version serverVersion, boolean clientPing, boolean strictTck)
+ Version serverVersion, boolean clientPing, boolean strictTck,
+ boolean sendAcksAsync)
{
super(objectID);
@@ -116,6 +119,7 @@
this.serverVersion = serverVersion;
this.clientPing = clientPing;
this.strictTck = strictTck;
+ this.sendAcksAsync = sendAcksAsync;
}
public ClientConnectionFactoryDelegate()
@@ -149,7 +153,7 @@
try
{
- remotingConnection = new JMSRemotingConnection(serverLocatorURI, clientPing, strictTck);
+ remotingConnection = new JMSRemotingConnection(serverLocatorURI, clientPing, strictTck, sendAcksAsync);
remotingConnection.start();
@@ -271,8 +275,13 @@
return strictTck;
}
- public void synchronizeWith(DelegateSupport newDelegate) throws Exception
+ public boolean isSendAcksAsync()
{
+ return this.sendAcksAsync;
+ }
+
+ public void synchronizeWith(DelegateSupport newDelegate) throws Exception
+ {
super.synchronizeWith(newDelegate);
}
@@ -327,6 +336,8 @@
clientPing = in.readBoolean();
strictTck = in.readBoolean();
+
+ sendAcksAsync = in.readBoolean();
}
public void write(DataOutputStream out) throws Exception
@@ -342,6 +353,8 @@
out.writeBoolean(clientPing);
out.writeBoolean(strictTck);
+
+ out.writeBoolean(sendAcksAsync);
}
// Inner Classes --------------------------------------------------------------------------------
Modified: branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java 2008-09-22 18:18:43 UTC (rev 5004)
@@ -93,6 +93,8 @@
private int dupsOKBatchSize;
private boolean strictTck;
+
+ private boolean sendAcksAsync;
// Static ---------------------------------------------------------------------------------------
@@ -132,6 +134,8 @@
onewayClient = conn.getOnewayClient();
strictTck = conn.isStrictTck();
+
+ sendAcksAsync = conn.isSendAcksAsync();
}
public void setState(HierarchicalState state)
@@ -145,6 +149,8 @@
onewayClient = conn.getOnewayClient();
strictTck = conn.isStrictTck();
+
+ sendAcksAsync = conn.isSendAcksAsync();
}
// Closeable implementation ---------------------------------------------------------------------
@@ -169,14 +175,30 @@
{
RequestSupport req = new SessionAcknowledgeDeliveryRequest(id, version, ack);
- return ((Boolean)doInvoke(client, req)).booleanValue();
+ if (sendAcksAsync)
+ {
+ doInvokeOneway(onewayClient, req);
+
+ return true;
+ }
+ else
+ {
+ return ((Boolean)doInvoke(client, req)).booleanValue();
+ }
}
public void acknowledgeDeliveries(List acks) throws JMSException
{
RequestSupport req = new SessionAcknowledgeDeliveriesRequest(id, version, acks);
-
- doInvoke(client, req);
+
+ if (sendAcksAsync)
+ {
+ doInvokeOneway(onewayClient, req);
+ }
+ else
+ {
+ doInvoke(client, req);
+ }
}
/**
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-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2008-09-22 18:18:43 UTC (rev 5004)
@@ -244,6 +244,7 @@
private InvokerLocator serverLocator;
private CallbackManager callbackManager;
private boolean strictTck;
+ private boolean sendAcksAsync;
// When a failover is performed, this flag is set to true
protected boolean failed = false;
@@ -254,12 +255,14 @@
// Constructors ---------------------------------------------------------------------------------
- public JMSRemotingConnection(String serverLocatorURI, boolean clientPing, boolean strictTck) throws Exception
+ public JMSRemotingConnection(String serverLocatorURI, boolean clientPing, boolean strictTck,
+ boolean sendAcksAsync) throws Exception
{
serverLocator = new InvokerLocator(serverLocatorURI);
this.clientPing = clientPing;
this.strictTck = strictTck;
-
+ this.sendAcksAsync = sendAcksAsync;
+
log.trace(this + " created");
}
@@ -408,6 +411,11 @@
{
return strictTck;
}
+
+ public boolean isSendAcksAsync()
+ {
+ return sendAcksAsync;
+ }
public synchronized boolean isFailed()
{
Modified: branches/Branch_1_4/src/main/org/jboss/jms/server/ConnectionFactoryManager.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/server/ConnectionFactoryManager.java 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/src/main/org/jboss/jms/server/ConnectionFactoryManager.java 2008-09-22 18:18:43 UTC (rev 5004)
@@ -49,7 +49,8 @@
boolean supportsFailover,
boolean supportsLoadBalancing,
LoadBalancingFactory loadBalancingPolicy,
- boolean strictTck) throws Exception;
+ boolean strictTck,
+ boolean sendAcksAsync) throws Exception;
void unregisterConnectionFactory(String uniqueName, boolean supportsFailover, boolean supportsLoadBalancing) throws Exception;
}
Modified: branches/Branch_1_4/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java 2008-09-22 18:18:43 UTC (rev 5004)
@@ -78,6 +78,8 @@
private boolean strictTck;
+ private boolean sendAcksAsync;
+
private boolean disableRemotingChecks;
// Constructors ---------------------------------------------------------------------------------
@@ -202,7 +204,7 @@
locatorURI, enablePing, prefetchSize, slowConsumers,
defaultTempQueueFullSize, defaultTempQueuePageSize,
defaultTempQueueDownCacheSize, dupsOKBatchSize, supportsFailover, supportsLoadBalancing,
- loadBalancingFactory, strictTck);
+ loadBalancingFactory, strictTck, sendAcksAsync);
String info = "Connector " + locator.getProtocol() + "://" +
locator.getHost() + ":" + locator.getPort();
@@ -429,6 +431,22 @@
this.strictTck = strictTck;
}
+ public boolean isSendAcksAsync()
+ {
+ return this.sendAcksAsync;
+ }
+
+ public void setSendAcksAsync(boolean async)
+ {
+ if (started)
+ {
+ log.warn("SendAcksAsync can only be changed when connection factory is stopped");
+ return;
+ }
+
+ this.sendAcksAsync = async;
+ }
+
public boolean isDisableRemotingChecks()
{
return disableRemotingChecks;
Modified: branches/Branch_1_4/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2008-09-22 18:18:43 UTC (rev 5004)
@@ -126,7 +126,8 @@
boolean supportsFailover,
boolean supportsLoadBalancing,
LoadBalancingFactory loadBalancingFactory,
- boolean strictTck)
+ boolean strictTck,
+ boolean sendAcksAsync)
throws Exception
{
log.debug(this + " registering connection factory '" + uniqueName + "', bindings: " + jndiBindings);
@@ -180,7 +181,8 @@
ClientConnectionFactoryDelegate localDelegate =
new ClientConnectionFactoryDelegate(uniqueName, id, serverPeer.getServerPeerID(),
- locatorURI, version, clientPing, useStrict);
+ locatorURI, version, clientPing, useStrict,
+ sendAcksAsync);
log.debug(this + " created local delegate " + localDelegate);
Modified: branches/Branch_1_4/tests/build.properties
===================================================================
--- branches/Branch_1_4/tests/build.properties 2008-09-22 17:11:44 UTC (rev 5003)
+++ branches/Branch_1_4/tests/build.properties 2008-09-22 18:18:43 UTC (rev 5004)
@@ -2,5 +2,5 @@
# Local overrides for the builds initiated by build.sh
#
-test.bind.address=192.168.1.150
+#test.bind.address=192.168.1.12
More information about the jboss-cvs-commits
mailing list