[jboss-cvs] JBoss Messaging SVN: r2735 - in trunk: docs/examples/secure-socket/etc and 11 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 29 12:01:31 EDT 2007
Author: timfox
Date: 2007-05-29 12:01:31 -0400 (Tue, 29 May 2007)
New Revision: 2735
Added:
trunk/tests/src/org/jboss/test/messaging/jms/clustering/RequestResponseWithPullTest.java
Modified:
trunk/docs/examples/http/etc/messaging-http-service.xml
trunk/docs/examples/secure-socket/etc/messaging-secure-socket-service.xml
trunk/src/etc/server/default/deploy/clustered-db2-persistence-service.xml
trunk/src/etc/server/default/deploy/clustered-mssql-persistence-service.xml
trunk/src/etc/server/default/deploy/clustered-mysql-persistence-service.xml
trunk/src/etc/server/default/deploy/clustered-oracle-persistence-service.xml
trunk/src/etc/server/default/deploy/clustered-postgresql-persistence-service.xml
trunk/src/etc/server/default/deploy/clustered-sybase-persistence-service.xml
trunk/src/etc/server/default/deploy/remoting-service.xml
trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
trunk/src/main/org/jboss/jms/server/ServerPeer.java
trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultRouter.java
trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/LocalClusteredQueue.java
trunk/tests/bin/runtest
trunk/tests/bin/start-rmi-server
trunk/tests/build.xml
trunk/tests/etc/container-qalab.xml
trunk/tests/etc/container.xml
trunk/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java
trunk/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTestBase.java
trunk/tests/src/org/jboss/test/messaging/jms/clustering/DistributedQueueTest.java
trunk/tests/src/org/jboss/test/messaging/jms/clustering/TemporaryDestinationTest.java
trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java
trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java
Log:
http://jira.jboss.com/jira/browse/JBMESSAGING-973 and http://jira.jboss.com/jira/browse/JBMESSAGING-971
Modified: trunk/docs/examples/http/etc/messaging-http-service.xml
===================================================================
--- trunk/docs/examples/http/etc/messaging-http-service.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/docs/examples/http/etc/messaging-http-service.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -8,7 +8,6 @@
<server>
- <!-- THIS IS ONLY USED BY TESTS SO SHOULD ONLY EXIST IN THE TESTS CONFIG, NOT IN THE MAIN CONFIG!! -->
<mbean code="org.jboss.remoting.transport.Connector"
name="jboss.messaging:service=Connector,transport=http"
display-name="HTTP transport Connector">
@@ -17,7 +16,6 @@
<invoker transport="http">
<attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
<attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
- <attribute name="serializationtype" isParam="true">jms</attribute>
<attribute name="dataType" isParam="true">jms</attribute>
<attribute name="socket.check_connection" isParam="true">false</attribute>
<attribute name="timeout" isParam="true">0</attribute>
@@ -32,7 +30,6 @@
</handlers>
</config>
</attribute>
- <depends>jboss.messaging:service=NetworkRegistry</depends>
</mbean>
<mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
Modified: trunk/docs/examples/secure-socket/etc/messaging-secure-socket-service.xml
===================================================================
--- trunk/docs/examples/secure-socket/etc/messaging-secure-socket-service.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/docs/examples/secure-socket/etc/messaging-secure-socket-service.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -14,23 +14,21 @@
display-name="SSL Socket Transport Connector">
<attribute name="Configuration">
<config>
- <invoker transport="sslbisocket">
+ <invoker transport="sslbisocket">
<attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
<attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
- <attribute name="serializationtype" isParam="true">jms</attribute>
<attribute name="dataType" isParam="true">jms</attribute>
<attribute name="socket.check_connection" isParam="true">false</attribute>
<attribute name="timeout" isParam="true">0</attribute>
<attribute name="serverBindAddress">${jboss.bind.address}</attribute>
<attribute name="serverBindPort">5457</attribute>
<attribute name="leasePeriod">10000</attribute>
- <attribute name="serverSocketFactory">jboss.messaging:service=ServerSocketFactory,type=SSL</attribute>
<attribute name="clientSocketClass" isParam="true">org.jboss.jms.client.remoting.ClientSocketWrapper</attribute>
<attribute name="serverSocketClass">org.jboss.jms.server.remoting.ServerSocketWrapper</attribute>
- <attribute name="callbackErrorsAllowed">1</attribute>
<attribute name="numberOfRetries" isParam="true">1</attribute>
- <attribute name="NumberOfCallRetries" isParam="true">2</attribute>
+ <attribute name="NumberOfCallRetries" isParam="true">1</attribute>
<attribute name="clientMaxPoolSize" isParam="true">50</attribute>
+ <attribute name="serverSocketFactory">jboss.messaging:service=ServerSocketFactory,type=SSL</attribute>
</invoker>
<handlers>
<handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
Modified: trunk/src/etc/server/default/deploy/clustered-db2-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/clustered-db2-persistence-service.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/etc/server/default/deploy/clustered-db2-persistence-service.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -83,7 +83,7 @@
<attribute name="GroupName">DefaultPostOffice</attribute>
<attribute name="StateTimeout">5000</attribute>
<attribute name="CastTimeout">5000</attribute>
- <attribute name="StatsSendPeriod">10000</attribute>
+ <attribute name="StatsSendPeriod">3000</attribute>
<attribute name="MessagePullPolicy">org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy</attribute>
<attribute name="ClusterRouterFactory">org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory</attribute>
Modified: trunk/src/etc/server/default/deploy/clustered-mssql-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/clustered-mssql-persistence-service.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/etc/server/default/deploy/clustered-mssql-persistence-service.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -83,7 +83,7 @@
<attribute name="GroupName">DefaultPostOffice</attribute>
<attribute name="StateTimeout">5000</attribute>
<attribute name="CastTimeout">5000</attribute>
- <attribute name="StatsSendPeriod">10000</attribute>
+ <attribute name="StatsSendPeriod">3000</attribute>
<attribute name="MessagePullPolicy">org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy</attribute>
<attribute name="ClusterRouterFactory">org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory</attribute>
Modified: trunk/src/etc/server/default/deploy/clustered-mysql-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/clustered-mysql-persistence-service.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/etc/server/default/deploy/clustered-mysql-persistence-service.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -83,7 +83,7 @@
<attribute name="GroupName">DefaultPostOffice</attribute>
<attribute name="StateTimeout">5000</attribute>
<attribute name="CastTimeout">5000</attribute>
- <attribute name="StatsSendPeriod">10000</attribute>
+ <attribute name="StatsSendPeriod">3000</attribute>
<attribute name="MessagePullPolicy">org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy</attribute>
<attribute name="ClusterRouterFactory">org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory</attribute>
Modified: trunk/src/etc/server/default/deploy/clustered-oracle-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/clustered-oracle-persistence-service.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/etc/server/default/deploy/clustered-oracle-persistence-service.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -83,7 +83,7 @@
<attribute name="GroupName">DefaultPostOffice</attribute>
<attribute name="StateTimeout">5000</attribute>
<attribute name="CastTimeout">5000</attribute>
- <attribute name="StatsSendPeriod">10000</attribute>
+ <attribute name="StatsSendPeriod">3000</attribute>
<attribute name="MessagePullPolicy">org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy</attribute>
<attribute name="ClusterRouterFactory">org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory</attribute>
Modified: trunk/src/etc/server/default/deploy/clustered-postgresql-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/clustered-postgresql-persistence-service.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/etc/server/default/deploy/clustered-postgresql-persistence-service.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -83,7 +83,7 @@
<attribute name="GroupName">DefaultPostOffice</attribute>
<attribute name="StateTimeout">5000</attribute>
<attribute name="CastTimeout">5000</attribute>
- <attribute name="StatsSendPeriod">10000</attribute>
+ <attribute name="StatsSendPeriod">3000</attribute>
<attribute name="MessagePullPolicy">org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy</attribute>
<attribute name="ClusterRouterFactory">org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory</attribute>
Modified: trunk/src/etc/server/default/deploy/clustered-sybase-persistence-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/clustered-sybase-persistence-service.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/etc/server/default/deploy/clustered-sybase-persistence-service.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -84,7 +84,7 @@
<attribute name="GroupName">DefaultPostOffice</attribute>
<attribute name="StateTimeout">5000</attribute>
<attribute name="CastTimeout">5000</attribute>
- <attribute name="StatsSendPeriod">10000</attribute>
+ <attribute name="StatsSendPeriod">3000</attribute>
<attribute name="MessagePullPolicy">org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy</attribute>
<attribute name="ClusterRouterFactory">org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory</attribute>
Modified: trunk/src/etc/server/default/deploy/remoting-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/remoting-service.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/etc/server/default/deploy/remoting-service.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -19,19 +19,16 @@
<invoker transport="bisocket">
<attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
<attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
- <attribute name="serializationtype" isParam="true">jms</attribute>
<attribute name="dataType" isParam="true">jms</attribute>
<attribute name="socket.check_connection" isParam="true">false</attribute>
<attribute name="timeout" isParam="true">0</attribute>
<attribute name="serverBindAddress">${jboss.bind.address}</attribute>
<attribute name="serverBindPort">4457</attribute>
<attribute name="leasePeriod">10000</attribute>
- <attribute name="callbackStore">org.jboss.remoting.callback.CallbackStore</attribute>
<attribute name="clientSocketClass" isParam="true">org.jboss.jms.client.remoting.ClientSocketWrapper</attribute>
<attribute name="serverSocketClass">org.jboss.jms.server.remoting.ServerSocketWrapper</attribute>
- <attribute name="callbackErrorsAllowed">1</attribute>
<attribute name="numberOfRetries" isParam="true">1</attribute>
- <attribute name="NumberOfCallRetries" isParam="true">2</attribute>
+ <attribute name="NumberOfCallRetries" isParam="true">1</attribute>
<attribute name="clientMaxPoolSize" isParam="true">50</attribute>
</invoker>
<handlers>
@@ -39,12 +36,6 @@
</handlers>
</config>
</attribute>
- <depends>jboss.messaging:service=NetworkRegistry</depends>
</mbean>
-
- <!-- TODO: Do I need this> -->
- <mbean code="org.jboss.remoting.network.NetworkRegistry"
- name="jboss.messaging:service=NetworkRegistry"/>
-
</server>
Modified: trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -279,10 +279,8 @@
client.setUnMarshaller(new JMSWireFormat());
Map metadata = new HashMap();
-
+
metadata.put(InvokerLocator.DATATYPE, "jms");
- // Not actually used at present - but it does no harm
- metadata.put(InvokerLocator.SERIALIZATIONTYPE, "jms");
addInvokerCallbackHandler(this, client, metadata, serverLocator, callbackManager);
@@ -331,15 +329,20 @@
// thus silencing both the connection validator and the lease pinger, and also locally
// cleaning up the callback listener
- client.setDisconnectTimeout(0);
+ try
+ {
+ client.setDisconnectTimeout(0);
+ }
+ catch (Throwable ignore)
+ {
+ log.trace(this + " failed to set disconnect timeout", ignore);
+ }
- client.disconnect();
-
try
{
client.removeListener(callbackManager);
}
- catch(Throwable t)
+ catch(Throwable ignore)
{
// very unlikely to get an exception on a local remove (I suspect badly designed API),
// but we're failed anyway, so we don't care too much
@@ -348,10 +351,17 @@
// validator since the validator will disconnect the client before calling the connection
// listener.
- log.debug(this + " failed to cleanly remove callback manager from the client", t);
+ log.trace(this + " failed to cleanly remove callback manager from the client", ignore);
}
- client.disconnect();
+ try
+ {
+ client.disconnect();
+ }
+ catch (Throwable ignore)
+ {
+ log.trace(this + " failed to disconnect the client", ignore);
+ }
}
/**
Modified: trunk/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/ServerPeer.java 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/main/org/jboss/jms/server/ServerPeer.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -50,7 +50,6 @@
import org.jboss.jms.server.plugin.contract.JMSUserManager;
import org.jboss.jms.server.remoting.JMSServerInvocationHandler;
import org.jboss.jms.server.security.SecurityMetadataStore;
-import org.jboss.jms.wireformat.JMSWireFormat;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.Queue;
import org.jboss.messaging.core.memory.MemoryManager;
@@ -71,7 +70,6 @@
import org.jboss.messaging.util.Util;
import org.jboss.messaging.util.Version;
import org.jboss.mx.loading.UnifiedClassLoader3;
-import org.jboss.remoting.marshal.MarshalFactory;
import org.jboss.system.ServiceCreator;
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.util.JBossStringBuilder;
@@ -265,8 +263,6 @@
txRepository.loadPreparedTransactions();
- initializeRemoting(mbeanServer);
-
//Now everything is started we can tell the invocation handler to start handling invocations
//We do this right at the end otherwise it can start handling invocations before we are properly started
JMSServerInvocationHandler.setClosed(false);
@@ -1245,13 +1241,6 @@
// Private --------------------------------------------------------------------------------------
- private void initializeRemoting(MBeanServer mbeanServer) throws Exception
- {
- JMSWireFormat wf = new JMSWireFormat();
-
- MarshalFactory.addMarshaller("jms", wf, wf);
- }
-
private void loadServerAOPConfig() throws Exception
{
URL url = this.getClass().getClassLoader().getResource("aop-messaging-server.xml");
Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultRouter.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultRouter.java 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultRouter.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -179,7 +179,6 @@
public int getNumberOfReceivers()
{
- //FIXME - what about failed over queues????
return nonLocalQueues.size() + (localQueue != null ? 1 : 0);
}
Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/LocalClusteredQueue.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/LocalClusteredQueue.java 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/LocalClusteredQueue.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -110,6 +110,8 @@
public QueueStats getStats()
{
+ if (trace) { log.trace("Getting stats from queue " + this); }
+
// Currently we only return the current message reference count for the channel. Note we are
// only interested in the number of refs in the main queue, not in any deliveries. Also we are
// only interested in the value obtained after delivery is complete. This is so we don't end
@@ -117,18 +119,39 @@
int cnt = getRefCount();
+ /*
+ *
+ * FIXME - temp fix
+ *
+ * Temporarily commented out for
+ * http://jira.jboss.com/jira/browse/JBMESSAGING-971
+ *
+ * Will be fixed properly in
+ * http://jira.jboss.com/jira/browse/JBMESSAGING-972
+ *
+
+ QueueStats stats = null;
+
if (cnt != lastCount)
{
- lastCount = cnt;
+ if (trace) { log.trace("Stats have changed, returning count " + cnt); }
// We only return stats if it has changed since last time - this is so when we only
// broadcast data when necessary.
- return new QueueStats(name, cnt);
+ stats = new QueueStats(name, cnt);
}
else
{
- return null;
+ if (trace) { log.trace("Stats haven't changed, " + cnt + " returning null" ); }
}
+
+ */
+
+ QueueStats stats = new QueueStats(name, cnt);
+
+ lastCount = cnt;
+
+ return stats;
}
public boolean isLocal()
Modified: trunk/tests/bin/runtest
===================================================================
--- trunk/tests/bin/runtest 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/bin/runtest 2007-05-29 16:01:31 UTC (rev 2735)
@@ -19,7 +19,6 @@
ENV_TEST_DATABASE=$TEST_DATABASE
-ENV_TEST_SERIALIZATION=$TEST_SERIALIZATION
ENV_TEST_CLUSTERED=$TEST_CLUSTERED
ENV_TEST_REMOTING=$TEST_REMOTING
ENV_TEST_BIND_ADDRESS=$TEST_BIND_ADDRESS
@@ -38,9 +37,6 @@
TEST_DATABASE=$ENV_TEST_DATABASE
fi
-if [ "$ENV_TEST_SERIALIZATION" != "" ]; then
- TEST_SERIALIZATION=$ENV_TEST_SERIALIZATION
-fi
if [ "$ENV_TEST_CLUSTERED" != "" ]; then
TEST_CLUSTERED=$ENV_TEST_CLUSTERED
fi
Modified: trunk/tests/bin/start-rmi-server
===================================================================
--- trunk/tests/bin/start-rmi-server 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/bin/start-rmi-server 2007-05-29 16:01:31 UTC (rev 2735)
@@ -54,10 +54,6 @@
JAVA_OPTS="$JAVA_OPTS -Dtest.database=$TEST_DATABASE"
fi
-if [ "$TEST_SERIALIZATION" != "" ]; then
- JAVA_OPTS="$JAVA_OPTS -Dtest.serialization=$TEST_SERIALIZATION"
-fi
-
# We need to append the index even if non clustered since we may have many non clustered servers
if [ "$TEST_REMOTING" != "" ]; then
JAVA_OPTS="$JAVA_OPTS -Dtest.remoting=$TEST_REMOTING -Dtest.logfile.suffix=remote-server$index"
Modified: trunk/tests/build.xml
===================================================================
--- trunk/tests/build.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/build.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -58,14 +58,12 @@
-->
<property name="functional.tests.database" value="mysql"/>
- <property name="functional.tests.serialization" value="jms"/>
<!--
Stress tests.
-->
<property name="stress.tests.database" value="mysql"/>
- <property name="stress.tests.serialization" value="jms"/>
<!-- Clustering tests -->
<property name="clustering.tests.database" value="mysql"/>
@@ -290,7 +288,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="test.remoting" value="${test.remoting}"/>
<sysproperty key="java.net.preferIPv4Stack" value="true"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
@@ -311,7 +308,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="test.remoting" value="${test.remoting}"/>
<sysproperty key="java.net.preferIPv4Stack" value="true"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
@@ -333,7 +329,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${clustering.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="test.clustered" value="true"/>
<sysproperty key="java.net.preferIPv4Stack" value="true"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
@@ -354,7 +349,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${stress.tests.database}"/>
- <sysproperty key="test.serialization" value="${stress.tests.serialization}"/>
<sysproperty key="test.remoting" value="${test.remoting}"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
<!-- <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=rmiserver"/> -->
@@ -447,7 +441,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="test.logfile.suffix" value="invm"/>
<sysproperty key="build.lib" value="${build.lib}"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
@@ -504,7 +497,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="test.logfile.suffix" value="invm"/>
<sysproperty key="build.lib" value="${build.lib}"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
@@ -551,7 +543,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="build.lib" value="${build.lib}"/>
<jvmarg value="-Xmx512M"/>
<!--
@@ -592,7 +583,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${stress.tests.database}"/>
- <sysproperty key="test.serialization" value="${stress.tests.serialization}"/>
<sysproperty key="test.logfile.suffix" value="invm"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
<jvmarg value="-Xmx512M"/>
@@ -640,7 +630,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="test.remoting" value="${test.remoting}"/>
<sysproperty key="test.logfile.suffix" value="remote-client"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
@@ -714,7 +703,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${stress.tests.database}"/>
- <sysproperty key="test.serialization" value="${stress.tests.serialization}"/>
<sysproperty key="test.remoting" value="${test.remoting}"/>
<sysproperty key="test.logfile.suffix" value="remote-client"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
@@ -773,7 +761,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${clustering.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="test.clustered" value="true"/>
<sysproperty key="test.logfile.suffix" value="clustering-client"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
@@ -805,12 +792,76 @@
<fileset dir="${build.tests.classes}">
<include name="**/jms/clustering/${test-mask}.class"/>
- <exclude name="**/*LeakTest.class"/>
</fileset>
</batchtest>
</junit>
</target>
+
+ <target name="bridge-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
+ description="Runs the bridge tests">
+
+ <mkdir dir="${build.tests.reports}"/>
+
+ <echo message=""/>
+ <echo message="Running bridge tests, fork=${junit.fork}, junit.batchtest.fork=${junit.batchtest.fork}"/>
+ <echo message=""/>
+
+ <!--
+
+ By default, bridge tests are run in a "remote" configuration (the clustered
+ nodes physically live in different VMs.
+ -->
+
+ <junit printsummary="${junit.printsummary}"
+ fork="${junit.fork}"
+ includeantruntime="yes"
+ haltonerror="${junit.haltonerror}"
+ haltonfailure="${junit.haltonfailure}"
+ showoutput="${junit.showoutput}"
+ timeout="${junit.timeout}">
+
+ <sysproperty key="remote" value="true"/>
+ <sysproperty key="module.output" value="${tests.output}"/>
+ <sysproperty key="test.bind.address" value="${test.bind.address}"/>
+ <sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
+ <sysproperty key="test.database" value="${clustering.tests.database}"/>
+ <sysproperty key="test.clustered" value="false"/>
+ <sysproperty key="test.logfile.suffix" value="clustering-client"/>
+ <sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
+ <jvmarg value="-Xmx512M"/>
+ <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
+ <!--
+ <jvmarg line="-Xmx512M -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=n,suspend=n,address=antjunit"/>
+ -->
+
+ <classpath>
+ <path refid="test.execution.classpath"/>
+ </classpath>
+
+ <sysproperty key="jboss-junit-configuration" value="Clustering"/>
+ <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ usefile="${junit.formatter.usefile}" extension="-Clustering.xml"/>
+
+ <batchtest fork="${junit.batchtest.fork}"
+ todir="${junit.batchtest.todir}"
+ haltonfailure="${junit.batchtest.haltonfailure}"
+ haltonerror="${junit.batchtest.haltonerror}">
+ <formatter type="plain" usefile="${junit.formatter.usefile}"/>
+ <!--
+ I needed a way to intercept the end of a forked ant JUnit test run, in order to
+ perform clean-up, and this is it: register a JUnitTestSuiteListener as a JUnit
+ batchtest formatter, and it will get notified on a endTestSuite() event.
+ -->
+ <formatter classname="org.jboss.test.messaging.tools.ant.JUnitTestSuiteListener"/>
+
+ <fileset dir="${build.tests.classes}">
+ <include name="**/jms/bridge/${test-mask}.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
<target name="memory-leak-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
description="Runs MemoryLeakTests, but it starts the clustering for leak-clustering-tests">
@@ -841,7 +892,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${clustering.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="test.clustered" value="true"/>
<sysproperty key="test.logfile.suffix" value="clustering-client"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
@@ -1037,7 +1087,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="test.remoting" value="${test.remoting}"/>
<sysproperty key="test.logfile.suffix" value="crash"/>
<jvmarg value="-Xmx512M"/>
@@ -1081,7 +1130,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
<jvmarg value="-Xmx512M"/>
<classpath refid="test.execution.classpath"/>
@@ -1120,7 +1168,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
<jvmarg value="-Xmx512M"/>
<classpath refid="test.execution.classpath"/>
@@ -1155,7 +1202,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<jvmarg value="-Xmx512M"/>
<classpath refid="test.execution.classpath"/>
<formatter type="xml" usefile="${junit.formatter.usefile}"/>
@@ -1195,7 +1241,6 @@
<sysproperty key="test.bind.address" value="${test.bind.address}"/>
<sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
<sysproperty key="test.database" value="${functional.tests.database}"/>
- <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
<!--
<jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y"/>
-->
Modified: trunk/tests/etc/container-qalab.xml
===================================================================
--- trunk/tests/etc/container-qalab.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/etc/container-qalab.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -78,15 +78,6 @@
</database-configurations>
<!--
- The serialization type to start the container with. If "test.serialization" is set, it takes
- precedence. Supported values: "jboss" and "java".
- -->
-
- <!-- Must ALWAYS be jms -->
-
- <serialization-type>jms</serialization-type>
-
- <!--
Supported values: "socket", "http"
-->
<remoting-transport>socket</remoting-transport>
Modified: trunk/tests/etc/container.xml
===================================================================
--- trunk/tests/etc/container.xml 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/etc/container.xml 2007-05-29 16:01:31 UTC (rev 2735)
@@ -68,15 +68,6 @@
</database-configurations>
<!--
- The serialization type to start the container with. If "test.serialization" is set, it takes
- precedence. Supported values: "jboss" and "java".
- -->
-
- <!-- Must ALWAYS be jms -->
-
- <serialization-type>jms</serialization-type>
-
- <!--
Supported values: "bisocket", "sslbisocket", "socket", "sslsocket", "http"
-->
<remoting-transport>bisocket</remoting-transport>
Modified: trunk/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -354,30 +354,33 @@
String mbeanConfig =
"<mbean code=\"org.jboss.remoting.transport.Connector\"\n" +
" name=\"" +name + "\"\n" +
- " display-name=\"Socket transport Connector\">\n" +
- "<depends>jboss.messaging:service=NetworkRegistry</depends>\n" +
+ " display-name=\"BiSocket transport Connector\">\n" +
"</mbean>";
String config =
"<attribute name=\"Configuration\">\n" +
- "<config>\n" +
- "<invoker transport=\"socket\">\n" +
- "<attribute name=\"marshaller\" isParam=\"true\">org.jboss.jms.wireformat.JMSWireFormat</attribute>\n" +
- "<attribute name=\"unmarshaller\" isParam=\"true\">org.jboss.jms.wireformat.JMSWireFormat</attribute>\n" +
- "<attribute name=\"serializationtype\" isParam=\"true\">jms</attribute>\n" +
- "<attribute name=\"dataType\" isParam=\"true\">jms</attribute>\n" +
- "<attribute name=\"serverBindPort\">" + port +"</attribute>\n" +
- "<attribute name=\"socket.check_connection\" isParam=\"true\">false</attribute>\n" +
- "<attribute name=\"timeout\">0</attribute>\n" +
- "<attribute name=\"serverBindAddress\">localhost</attribute>\n" +
- "<attribute name=\"leasePeriod\">20000</attribute>\n" +
- "<attribute name=\"clientSocketClass\" isParam=\"true\">org.jboss.jms.client.remoting.ClientSocketWrapper</attribute>\n" +
- "<attribute name=\"serverSocketClass\">org.jboss.jms.server.remoting.ServerSocketWrapper</attribute>\n" +
- "</invoker>\n" +
- "<handlers>\n" +
- "<handler subsystem=\"JMS\">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>\n" +
- "</handlers>\n" +
- "</config>\n" +
+
+ "<config>" +
+ "<invoker transport=\"bisocket\"> " +
+ "<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>" +
+ "<attribute name=\"socket.check_connection\" isParam=\"true\">false</attribute>" +
+ "<attribute name=\"timeout\" isParam=\"true\">0</attribute>" +
+ "<attribute name=\"serverBindAddress\">${jboss.bind.address}</attribute>" +
+ "<attribute name=\"serverBindPort\">" + port +"</attribute>" +
+ "<attribute name=\"leasePeriod\">10000</attribute>" +
+ "<attribute name=\"clientSocketClass\" isParam=\"true\">org.jboss.jms.client.remoting.ClientSocketWrapper</attribute>" +
+ "<attribute name=\"serverSocketClass\">org.jboss.jms.server.remoting.ServerSocketWrapper</attribute>" +
+ "<attribute name=\"numberOfRetries\" isParam=\"true\">1</attribute>" +
+ "<attribute name=\"NumberOfCallRetries\" isParam=\"true\">1</attribute>" +
+ "<attribute name=\"clientMaxPoolSize\" isParam=\"true\">50</attribute>" +
+ "</invoker>" +
+ "<handlers>" +
+ "<handler subsystem=\"JMS\">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>" +
+ "</handlers>" +
+ "</config>" +
+
"</attribute>\n";
ObjectName on = ServerManagement.deploy(mbeanConfig);
Modified: trunk/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTestBase.java 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTestBase.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -124,26 +124,9 @@
ServerManagement.deployQueue("localDestQueue", 0);
- ServerManagement.deployQueue("destQueue", 1);
-
- // Make sure there are no messages in the queues or topics
- removeAllMessages("sourceQueue", true, 0);
-
- removeAllMessages("sourceTopic", false, 0);
-
- removeAllMessages("localDestQueue", true, 0);
-
- removeAllMessages("destQueue", true, 1);
-
+ ServerManagement.deployQueue("destQueue", 1);
}
- private void removeAllMessages(String destName, boolean isQueue, int server) throws Exception
- {
- String on = "jboss.messaging.destination:service=" + (isQueue ? "Queue" : "Topic") + ",name=" + destName;
-
- ServerManagement.getServer(server).invoke(new ObjectName(on), "removeAllMessages", null, null);
- }
-
protected void tearDown() throws Exception
{
try
@@ -246,6 +229,12 @@
sourceTopic = (Topic)ic0.lookup("/topic/sourceTopic");
localDestQueue = (Queue)ic0.lookup("/queue/localDestQueue");
+
+ this.drainDestination(cf0, sourceQueue);
+
+ this.drainDestination(cf1, destQueue);
+
+ this.drainDestination(cf0, localDestQueue);
}
finally
{
Modified: trunk/tests/src/org/jboss/test/messaging/jms/clustering/DistributedQueueTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/clustering/DistributedQueueTest.java 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/src/org/jboss/test/messaging/jms/clustering/DistributedQueueTest.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -83,7 +83,7 @@
conn = cf.createConnection();
- // make sure we're connecting to node 1
+ // make sure we're connecting to node 0
assertEquals(0, ((JBossConnection)conn).getServerID());
Added: trunk/tests/src/org/jboss/test/messaging/jms/clustering/RequestResponseWithPullTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/clustering/RequestResponseWithPullTest.java (rev 0)
+++ trunk/tests/src/org/jboss/test/messaging/jms/clustering/RequestResponseWithPullTest.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -0,0 +1,229 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.messaging.jms.clustering;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+
+import org.jboss.jms.client.JBossConnection;
+import org.jboss.test.messaging.MessagingTestCase;
+import org.jboss.test.messaging.tools.ServerManagement;
+import org.jboss.test.messaging.tools.jmx.ServiceAttributeOverrides;
+
+/**
+ * A test for distributed request-response pattern with message pulling
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision: 2701 $</tt>
+ *
+ * $Id: TemporaryDestinationTest.java 2701 2007-05-17 16:01:05Z timfox $
+ */
+public class RequestResponseWithPullTest extends MessagingTestCase
+{
+ // Constants ------------------------------------------------------------------------------------
+
+ // Static ---------------------------------------------------------------------------------------
+
+ // Attributes -----------------------------------------------------------------------------------
+
+ // Constructors ---------------------------------------------------------------------------------
+
+ public RequestResponseWithPullTest(String name)
+ {
+ super(name);
+ }
+
+ // Public ---------------------------------------------------------------------------------------
+
+ private void removeAllMessages(String destName, boolean isQueue, int server) throws Exception
+ {
+ String on = "jboss.messaging.destination:service=" + (isQueue ? "Queue" : "Topic") + ",name=" + destName;
+
+ ServerManagement.getServer(server).invoke(new ObjectName(on), "removeAllMessages", null, null);
+ }
+
+ public void testDistributedRequestResponse() throws Exception
+ {
+ // start servers with redistribution policies that actually do something
+ ServiceAttributeOverrides attrOverrides = new ServiceAttributeOverrides();
+
+ ObjectName postOfficeObjectName = new ObjectName("jboss.messaging:service=PostOffice");
+
+ attrOverrides.
+ put(postOfficeObjectName, "MessagePullPolicy",
+ "org.jboss.messaging.core.plugin.postoffice.cluster.DefaultMessagePullPolicy");
+
+ attrOverrides.put(postOfficeObjectName, "StatsSendPeriod", new Long(1000));
+
+ ServerManagement.start(0, "all", attrOverrides, true);
+ ServerManagement.start(1, "all", attrOverrides, false);
+
+ ServerManagement.deployQueue("testDistributedQueue", 0);
+ ServerManagement.deployQueue("testDistributedQueue", 1);
+
+ removeAllMessages("testDistributedQueue", true, 0);
+ removeAllMessages("testDistributedQueue", true, 1);
+
+ InitialContext ic0 = new InitialContext(ServerManagement.getJNDIEnvironment(0));
+ InitialContext ic1 = new InitialContext(ServerManagement.getJNDIEnvironment(1));
+
+ ConnectionFactory cf = (ConnectionFactory)ic0.lookup("/ClusteredConnectionFactory");
+
+ Queue queue0 = (Queue)ic0.lookup("/queue/testDistributedQueue");
+ Queue queue1 = (Queue)ic1.lookup("/queue/testDistributedQueue");
+
+ Connection conn0 = null;
+
+ Connection conn1 = null;
+
+ try
+ {
+ conn0 = cf.createConnection();
+
+ conn1 = cf.createConnection();
+
+ assertEquals(0, ((JBossConnection)conn0).getServerID());
+
+ assertEquals(1, ((JBossConnection)conn1).getServerID());
+
+ // Make sure the connections are on different servers
+
+ Session session0 = conn0.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ Queue tempQueue = session0.createTemporaryQueue();
+
+ MessageConsumer cons0 = session0.createConsumer(tempQueue);
+
+ conn0.start();
+
+ class MyListener implements MessageListener
+ {
+ Session sess;
+
+ MyListener(Session sess)
+ {
+ this.sess = sess;
+ }
+
+ public void onMessage(Message msg)
+ {
+ try
+ {
+ log.info("Received message in listener!");
+ Destination dest = msg.getJMSReplyTo();
+ MessageProducer prod = sess.createProducer(dest);
+ TextMessage tm = (TextMessage)msg;
+ String text = tm.getText();
+ tm.clearBody();
+ tm.setText(text + "reply");
+ prod.send(msg);
+ }
+ catch (JMSException e)
+ {
+ log.error("Failed to reply to message", e);
+ fail();
+ }
+ }
+
+ }
+
+
+ Session session1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ MessageConsumer cons1 = session1.createConsumer(queue1);
+
+ MyListener listener = new MyListener(session1);
+
+ cons1.setMessageListener(listener);
+
+ conn1.start();
+
+
+ MessageProducer prod = session0.createProducer(queue0);
+
+ for (int i = 0; i < 20; i++)
+ {
+ TextMessage sm = session0.createTextMessage("hoo ja ma flip" + i);
+
+ sm.setJMSReplyTo(tempQueue);
+
+ log.info("Sending message!");
+
+ prod.send(sm);
+
+ TextMessage tm = (TextMessage)cons0.receive(60000);
+
+ assertNotNull(tm);
+
+ assertEquals(sm.getText() + "reply", tm.getText());
+
+ log.info("Received reply!");
+
+ //Thread.sleep(2000);
+ }
+ }
+ finally
+ {
+ if (conn0 != null)
+ {
+ conn0.close();
+ }
+
+ if (conn1 != null)
+ {
+ conn1.close();
+ }
+ }
+ }
+
+ // Package protected ----------------------------------------------------------------------------
+
+ // Protected ------------------------------------------------------------------------------------
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ log.debug("setup done");
+ }
+
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ // Private --------------------------------------------------------------------------------------
+
+ // Inner classes --------------------------------------------------------------------------------
+
+}
Modified: trunk/tests/src/org/jboss/test/messaging/jms/clustering/TemporaryDestinationTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/clustering/TemporaryDestinationTest.java 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/src/org/jboss/test/messaging/jms/clustering/TemporaryDestinationTest.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -22,7 +22,11 @@
package org.jboss.test.messaging.jms.clustering;
import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
@@ -126,6 +130,7 @@
TextMessage sm = session1.createTextMessage("hoo ja ma flip");
+ log.info("Sending message!");
prod.send(sm);
TextMessage tm = (TextMessage)cons0.receive(3000);
@@ -133,6 +138,8 @@
assertNotNull(tm);
assertEquals(sm.getText(), tm.getText());
+
+ log.info("Received message!");
}
finally
@@ -206,6 +213,7 @@
}
}
}
+
// Package protected ----------------------------------------------------------------------------
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -462,7 +462,6 @@
String transport = config.getRemotingTransport();
log.info("Remoting type: .............. " + (remoting ? transport : "DISABLED"));
- log.info("Serialization type: ......... " + config.getSerializationType());
log.info("Database: ................... " + config.getDatabaseType());
log.info("Clustering mode: ............ " +
(this.isClustered() ? "CLUSTERED" : "NON-CLUSTERED"));
@@ -1357,19 +1356,11 @@
{
// TODO - use remoting-service.xml parameters, not these ...
- String serializationType = config.getSerializationType();
-
- //TODO - Actually serializationType is irrelevant since we pass a DataOutput/InputStream
- // into the marshaller and don't use serialization apart from one specific case with
- // a JMS ObjectMessage in which case Java serialization is always currently used -
- // (we could make this configurable)
-
long clientLeasePeriod = 20000;
String marshallers =
"marshaller=org.jboss.jms.wireformat.JMSWireFormat&" +
"unmarshaller=org.jboss.jms.wireformat.JMSWireFormat&";
- String dataType = "dataType=jms&";
// We use this from thirdparty remoting tests when we don't want to send stuff through
// JMSWireFormat, but we want everything else in the connector's configuration to be
@@ -1377,8 +1368,6 @@
if (overrideMap != null && overrideMap.get(DO_NOT_USE_MESSAGING_MARSHALLERS) != null)
{
marshallers = "";
- dataType = "";
- serializationType = "java";
}
// Note that we DO NOT want the direct thread pool on the server side - since that can lead
@@ -1387,28 +1376,25 @@
String params =
"/?" +
marshallers +
- "serializationtype=" + serializationType + "&" +
- dataType +
"socket.check_connection=false&" +
- "clientLeasePeriod=" + clientLeasePeriod + "&" +
- "callbackStore=org.jboss.remoting.callback.BlockingCallbackStore&" +
- "clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&" +
- "serverSocketClass=org.jboss.jms.server.remoting.ServerSocketWrapper&" +
- "NumberOfRetries=1&" +
- "NumberOfCallRetries=2&" +
- "callbackErrorsAllowed=1";
-
-
-
+ "clientLeasePeriod=" + clientLeasePeriod +
+ "&dataType=jms";
+
// specific parameters per transport
if ("http".equals(transport))
{
- params += "&callbackPollPeriod=" + HTTP_CONNECTOR_CALLBACK_POLL_PERIOD;
+ params += "&callbackPollPeriod=" + HTTP_CONNECTOR_CALLBACK_POLL_PERIOD +
+ "&callbackStore=org.jboss.remoting.callback.BlockingCallbackStore";
}
else
{
- params += "&timeout=0";
+ //socket transports
+ params += "&timeout=0&" +
+ "clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&" +
+ "serverSocketClass=org.jboss.jms.server.remoting.ServerSocketWrapper&" +
+ "NumberOfRetries=1&" +
+ "NumberOfCallRetries=1";
}
if ("sslbisocket".equals(transport) || "sslsocket".equals(transport))
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java 2007-05-27 10:52:45 UTC (rev 2734)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java 2007-05-29 16:01:31 UTC (rev 2735)
@@ -75,7 +75,6 @@
private String database;
private Map dbConfigurations;
- private String serializationType;
private String remotingTransport;
private Boolean clusteredMode;
@@ -132,14 +131,6 @@
}
/**
- * @return the serialization type the container wants the Remoting Connector be configured with.
- */
- public String getSerializationType()
- {
- return serializationType;
- }
-
- /**
* @return the transport the container wants the Remoting Connector to use.
*/
public String getRemotingTransport()
@@ -165,7 +156,6 @@
{
Reader reader = new InputStreamReader(is);
String currentDatabase = null;
- String currentSerializationType = null;
String currentRemotingTransport = null;
boolean currentClusteredMode = DEFAULT_CLUSTERED_MODE;
@@ -202,10 +192,6 @@
{
currentDatabase = XMLUtil.getTextContent(n);
}
- else if ("serialization-type".equals(name))
- {
- currentSerializationType = XMLUtil.getTextContent(n);
- }
else if ("remoting-transport".equals(name))
{
currentRemotingTransport = XMLUtil.getTextContent(n);
@@ -223,7 +209,6 @@
}
setCurrentDatabase(currentDatabase);
- setCurrentSerializationType(currentSerializationType);
setCurrentRemotingTransport(currentRemotingTransport);
setCurrentClusteredMode(currentClusteredMode);
}
@@ -246,19 +231,6 @@
}
}
- /**
- * Always the value of "test.serialization" system property takes precedence over the
- * configuration file value.
- */
- private void setCurrentSerializationType(String xmlConfigSerializationType)
- {
- serializationType = System.getProperty("test.serialization");
- if (serializationType == null)
- {
- serializationType = xmlConfigSerializationType;
- }
- }
-
private void setCurrentRemotingTransport(String xmlRemotingTransport)
{
remotingTransport = System.getProperty("test.remoting");
More information about the jboss-cvs-commits
mailing list