[jboss-cvs] JBoss Messaging SVN: r5774 - in branches/Branch_1416_merge: docs and 54 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Feb 2 06:07:00 EST 2009
Author: gaohoward
Date: 2009-02-02 06:06:59 -0500 (Mon, 02 Feb 2009)
New Revision: 5774
Added:
branches/Branch_1416_merge/docs/examples/bridge/build.xml.AS5
branches/Branch_1416_merge/docs/examples/destinations/
branches/Branch_1416_merge/docs/examples/destinations/jbm-examples-destinations-service.xml
branches/Branch_1416_merge/docs/examples/distributed-queue/build.xml.AS5
branches/Branch_1416_merge/docs/examples/distributed-topic/build.xml.AS5
branches/Branch_1416_merge/docs/examples/ejb3mdb/build.xml.AS5
branches/Branch_1416_merge/docs/examples/http/build.xml.AS5
branches/Branch_1416_merge/docs/examples/mdb-failure/build.xml.AS5
branches/Branch_1416_merge/docs/examples/mdb/build.xml.AS5
branches/Branch_1416_merge/docs/examples/queue-failover/build.xml.AS5
branches/Branch_1416_merge/docs/examples/queue/build.xml.AS5
branches/Branch_1416_merge/docs/examples/secure-socket/build.xml.AS5
branches/Branch_1416_merge/docs/examples/servlet/
branches/Branch_1416_merge/docs/examples/servlet/README.html
branches/Branch_1416_merge/docs/examples/servlet/build.xml
branches/Branch_1416_merge/docs/examples/servlet/etc/
branches/Branch_1416_merge/docs/examples/servlet/etc/jndi.properties
branches/Branch_1416_merge/docs/examples/servlet/etc/log4j.xml
branches/Branch_1416_merge/docs/examples/servlet/etc/messaging-servlet-service.xml
branches/Branch_1416_merge/docs/examples/servlet/src/
branches/Branch_1416_merge/docs/examples/servlet/src/org/
branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/
branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/
branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/
branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/servlet/
branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/servlet/ServletExample.java
branches/Branch_1416_merge/docs/examples/stateless-clustered/build.xml.AS5
branches/Branch_1416_merge/docs/examples/stateless/build.xml.AS5
branches/Branch_1416_merge/docs/examples/topic/build.xml.AS5
branches/Branch_1416_merge/docs/examples/web-service/build.xml.AS5
branches/Branch_1416_merge/integration/EAP4/etc/remoting/remoting-servlet-service.xml
branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/
branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/
branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/web.xml
branches/Branch_1416_merge/src/main/org/jboss/jms/client/SecurityActions.java
branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/SecurityActions.java
branches/Branch_1416_merge/src/main/org/jboss/jms/wireformat/SecurityActions.java
branches/Branch_1416_merge/src/main/org/jboss/messaging/util/SecurityActions.java
branches/Branch_1416_merge/tests/bin/loop-clustered
Removed:
branches/Branch_1416_merge/docs/examples/destinations/jbm-examples-destinations-service.xml
branches/Branch_1416_merge/docs/examples/ejb3mdb/etc/META-INF/ejb-jar.xml
branches/Branch_1416_merge/docs/examples/ejb3mdb/etc/META-INF/jboss.xml
branches/Branch_1416_merge/docs/examples/servlet/README.html
branches/Branch_1416_merge/docs/examples/servlet/build.xml
branches/Branch_1416_merge/docs/examples/servlet/etc/
branches/Branch_1416_merge/docs/examples/servlet/etc/jndi.properties
branches/Branch_1416_merge/docs/examples/servlet/etc/log4j.xml
branches/Branch_1416_merge/docs/examples/servlet/etc/messaging-servlet-service.xml
branches/Branch_1416_merge/docs/examples/servlet/src/
branches/Branch_1416_merge/docs/examples/servlet/src/org/
branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/
branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/
branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/
branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/servlet/
branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/servlet/ServletExample.java
branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/
branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/web.xml
Modified:
branches/Branch_1416_merge/.classpath
branches/Branch_1416_merge/build-messaging-AS5.xml
branches/Branch_1416_merge/build-messaging-EAP4.xml
branches/Branch_1416_merge/build-messaging.xml
branches/Branch_1416_merge/build-thirdparty-AS5.xml
branches/Branch_1416_merge/build-thirdparty-EAP4.xml
branches/Branch_1416_merge/build.properties
branches/Branch_1416_merge/docs/README.html
branches/Branch_1416_merge/docs/examples/
branches/Branch_1416_merge/docs/examples/bridge/build.xml
branches/Branch_1416_merge/docs/examples/bridge/etc/test-bridge-service.xml
branches/Branch_1416_merge/docs/examples/distributed-queue/
branches/Branch_1416_merge/docs/examples/distributed-queue/README.html
branches/Branch_1416_merge/docs/examples/distributed-queue/build.xml
branches/Branch_1416_merge/docs/examples/distributed-topic/
branches/Branch_1416_merge/docs/examples/distributed-topic/README.html
branches/Branch_1416_merge/docs/examples/distributed-topic/build.xml
branches/Branch_1416_merge/docs/examples/ejb3mdb/
branches/Branch_1416_merge/docs/examples/ejb3mdb/build.xml
branches/Branch_1416_merge/docs/examples/http/README.html
branches/Branch_1416_merge/docs/examples/http/build.xml
branches/Branch_1416_merge/docs/examples/mdb-failure/
branches/Branch_1416_merge/docs/examples/mdb-failure/build.xml
branches/Branch_1416_merge/docs/examples/mdb/
branches/Branch_1416_merge/docs/examples/mdb/build.xml
branches/Branch_1416_merge/docs/examples/queue-failover/README.html
branches/Branch_1416_merge/docs/examples/queue-failover/build.xml
branches/Branch_1416_merge/docs/examples/queue/build.xml
branches/Branch_1416_merge/docs/examples/secure-socket/build.xml
branches/Branch_1416_merge/docs/examples/stateless-clustered/README.html
branches/Branch_1416_merge/docs/examples/stateless-clustered/build.xml
branches/Branch_1416_merge/docs/examples/stateless/
branches/Branch_1416_merge/docs/examples/stateless/build.xml
branches/Branch_1416_merge/docs/examples/topic/
branches/Branch_1416_merge/docs/examples/topic/build.xml
branches/Branch_1416_merge/docs/userguide/en/modules/about.xml
branches/Branch_1416_merge/docs/userguide/en/modules/configuration.xml
branches/Branch_1416_merge/docs/userguide/en/modules/installation.xml
branches/Branch_1416_merge/docs/userguide/en/modules/runningexamples.xml
branches/Branch_1416_merge/integration/AS5/etc/remoting/remoting-sslbisocket-service.xml
branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/db2-persistence-service.xml
branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/mssql-persistence-service.xml
branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/mysql-persistence-service.xml
branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/ndb-persistence-service.xml
branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/null-persistence-service.xml
branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/oracle-persistence-service.xml
branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/postgresql-persistence-service.xml
branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/sybase-persistence-service.xml
branches/Branch_1416_merge/src/main/org/jboss/jms/client/ClientAOPStackLoader.java
branches/Branch_1416_merge/src/main/org/jboss/jms/client/container/ClientConsumer.java
branches/Branch_1416_merge/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
branches/Branch_1416_merge/src/main/org/jboss/jms/server/bridge/Bridge.java
branches/Branch_1416_merge/src/main/org/jboss/jms/server/bridge/BridgeService.java
branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/SecurityActions.java
branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
branches/Branch_1416_merge/src/main/org/jboss/jms/tx/MessagingXAResource.java
branches/Branch_1416_merge/src/main/org/jboss/jms/tx/ResourceManager.java
branches/Branch_1416_merge/src/main/org/jboss/jms/wireformat/SerializedPacket.java
branches/Branch_1416_merge/src/main/org/jboss/messaging/core/contract/Delivery.java
branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/ChannelSupport.java
branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/PagingChannelSupport.java
branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/SimpleDelivery.java
branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
branches/Branch_1416_merge/src/main/org/jboss/messaging/util/JBMExecutor.java
branches/Branch_1416_merge/src/main/org/jboss/messaging/util/ObjectInputStreamWithClassLoader.java
branches/Branch_1416_merge/src/main/org/jboss/messaging/util/OrderedExecutorFactory.java
branches/Branch_1416_merge/tests/bin/.testrc.example
branches/Branch_1416_merge/tests/bin/runtest
branches/Branch_1416_merge/tests/bin/stop-rmi-server
branches/Branch_1416_merge/tests/build.properties
branches/Branch_1416_merge/tests/build.xml
branches/Branch_1416_merge/tests/etc/container.xml
branches/Branch_1416_merge/tests/etc/server/default/deploy/mock-channelfactory-stacks.xml
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/core/PostOfficeTestBase.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/core/postoffice/ClusteredPersistenceServiceConfigFileJChannelFactory.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/JMSTestCase.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/RemotingConnectionConfigurationTest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/ScheduledDeliveryTest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/XARecoveryTest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/XATest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeMBeanTest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTestBase.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/ReconnectTest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/ReconnectWithRecoveryTest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/SimpleCrashWithRestartTest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/clustering/ClusterViewUpdateTest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java
branches/Branch_1416_merge/tests/src/org/jboss/test/thirdparty/remoting/ClientInvokerTimeoutTest.java
Log:
merge back from Branch_1_4 to continue 1416
Modified: branches/Branch_1416_merge/.classpath
===================================================================
--- branches/Branch_1416_merge/.classpath 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/.classpath 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,119 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="src" path="docs/examples/queue-failover/src"/>
+ <classpathentry kind="src" path="integration/EAP4/src"/>
+ <classpathentry kind="src" path="integration/EAP4/tests-src"/>
<classpathentry kind="src" path="docs/examples/bridge/src"/>
- <classpathentry kind="src" path="integration/AS5/tests-src"/>
- <classpathentry kind="src" path="integration/AS5/src"/>
- <classpathentry kind="src" path="docs/examples/common/src"/>
+ <classpathentry kind="src" path="docs/examples/stateless-clustered/src"/>
+ <classpathentry kind="src" path="docs/examples/web-service/src-client"/>
+ <classpathentry kind="src" path="docs/examples/web-service/src"/>
+ <classpathentry kind="src" path="docs/examples/mdb-failure/src"/>
<classpathentry kind="src" path="docs/examples/distributed-queue/src"/>
+ <classpathentry kind="src" path="output/gen-parsers"/>
+ <classpathentry kind="src" path="docs/examples/common/src"/>
<classpathentry kind="src" path="docs/examples/distributed-topic/src"/>
<classpathentry kind="src" path="docs/examples/ejb3mdb/src"/>
<classpathentry kind="src" path="docs/examples/http/src"/>
- <classpathentry kind="src" path="docs/examples/mdb-failure/src"/>
<classpathentry kind="src" path="docs/examples/mdb/src"/>
- <classpathentry kind="src" path="docs/examples/queue-failover/src"/>
+ <classpathentry kind="src" path="docs/examples/ordering-group/src"/>
<classpathentry kind="src" path="docs/examples/queue/src"/>
<classpathentry kind="src" path="docs/examples/secure-socket/src"/>
- <classpathentry kind="src" path="docs/examples/stateless-clustered/src"/>
<classpathentry kind="src" path="docs/examples/stateless/src"/>
<classpathentry kind="src" path="docs/examples/topic/src"/>
- <classpathentry kind="src" path="docs/examples/web-service/src"/>
- <classpathentry kind="src" path="docs/examples/web-service/src-client"/>
- <classpathentry kind="src" path="output/gen-parsers"/>
- <classpathentry kind="src" path="src/main"/>
- <classpathentry kind="src" path="tests/src"/>
- <classpathentry kind="lib" path="lib/docbook-support/support/lib/avalon-framework-cvs-20020806.jar"/>
- <classpathentry kind="lib" path="lib/docbook-support/support/lib/batik.jar"/>
- <classpathentry kind="lib" path="lib/docbook-support/support/lib/fop.jar"/>
- <classpathentry kind="lib" path="lib/docbook-support/support/lib/jai_codec.jar"/>
- <classpathentry kind="lib" path="lib/docbook-support/support/lib/jai_core.jar"/>
- <classpathentry kind="lib" path="lib/docbook-support/support/lib/rowan-0.1.jar"/>
- <classpathentry kind="lib" path="output/lib/jboss-messaging.jar"/>
+ <classpathentry excluding="**/.svn/**/*" kind="src" path="src/main"/>
+ <classpathentry excluding="**/.svn/**/*" kind="src" path="tests/src"/>
+ <classpathentry kind="lib" path="thirdparty/oswego-concurrent/lib/concurrent.jar" sourcepath="/extra/work-clebert/concurrent/concurrent/src"/>
+ <classpathentry kind="lib" path="thirdparty/jgroups/lib/jgroups.jar"/>
<classpathentry kind="lib" path="thirdparty/apache-log4j/lib/log4j.jar"/>
+ <classpathentry kind="lib" path="thirdparty/junit/lib/junit.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jboss/profiler/jvmti/lib/jboss-profiler-jvmti.jar"/>
+ <classpathentry kind="lib" path="thirdparty/hsqldb/lib/hsqldb.jar"/>
<classpathentry kind="lib" path="thirdparty/apache-logging/lib/commons-logging.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-modeler/lib/commons-modeler.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/catalina-manager.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/catalina-optional.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/catalina.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/jasper-compiler-jdt.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/jasper-compiler.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/jasper-runtime.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/naming-resources.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/servlets-default.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/servlets-invoker.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/servlets-webdav.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/tomcat-ajp.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/tomcat-apr.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/tomcat-coyote.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/tomcat-http.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-tomcat/lib/tomcat-util.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jboss/serialization/lib/jboss-serialization.jar"/>
+ <classpathentry kind="lib" path="thirdparty/sun-javacc/lib/javacc.jar"/>
<classpathentry kind="lib" path="thirdparty/apache-xerces/lib/xercesImpl.jar"/>
- <classpathentry kind="lib" path="thirdparty/commons-el/lib/commons-el.jar"/>
<classpathentry kind="lib" path="thirdparty/dom4j/lib/dom4j.jar"/>
- <classpathentry kind="lib" path="thirdparty/hsqldb/lib/hsqldb.jar"/>
<classpathentry kind="lib" path="thirdparty/javassist/lib/javassist.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jdk14-pluggable-instrumentor.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jrockit-pluggable-instrumentor.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss/aop/lib/pluggable-instrumentor.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/backport-concurrent/lib/jboss-backport-concurrent.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/jbossretro-rt/lib/jbossretro-rt.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/jbossts14/lib/jbossjta-integration.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/jbossts14/lib/jbossjta.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/jbossts14/lib/jbossts-common.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/jbossxb/lib/jboss-xml-binding-sources.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/profiler/jvmti/lib/jboss-profiler-jvmti.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/remoting/lib/jboss-remoting-src.jar"/>
+ <classpathentry kind="lib" path="thirdparty/retrotranslator/lib/backport-util-concurrent.jar"/>
+ <classpathentry kind="lib" path="thirdparty/retrotranslator/lib/retrotranslator-runtime.jar"/>
+ <classpathentry kind="lib" path="thirdparty/retrotranslator/lib/retrotranslator-transformer.jar"/>
+ <classpathentry kind="lib" path="thirdparty/trove/lib/trove.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss/remoting/lib/jboss-remoting.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/serialization/lib/jboss-serialization.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/test14/lib/jboss-test14.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-common-jdbc-wrapper.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jboss/jbossts14/lib/jbossjta.jar"/>
+ <classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
+ <classpathentry kind="var" path="ANT_HOME/lib/ant-junit.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jboss/common/lib/jboss-common.jar"/>
<classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-j2ee.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-jca.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-local-jdbc.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jboss-aop.jar"/>
<classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
<classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-transaction-client.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-xml-binding.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jbosscx-client.jar"/>
<classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jbosssx-client.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss.jar"/>
<classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jms-ra.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jnp-client.jar"/>
- <classpathentry kind="lib" path="thirdparty/junit/lib/junit.jar"/>
- <classpathentry kind="lib" path="thirdparty/oswego-concurrent/lib/concurrent.jar"/>
- <classpathentry kind="lib" path="thirdparty/retrotranslator/lib/backport-util-concurrent.jar"/>
- <classpathentry kind="lib" path="thirdparty/retrotranslator/lib/retrotranslator-runtime.jar"/>
- <classpathentry kind="lib" path="thirdparty/retrotranslator/lib/retrotranslator-transformer.jar"/>
- <classpathentry kind="lib" path="thirdparty/sun-javacc/lib/javacc.jar"/>
- <classpathentry kind="lib" path="thirdparty/trove/lib/trove.jar"/>
- <classpathentry kind="lib" path="thirdparty/wutka-dtdparser/lib/dtdparser.jar"/>
- <classpathentry kind="lib" path="tools/lib/jbossbuild.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-common-jdbc-wrapper.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jbosscx-client.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-jca.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-local-jdbc.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossas/core-libs/lib/jboss-xml-binding.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="output/lib/jboss-messaging-client.jar"/>
- <classpathentry kind="var" path="ANT_HOME/lib/ant-junit.jar"/>
- <classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
- <classpathentry kind="lib" path="thirdparty/jgroups/lib/jgroups.jar" sourcepath="thirdparty/jgroups/lib/jgroups-sources.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-log4j/lib/snmpTrapAppender.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-logging/lib/commons-logging-src.zip"/>
- <classpathentry kind="lib" path="thirdparty/apache-xerces/lib/resolver.jar"/>
- <classpathentry kind="lib" path="thirdparty/apache-xerces/lib/xml-apis.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/common-core/lib/jboss-common-core.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/common-core/lib/jboss-common-core-sources.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/common-logging-jdk/lib/jboss-logging-jdk.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/common-logging-jdk/lib/jboss-logging-jdk-sources.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/common-logging-log4j/lib/jboss-logging-log4j.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/common-logging-log4j/lib/jboss-logging-log4j-sources.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/common-logging-spi/lib/jboss-logging-spi.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/common-logging-spi/lib/jboss-logging-spi-sources.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/jboss-mdr/lib/jboss-mdr.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/jboss-mdr/lib/jboss-mdr-sources.jar"/>
- <classpathentry kind="lib" path="thirdparty/jgroups/lib/jgroups-sources.jar"/>
- <classpathentry kind="lib" path="thirdparty/oswego-concurrent/lib/concurrent-src.zip"/>
- <classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jboss-standalone-aspect-library-jdk50.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jboss-aop-asintegration-core.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jboss-aop-asintegration-jmx.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jboss-aop-asintegration-mc.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jboss-aop-client.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss/aop/lib/jboss-aop.jar"/>
- <classpathentry kind="output" path="tests/output/classes"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/Branch_1416_merge/build-messaging-AS5.xml
===================================================================
--- branches/Branch_1416_merge/build-messaging-AS5.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/build-messaging-AS5.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -28,7 +28,7 @@
<path refid="jboss.jboss.mdr.classpath"/>
<path refid="jboss.aop.classpath"/>
<path refid="jboss.remoting.classpath"/>
- <path refid="jboss.jbossts14.classpath"/>
+ <path refid="jboss.jbossts.classpath"/>
<path refid="jbossas.core.libs.classpath"/>
<!-- some components at JBoss use JBossSerialization (JCA for instance) -->
<path refid="jboss.serialization.classpath"/>
@@ -64,5 +64,30 @@
</aopc>
</target>
+ <!-- Note: This target must be ran after the smoke test -->
+ <target name="examples" depends="release-structure">
+ <copy todir="${release.output}/examples">
+ <fileset dir="./docs/examples" excludes="examples.properties">
+ <exclude name="programmatic-deployment"/>
+ <exclude name="stateless-clustered/**"/>
+ <exclude name="**/*/build.xml*"/>
+ </fileset>
+ </copy>
+ <copy todir="${release.output}/examples">
+ <fileset dir="./docs/examples">
+ <exclude name="stateless-clustered/**"/>
+ </fileset>
+ <globmapper from="*build.xml.AS5" to="*build.xml"/>
+ </copy>
+ <copy todir="${release.output}/examples/config">
+ <fileset dir="${integration-dir}/etc/server/default/deploy">
+ <include name="*-persistence-service.xml"/>
+ <include name="*-ds.xml"/>
+ </fileset>
+ <fileset dir="${integration-dir}/etc/remoting">
+ <include name="*-service.xml"/>
+ </fileset>
+ </copy>
+ </target>
-</project>
\ No newline at end of file
+</project>
Modified: branches/Branch_1416_merge/build-messaging-EAP4.xml
===================================================================
--- branches/Branch_1416_merge/build-messaging-EAP4.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/build-messaging-EAP4.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -58,5 +58,26 @@
</aopc>
</target>
+ <!-- Note: This target must be ran after the smoke test -->
+ <target name="examples" depends="release-structure">
-</project>
\ No newline at end of file
+ <copy todir="${release.output}/examples">
+ <fileset dir="./docs/examples" excludes="examples.properties">
+ <exclude name="programmatic-deployment"/>
+ <exclude name="**/*/build.xml.AS5"/>
+ </fileset>
+ </copy>
+ <copy todir="${release.output}/examples/config">
+ <fileset dir="${integration-dir}/etc/server/default/deploy">
+ <include name="*-persistence-service.xml"/>
+ <include name="*-ds.xml"/>
+ </fileset>
+ <fileset dir="${integration-dir}/etc/remoting">
+ <include name="servlet-invoker.war/**/*"/>
+ <include name="*-service.xml"/>
+ </fileset>
+ </copy>
+ </target>
+
+
+</project>
Modified: branches/Branch_1416_merge/build-messaging.xml
===================================================================
--- branches/Branch_1416_merge/build-messaging.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/build-messaging.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -51,11 +51,11 @@
<property name="messaging.version.major" value="1"/>
<property name="messaging.version.minor" value="4"/>
- <property name="messaging.version.revision" value="1"/>
- <property name="messaging.version.incrementing" value="27"/>
- <property name="messaging.version.tag" value="GA"/>
- <property name="messaging.version.name" value="Cheese Steak Austin Sandwich"/>
- <property name="messaging.version.cvstag" value="JBossMessaging_1_4_1_GA"/>
+ <property name="messaging.version.revision" value="0"/>
+ <property name="messaging.version.incrementing" value="28"/>
+ <property name="messaging.version.tag" value="SP3-CP06"/>
+ <property name="messaging.version.name" value="Hotpot"/>
+ <property name="messaging.version.cvstag" value="JBossMessaging_1_4_0_SP3_CP06"/>
<property name="module.name" value="messaging"/>
<property name="module.Name" value="JBoss Messaging"/>
<property name="module.version" value="${messaging.version.major}.${messaging.version.minor}.${messaging.version.revision}.${messaging.version.tag}"/>
@@ -441,25 +441,6 @@
<mkdir dir="${release.output}/test-results"/>
</target>
- <!-- Note: This target must be ran after the smoke test -->
- <target name="examples" depends="release-structure">
-
- <copy todir="${release.output}/examples">
- <fileset dir="./docs/examples" excludes="examples.properties">
- <exclude name="programmatic-deployment"/>
- </fileset>
- </copy>
- <copy todir="${release.output}/examples/config">
- <fileset dir="${integration-dir}/etc/server/default/deploy">
- <include name="*-persistence-service.xml"/>
- <include name="*-ds.xml"/>
- </fileset>
- <fileset dir="${integration-dir}/etc/remoting">
- <include name="*-service.xml"/>
- </fileset>
- </copy>
- </target>
-
<target name="userdoc" depends="release-structure">
<ant dir="./docs/userguide" antfile="build.xml" target="all"/>
@@ -549,6 +530,7 @@
<target name="clean">
<delete dir="${project.output}" quiet="true"/>
+ <delete dir="${release.output}" quiet="true"/>
<ant dir="./docs/examples/queue" antfile="build.xml" inheritAll="false" target="clean"/>
<ant dir="./docs/examples/topic" antfile="build.xml" inheritAll="false" target="clean"/>
Modified: branches/Branch_1416_merge/build-thirdparty-AS5.xml
===================================================================
--- branches/Branch_1416_merge/build-thirdparty-AS5.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/build-thirdparty-AS5.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -85,16 +85,16 @@
<componentref name="oswego-concurrent" version="1.3.4-jboss-update1"/>
<componentref name="apache-log4j" version="1.2.14"/>
<componentref name="javassist" version="3.9.0.GA"/>
- <componentref name="jgroups" version="2.6.6.GA"/>
+ <componentref name="jgroups" version="2.6.7.GA"/>
<componentref name="trove" version="1.0.2"/>
<componentref name="jboss/common-core" version="2.2.8.GA"/>
<componentref name="jboss/common-logging-jdk" version="2.0.2.GA"/>
<componentref name="jboss/common-logging-log4j" version="2.0.2.GA"/>
<componentref name="jboss/common-logging-spi" version="2.0.2.GA"/>
<componentref name="jboss/jboss-mdr" version="2.0.0.Beta12"/>
- <componentref name="jboss/aop" version="2.0.0.GA"/>
- <componentref name="jboss/remoting" version="2.5.0.SP1"/>
- <componentref name="jboss/jbossts14" version="4.2.3.SP7"/>
+ <componentref name="jboss/aop" version="2.0.0.SP1"/>
+ <componentref name="jboss/remoting" version="2.5.0.SP2"/>
+ <componentref name="jboss/jbossts" version="4.4.0.GA"/>
<componentref name="jbossas/core-libs" version="4.2.0.GA"/>
Modified: branches/Branch_1416_merge/build-thirdparty-EAP4.xml
===================================================================
--- branches/Branch_1416_merge/build-thirdparty-EAP4.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/build-thirdparty-EAP4.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -85,12 +85,12 @@
<componentref name="oswego-concurrent" version="1.3.4.patch01-brew"/>
<componentref name="apache-log4j" version="1.2.14-brew"/>
<componentref name="javassist" version="3.8.0.GA-brew"/>
- <componentref name="jgroups" version="2.4.4.GA-brew"/>
+ <componentref name="jgroups" version="2.4.5.GA-brew"/>
<componentref name="trove" version="1.0.2-brew"/>
<componentref name="jboss/common" version="1.2.1.GA-brew"/>
<componentref name="jboss/aop" version="1.5.5.GA_CP03-brew"/>
- <componentref name="jboss/remoting" version="2.2.2.SP10-brew"/>
- <componentref name="jboss/jbossts14" version="4.2.3.SP5_CP02-brew"/>
+ <componentref name="jboss/remoting" version="2.2.2.SP11-brew"/>
+ <componentref name="jboss/jbossts14" version="4.2.3.SP5_CP04-brew"/>
<componentref name="jbossas/core-libs" version="4.2.0.GA"/>
@@ -111,6 +111,7 @@
<componentref name="jboss/profiler/jvmti" version="1.0.0.CR5-brew"/>
<componentref name="jboss/jbossxb" version="1.0.0.SP1-brew"/>
<componentref name="jboss/test14" version="1.0.0.GA"/>
+ <componentref name="sun-servlet" version="2.4"/>
<!-- This is a non declared dependency of jboss/test14 -->
<componentref name="jboss/jbossretro-rt" version="1.0.5.GA"/>
Modified: branches/Branch_1416_merge/build.properties
===================================================================
--- branches/Branch_1416_merge/build.properties 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/build.properties 2009-02-02 11:06:59 UTC (rev 5774)
@@ -8,5 +8,5 @@
# AS4 - integration against JBoss 4.x
#############################################################################################################
-integration.base=AS5
-#integration.base=EAP4
+#integration.base=AS5
+integration.base=EAP4
Modified: branches/Branch_1416_merge/docs/README.html
===================================================================
--- branches/Branch_1416_merge/docs/README.html 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/README.html 2009-02-02 11:06:59 UTC (rev 5774)
@@ -3,23 +3,26 @@
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
- <title>Release Notes - JBoss Messaging - Version 1.4.1.GA</title>
+ <title>Release Notes - JBoss Messaging - Version 1.4.0.SP3.CP05.</title>
</head>
<body>
-<h1>Release Notes - JBoss Messaging - Version 1.4.1.GA</h1>
+<h1>Release Notes - JBoss Messaging - Version 1.4.0.SP3.CP05</h1>
<br>
-<h2>7 November 2008</h2>
+<h2>14 January 2009</h2>
+These are the release notes for JBoss Messaging 1.4.0.SP3.CP05<br><br>
-<p>JBoss Messaging Version 1.4.1.GA is a release made and tested exclusively for the <b>JBoss 5.0.0.GA only</b> and it should be part of the JBoss5 download bundle.</p>
+For full description of the contents please see the <a href="https://jira.jboss.org/jira/secure/ReleaseNote.jspa?version=12312843&styleName=Html&projectId=12310061">JBoss Messaging project JIRA.</a><br><br>
-<p>For the full description of this release, see the <a href="https://jira.jboss.org/jira/secure/ReleaseNote.jspa?version=12312911&styleName=Html&projectId=12310061&Create=Create">JBoss Messaging project JIRA.</a></p>
+When upgrading an existing installation be sure to update all the configuration files in server/<server name>/deploy/jboss-messaging.sar with the newer versions and replace jboss-messaging.jar in server/<server name>/lib and on the client classpath. You don't need to drop all tables and indexes in the database.<br><br>
-<p>Enjoy!</p>
+This release of JBoss Messaging also requires specific versions of JBoss Remoting, JBoss AOP and Javassist. For the correct versions see the user-guide installation section. Be sure that server/<server name>/lib contains these jar and they are also present as the first entry on the client classpath. This is critical to ensure proper operation of JBoss Messaging!<br><br>
+Enjoy!<br><br>
+
</body>
</html>
Property changes on: branches/Branch_1416_merge/docs/examples
___________________________________________________________________
Name: svn:ignore
+ output
Modified: branches/Branch_1416_merge/docs/examples/bridge/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/bridge/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/bridge/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -33,10 +33,16 @@
</path>
<path id="execution.classpath">
- <pathelement path="./etc" />
- <pathelement path="../common/output/classes" />
- <pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <pathelement path="./etc"/>
+ <pathelement path="../common/output/classes"/>
+ <pathelement path="./output/classes"/>
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar"/>
+ <fileset file="${jboss.home}/client/jbossall-client.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar"/>
</path>
<target name="identify">
Copied: branches/Branch_1416_merge/docs/examples/bridge/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/bridge/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/bridge/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/bridge/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 2705 2007-05-17 21:34:07Z clebert.suconic at jboss.com $
+
+ -->
+
+<project name="BridgeExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging" />
+ <property name="example.source.queue" value="A" />
+ <property name="example.target.queue" value="B" />
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-j2ee.jar" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the BRIDGE example #" />
+ <echo message="###########################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.name}" />
+ <fail message="Could not find client jar ${messaging.client.jar.name}" unless="client.jar.present" />
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="deploy" depends="compile">
+ <copy file="./etc/test-bridge-service.xml" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <antcall target="sleep">
+ <param name="sleep.interval" value="5" />
+ </antcall>
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/test-bridge-service.xml" quiet="true" />
+ </target>
+
+ <target name="run" depends="deploy">
+ <java classname="org.jboss.example.jms.bridge.BridgeExample" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.source.queue" value="${example.source.queue}" />
+ <sysproperty key="example.target.queue" value="${example.target.queue}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ <antcall target="undeploy" />
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..." />
+ <sleep seconds="${sleep.interval}" />
+ </target>
+
+</project>
+
Modified: branches/Branch_1416_merge/docs/examples/bridge/etc/test-bridge-service.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/bridge/etc/test-bridge-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/bridge/etc/test-bridge-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -14,10 +14,10 @@
xmbean-dd="xmdesc/Bridge-xmbean.xml">
<!-- The JMS provider loader that is used to lookup the source destination -->
- <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>
+ <depends optional-attribute-name="SourceProviderLoader">jboss.jms:service=JMSProviderLoader,name=JMSProvider</depends>
<!-- The JMS provider loader that is used to lookup the target destination -->
- <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>
+ <depends optional-attribute-name="TargetProviderLoader">jboss.jms:service=JMSProviderLoader,name=JMSProvider</depends>
<!-- The JNDI lookup for the source destination -->
<attribute name="SourceDestinationLookup">/queue/A</attribute>
Copied: branches/Branch_1416_merge/docs/examples/destinations (from rev 5773, branches/Branch_1_4/docs/examples/destinations)
Deleted: branches/Branch_1416_merge/docs/examples/destinations/jbm-examples-destinations-service.xml
===================================================================
--- branches/Branch_1_4/docs/examples/destinations/jbm-examples-destinations-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/destinations/jbm-examples-destinations-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Messaging Example Destinations
- -->
-
-<server>
- <mbean code="org.jboss.jms.server.destination.TopicService"
- name="jboss.messaging.destination:service=Topic,name=testTopic"
- xmbean-dd="xmdesc/Topic-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="SecurityConfig">
- <security>
- <role name="guest" read="true" write="true"/>
- <role name="publisher" read="true" write="true" create="false"/>
- <role name="durpublisher" read="true" write="true" create="true"/>
- </security>
- </attribute>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.TopicService"
- name="jboss.messaging.destination:service=Topic,name=securedTopic"
- xmbean-dd="xmdesc/Topic-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="SecurityConfig">
- <security>
- <role name="publisher" read="true" write="true" create="false"/>
- </security>
- </attribute>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.TopicService"
- name="jboss.messaging.destination:service=Topic,name=testDurableTopic"
- xmbean-dd="xmdesc/Topic-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="SecurityConfig">
- <security>
- <role name="guest" read="true" write="true"/>
- <role name="publisher" read="true" write="true" create="false"/>
- <role name="durpublisher" read="true" write="true" create="true"/>
- </security>
- </attribute>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=testQueue"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="SecurityConfig">
- <security>
- <role name="guest" read="true" write="true"/>
- <role name="publisher" read="true" write="true" create="false"/>
- <role name="noacc" read="false" write="false" create="false"/>
- </security>
- </attribute>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=A"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=B"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=C"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=D"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=ex"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <!-- It's possible for indiviual queues and topics to use a specific queue for
- an expiry or DLQ -->
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=PrivateDLQ"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=QueueWithOwnDLQAndExpiryQueue"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="DLQ">jboss.messaging.destination:service=Queue,name=PrivateDLQ</attribute>
- <attribute name="ExpiryQueue">jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue</attribute>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.TopicService"
- name="jboss.messaging.destination:service=Topic,name=TopicWithOwnDLQAndExpiryQueue"
- xmbean-dd="xmdesc/Topic-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="DLQ">jboss.messaging.destination:service=Queue,name=PrivateDLQ</attribute>
- <attribute name="ExpiryQueue">jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue</attribute>
- </mbean>
-
- <!-- Queues and Topics can also specify their own redelivery delay -->
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=QueueWithOwnRedeliveryDelay"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="RedeliveryDelay">5000</attribute>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.TopicService"
- name="jboss.messaging.destination:service=Topic,name=TopicWithOwnRedeliveryDelay"
- xmbean-dd="xmdesc/Topic-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="RedeliveryDelay">5000</attribute>
- </mbean>
-
- <!--
- Example clustered destinations.
- -->
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=testDistributedQueue"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="Clustered">true</attribute>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.TopicService"
- name="jboss.messaging.destination:service=Topic,name=testDistributedTopic"
- xmbean-dd="xmdesc/Topic-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="Clustered">true</attribute>
- </mbean>
-</server>
\ No newline at end of file
Copied: branches/Branch_1416_merge/docs/examples/destinations/jbm-examples-destinations-service.xml (from rev 5773, branches/Branch_1_4/docs/examples/destinations/jbm-examples-destinations-service.xml)
===================================================================
--- branches/Branch_1416_merge/docs/examples/destinations/jbm-examples-destinations-service.xml (rev 0)
+++ branches/Branch_1416_merge/docs/examples/destinations/jbm-examples-destinations-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Messaging Example Destinations
+ -->
+
+<server>
+ <mbean code="org.jboss.jms.server.destination.TopicService"
+ name="jboss.messaging.destination:service=Topic,name=testTopic"
+ xmbean-dd="xmdesc/Topic-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="SecurityConfig">
+ <security>
+ <role name="guest" read="true" write="true"/>
+ <role name="publisher" read="true" write="true" create="false"/>
+ <role name="durpublisher" read="true" write="true" create="true"/>
+ </security>
+ </attribute>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.TopicService"
+ name="jboss.messaging.destination:service=Topic,name=securedTopic"
+ xmbean-dd="xmdesc/Topic-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="SecurityConfig">
+ <security>
+ <role name="publisher" read="true" write="true" create="false"/>
+ </security>
+ </attribute>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.TopicService"
+ name="jboss.messaging.destination:service=Topic,name=testDurableTopic"
+ xmbean-dd="xmdesc/Topic-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="SecurityConfig">
+ <security>
+ <role name="guest" read="true" write="true"/>
+ <role name="publisher" read="true" write="true" create="false"/>
+ <role name="durpublisher" read="true" write="true" create="true"/>
+ </security>
+ </attribute>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=testQueue"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="SecurityConfig">
+ <security>
+ <role name="guest" read="true" write="true"/>
+ <role name="publisher" read="true" write="true" create="false"/>
+ <role name="noacc" read="false" write="false" create="false"/>
+ </security>
+ </attribute>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=A"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=B"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=C"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=D"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=ex"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <!-- It's possible for indiviual queues and topics to use a specific queue for
+ an expiry or DLQ -->
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=PrivateDLQ"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=QueueWithOwnDLQAndExpiryQueue"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="DLQ">jboss.messaging.destination:service=Queue,name=PrivateDLQ</attribute>
+ <attribute name="ExpiryQueue">jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue</attribute>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.TopicService"
+ name="jboss.messaging.destination:service=Topic,name=TopicWithOwnDLQAndExpiryQueue"
+ xmbean-dd="xmdesc/Topic-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="DLQ">jboss.messaging.destination:service=Queue,name=PrivateDLQ</attribute>
+ <attribute name="ExpiryQueue">jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue</attribute>
+ </mbean>
+
+ <!-- Queues and Topics can also specify their own redelivery delay -->
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=QueueWithOwnRedeliveryDelay"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="RedeliveryDelay">5000</attribute>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.TopicService"
+ name="jboss.messaging.destination:service=Topic,name=TopicWithOwnRedeliveryDelay"
+ xmbean-dd="xmdesc/Topic-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="RedeliveryDelay">5000</attribute>
+ </mbean>
+
+ <!--
+ Example clustered destinations.
+ -->
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=testDistributedQueue"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="Clustered">true</attribute>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.TopicService"
+ name="jboss.messaging.destination:service=Topic,name=testDistributedTopic"
+ xmbean-dd="xmdesc/Topic-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="Clustered">true</attribute>
+ </mbean>
+</server>
\ No newline at end of file
Property changes on: branches/Branch_1416_merge/docs/examples/distributed-queue
___________________________________________________________________
Name: svn:ignore
+ output
Modified: branches/Branch_1416_merge/docs/examples/distributed-queue/README.html
===================================================================
--- branches/Branch_1416_merge/docs/examples/distributed-queue/README.html 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/distributed-queue/README.html 2009-02-02 11:06:59 UTC (rev 5774)
@@ -21,8 +21,16 @@
This example relies on having access to a running JBoss Messaging
cluster with at least two nodes. The JBoss Messaging cluster must be
installed and started according to the user guide.
+<<br><br>
+For JBoss5, you should copy all as messaging-node0, configure mysql as a database, make it clustered, and copy it as messaging-node1. Start each instance as:
+<br><br>
+./run.sh -c messaging-node0 -Djboss.service.binding.set=ports-01
+<br><br>
<br>
-<br>
+and in another window
+<br><br>
+./run.sh -c messaging-node1 -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=1
+<br><br>
<span style="font-style: italic;"></span><br>
<h2>Running the example</h2>
<span style="font-family: monospace;"></span><span
Modified: branches/Branch_1416_merge/docs/examples/distributed-queue/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/distributed-queue/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/distributed-queue/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -19,12 +19,13 @@
<property name="messaging.client.jar.path" value="../../" />
<property name="messaging.client.jar.name" value="jboss-messaging-client.jar" />
<property name="jboss.home" value="${ENV.JBOSS_HOME}" />
- <property name="jboss.configuration0" value="messaging-node0" />
+ <property name="jboss.configuration" value="messaging-node0" />
<property name="example.queue.name" value="testDistributedQueue" />
+ <property name="ej3-extension" value="ejb3"/>
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -37,9 +38,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="###########################################################################" />
<echo message="# Running the DISTRIBUTED QUEUE example #" />
Copied: branches/Branch_1416_merge/docs/examples/distributed-queue/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/distributed-queue/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/distributed-queue/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/distributed-queue/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ The example requires a two nodes messaging-node0 and messaging-node1 to be running
+
+ $Id: build.xml 974 2006-05-22 21:35:38 -0600 (Mon, 22 May 2006) ovidiu $
+
+ -->
+
+<project name="DistributedQueueExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging-node0" />
+ <property name="example.queue.name" value="testDistributedQueue" />
+
+ <property name="ej3-extension" value="jar"/>
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the DISTRIBUTED QUEUE example #" />
+ <echo message="###########################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.name}" />
+ <fail message="Could not find client jar ${messaging.client.jar.name}" unless="client.jar.present" />
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="run" depends="compile">
+ <!--
+ DistributedQueueExample expects to find the name of the queue to connect to as value of
+ the 'example.queue.name' property, which *may* be defined by calling ant when this
+ example is used in a smoke test.
+ -->
+ <java classname="org.jboss.example.jms.distributedqueue.DistributedQueueExample" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ </target>
+
+ <target name="clean">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+</project>
+
Property changes on: branches/Branch_1416_merge/docs/examples/distributed-topic
___________________________________________________________________
Name: svn:ignore
+ output
Modified: branches/Branch_1416_merge/docs/examples/distributed-topic/README.html
===================================================================
--- branches/Branch_1416_merge/docs/examples/distributed-topic/README.html 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/distributed-topic/README.html 2009-02-02 11:06:59 UTC (rev 5774)
@@ -22,7 +22,18 @@
This example relies on having access to a running JBoss Messaging
cluster with at least two nodes. The JBoss Messaging cluster must be
installed and started according to the userguide.
+<br><br>
<br>
+<br><br>
+For JBoss5, you should copy all as messaging-node0, configure mysql as a database, make it clustered, and copy it as messaging-node1. Start each instance as:
+<br><br>
+./run -c messaging-node0 -Djboss.service.binding.set=ports-01
+<br><br>
+<br>
+and in another window
+<br><br>
+./run.sh -c messaging-node1 -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=1
+<br><br>
<span style="font-style: italic;"></span><br>
<h2>Running the example</h2>
<span style="font-family: monospace;"></span><span
Modified: branches/Branch_1416_merge/docs/examples/distributed-topic/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/distributed-topic/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/distributed-topic/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -19,12 +19,13 @@
<property name="messaging.client.jar.path" value="../../" />
<property name="messaging.client.jar.name" value="jboss-messaging-client.jar" />
<property name="jboss.home" value="${ENV.JBOSS_HOME}" />
- <property name="jboss.configuration0" value="messaging-node0" />
+ <property name="jboss.configuration" value="messaging-node0" />
<property name="example.topic.name" value="testDistributedTopic" />
+ <property name="ej3-extension" value="ejb3"/>
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -37,9 +38,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="###########################################################################" />
<echo message="# Running the DISTRIBUTED TOPIC example #" />
Copied: branches/Branch_1416_merge/docs/examples/distributed-topic/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/distributed-topic/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/distributed-topic/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/distributed-topic/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 5392 2008-11-20 00:41:52Z clebert.suconic at jboss.com $
+
+ -->
+
+<project name="DistributedTopicExample" default="run">
+
+ <property environment="ENV" />
+
+ <property file="../examples.properties" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration0" value="messaging-node0" />
+ <property name="example.topic.name" value="testDistributedTopic" />
+
+ <property name="ej3-extension" value="jar"/>
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the DISTRIBUTED TOPIC example #" />
+ <echo message="###########################################################################" />
+ <echo message="The topic: ${example.topic.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.name}" />
+ <fail message="Could not find client jar ${messaging.client.jar.name}" unless="client.jar.present" />
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="run" depends="compile">
+ <!--
+ DistributedTopicExample expects to find the name of the topic to connect to as value of
+ the 'example.topic.name' property, which *may* be defined by calling ant when this
+ example is used in a smoke test.
+ -->
+ <java classname="org.jboss.example.jms.distributedtopic.DistributedTopicExample" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.topic.name" value="${example.topic.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ </target>
+
+ <target name="clean">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+</project>
+
Property changes on: branches/Branch_1416_merge/docs/examples/ejb3mdb
___________________________________________________________________
Name: svn:ignore
+ output
Modified: branches/Branch_1416_merge/docs/examples/ejb3mdb/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/ejb3mdb/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/ejb3mdb/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -19,11 +19,13 @@
<property name="jboss.home" value="${ENV.JBOSS_HOME}" />
<property name="jboss.configuration" value="messaging" />
<property name="example.queue.name" value="testQueue" />
-
+
+ <property name="ej3-extension" value="ejb3"/>
+
<path id="common.compilation.classpath">
- <fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
- <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/client/jboss-j2ee.jar"/>
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
+ <fileset file="${jboss.home}/client/jboss-ejb3x.jar"/>
</path>
<path id="example.compilation.classpath">
@@ -35,9 +37,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="###########################################################################" />
<echo message="# Running the EJB3 MDB example #" />
@@ -46,14 +54,7 @@
<echo message="The client jar: ${messaging.client.jar.path}/${messaging.client.jar.name}" />
</target>
- <target name="sanity-check" depends="identify">
- <available property="client.jar.present" file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
- <fail message="Could not find client jar ${messaging.client.jar.path}/${messaging.client.jar.name}" unless="client.jar.present" />
- <available property="ejb3.support.installed" file="${jboss.home}/server/${jboss.configuration}/deploy/ejb3.deployer" />
- <fail message="EJB3 does not seem to be installed in ${jboss.home}/server/${jboss.configuration}! Install it and try again." unless="ejb3.support.installed" />
- </target>
-
- <target name="init" depends="sanity-check">
+ <target name="init" >
<mkdir dir="./output/classes/META-INF" />
<mkdir dir="./output/lib/META-INF" />
<mkdir dir="../common/output/classes" />
@@ -77,11 +78,11 @@
<filter token="QUEUE_NAME" value="${example.queue.name}" />
</filterset>
</copy>
- <jar destfile="./output/lib/mdb-example.ejb3" basedir="./output/classes" includes="META-INF/**,org/jboss/example/**/EJB3MDBExample.class" />
+ <jar destfile="./output/lib/mdb-example.${ej3-extension}" basedir="./output/classes" includes="META-INF/**,org/jboss/example/**/EJB3MDBExample.class" />
</target>
<target name="deploy" depends="jar">
- <copy file="./output/lib/mdb-example.ejb3" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <copy file="./output/lib/mdb-example.${ej3-extension}" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
<antcall target="sleep">
<param name="sleep.interval" value="5" />
</antcall>
@@ -105,7 +106,7 @@
</target>
<target name="undeploy">
- <delete file="${jboss.home}/server/${jboss.configuration}/deploy/mdb-example.ejb3" quiet="true" />
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/mdb-example.${ej3-extension}" quiet="true" />
</target>
<target name="clean" depends="undeploy">
Copied: branches/Branch_1416_merge/docs/examples/ejb3mdb/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/ejb3mdb/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/ejb3mdb/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/ejb3mdb/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 5392 2008-11-20 00:41:52Z clebert.suconic at jboss.com $
+
+ -->
+
+<project name="EJB3MDBExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging" />
+ <property name="example.queue.name" value="testQueue" />
+
+ <property name="ej3-extension" value="jar"/>
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the EJB3 MDB example #" />
+ <echo message="###########################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="init" >
+ <mkdir dir="./output/classes/META-INF" />
+ <mkdir dir="./output/lib/META-INF" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="jar" depends="compile">
+ <copy todir="./output/classes/META-INF" filtering="true">
+ <fileset dir="./etc/META-INF" includes="*" />
+ <filterset>
+ <filter token="QUEUE_NAME" value="${example.queue.name}" />
+ </filterset>
+ </copy>
+ <jar destfile="./output/lib/mdb-example.${ej3-extension}" basedir="./output/classes" includes="META-INF/**,org/jboss/example/**/EJB3MDBExample.class" />
+ </target>
+
+ <target name="deploy" depends="jar">
+ <copy file="./output/lib/mdb-example.${ej3-extension}" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <antcall target="sleep">
+ <param name="sleep.interval" value="5" />
+ </antcall>
+ </target>
+
+ <target name="run" depends="deploy">
+ <antcall target="send" />
+ <antcall target="undeploy" />
+ </target>
+
+ <target name="send">
+ <!-- MDBExample expects to find the name of the queue to connect to as value of the
+ 'example.queue.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.ejb3mdb.Sender" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/mdb-example.${ej3-extension}" quiet="true" />
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..." />
+ <sleep seconds="${sleep.interval}" />
+ </target>
+
+</project>
+
Deleted: branches/Branch_1416_merge/docs/examples/ejb3mdb/etc/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/ejb3mdb/etc/META-INF/ejb-jar.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/ejb3mdb/etc/META-INF/ejb-jar.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,25 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
- "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
-
-<!-- $Id$ -->
-
-<!--
- Note: This deployment descriptor (or any deployment descriptor) is NOT mandatory with EJB3 beans.
- It is here to:
- 1. Demonstrate the use of deployment descriptors, in case you need to override
- configuration at deployment.
- 2. Add a degree of flexibility to this example to be used with smoke tests.
--->
-<ejb-jar>
- <enterprise-beans>
- <message-driven>
- <ejb-name>EJB3MDBExample</ejb-name>
- <ejb-class>org.jboss.example.jms.ejb3mdb.EJB3MDBExample</ejb-class>
- <transaction-type>Container</transaction-type>
- <message-driven-destination>
- <destination-type>javax.jms.Queue</destination-type>
- </message-driven-destination>
- </message-driven>
- </enterprise-beans>
-</ejb-jar>
\ No newline at end of file
Deleted: branches/Branch_1416_merge/docs/examples/ejb3mdb/etc/META-INF/jboss.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/ejb3mdb/etc/META-INF/jboss.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/ejb3mdb/etc/META-INF/jboss.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jboss PUBLIC
- "-//JBoss//DTD JBOSS 3.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
-
-<!-- $Id$ -->
-
-<!--
- Note: This deployment descriptor (or any deployment descriptor) is NOT mandatory with EJB3 beans.
- It is here to:
- 1. Demonstrate the use of deployment descriptors, in case you need to override
- configuration at deployment.
- 2. Add a degree of flexibility to this example to be used with smoke tests.
--->
-<jboss>
-
- <enterprise-beans>
- <message-driven>
- <ejb-name>EJB3MDBExample</ejb-name>
- <destination-jndi-name>queue/@QUEUE_NAME@</destination-jndi-name>
- </message-driven>
- </enterprise-beans>
-
-</jboss>
-
Modified: branches/Branch_1416_merge/docs/examples/http/README.html
===================================================================
--- branches/Branch_1416_merge/docs/examples/http/README.html 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/http/README.html 2009-02-02 11:06:59 UTC (rev 5774)
@@ -56,7 +56,7 @@
<tr>
<td style="vertical-align: top;"><br>
<span style="font-family: monospace;">cd
-...\examples\secure-socket</span><br>
+...\examples\http</span><br>
<br>
</td>
</tr>
Modified: branches/Branch_1416_merge/docs/examples/http/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/http/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/http/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -20,10 +20,9 @@
<property name="jboss.home" value="${ENV.JBOSS_HOME}" />
<property name="jboss.configuration" value="messaging" />
<property name="example.queue.name" value="testQueue" />
-
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -36,9 +35,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="############################################################################" />
<echo message="# Running the HTTP example #" />
@@ -47,12 +52,7 @@
<echo message="The client jar: ${messaging.client.jar.path}/${messaging.client.jar.name}" />
</target>
- <target name="sanity-check" depends="identify">
- <available property="client.jar.present" file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
- <fail message="Could not find client jar ${messaging.client.jar.path}/${messaging.client.jar.name}" unless="client.jar.present" />
- </target>
-
- <target name="init" depends="sanity-check">
+ <target name="init" >
<mkdir dir="./output/classes" />
<mkdir dir="../common/output/classes" />
</target>
Copied: branches/Branch_1416_merge/docs/examples/http/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/http/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/http/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/http/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 5392 2008-11-20 00:41:52Z clebert.suconic at jboss.com $
+
+ -->
+
+<project name="HttpExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="remoting.path" value="../config" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging" />
+ <property name="example.queue.name" value="testQueue" />
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+
+ <target name="identify">
+ <echo message="############################################################################" />
+ <echo message="# Running the HTTP example #" />
+ <echo message="############################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="init" >
+ <mkdir dir="./output/classes" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="deploy">
+ <copy file="${remoting.path}/remoting-http-service.xml" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <copy file="./etc/messaging-http-service.xml" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <antcall target="sleep">
+ <param name="sleep.interval" value="10" />
+ </antcall>
+ </target>
+
+ <target name="run" depends="compile, deploy">
+ <!-- QueueExample expects to find the name of the queue to connect to as value of the
+ 'example.queue.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.http.HttpExample" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ <antcall target="undeploy" />
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/messaging-http-service.xml" quiet="true" />
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/remoting-http-service.xml" quiet="true" />
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..." />
+ <sleep seconds="${sleep.interval}" />
+ </target>
+
+</project>
+
Property changes on: branches/Branch_1416_merge/docs/examples/mdb
___________________________________________________________________
Name: svn:ignore
+ output
Modified: branches/Branch_1416_merge/docs/examples/mdb/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/mdb/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/mdb/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -20,9 +20,10 @@
<property name="jboss.configuration" value="messaging" />
<property name="example.queue.name" value="testQueue" />
+ <property name="ej3-extension" value="ejb3"/>
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -35,9 +36,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="###########################################################################" />
<echo message="# Running the MDB example #" />
Copied: branches/Branch_1416_merge/docs/examples/mdb/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/mdb/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/mdb/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/mdb/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 5392 2008-11-20 00:41:52Z clebert.suconic at jboss.com $
+
+ -->
+
+<project name="MDBExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging" />
+ <property name="example.queue.name" value="testQueue" />
+
+ <property name="ej3-extension" value="jar"/>
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the MDB example #" />
+ <echo message="###########################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.name}" />
+ <fail message="Could not find client jar ${messaging.client.jar.name}" unless="client.jar.present" />
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes/META-INF" />
+ <mkdir dir="./output/lib/META-INF" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="jar" depends="compile">
+ <copy todir="./output/classes/META-INF" filtering="true">
+ <fileset dir="./etc/META-INF" includes="*" />
+ <filterset>
+ <filter token="QUEUE_NAME" value="${example.queue.name}" />
+ </filterset>
+ </copy>
+ <jar destfile="./output/lib/mdb-example.jar" basedir="./output/classes" includes="META-INF/**,org/jboss/example/**/MDBExample.class">
+ </jar>
+ </target>
+
+ <target name="ear" depends="jar">
+ <jar destfile="./output/lib/mdb-example.ear">
+ <zipfileset dir="./output/lib" includes="mdb-example.jar" />
+ <zipfileset dir="./etc/EAR-META-INF" prefix="META-INF" />
+ </jar>
+ </target>
+
+ <target name="deploy" depends="ear">
+ <copy file="./output/lib/mdb-example.ear" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <antcall target="sleep">
+ <param name="sleep.interval" value="5" />
+ </antcall>
+ </target>
+
+ <target name="run" depends="deploy">
+ <antcall target="send" />
+ <antcall target="undeploy" />
+ </target>
+
+ <target name="send">
+ <!-- MDBExample expects to find the name of the queue to connect to as value of the
+ 'example.queue.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.mdb.Sender" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/mdb-example.ear" quiet="true" />
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..." />
+ <sleep seconds="${sleep.interval}" />
+ </target>
+
+</project>
+
Property changes on: branches/Branch_1416_merge/docs/examples/mdb-failure
___________________________________________________________________
Name: svn:ignore
+ output
Modified: branches/Branch_1416_merge/docs/examples/mdb-failure/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/mdb-failure/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/mdb-failure/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -23,9 +23,10 @@
<property name="jboss.configuration" value="messaging" />
<property name="example.queue.name" value="testQueue" />
+ <property name="ej3-extension" value="ejb3"/>
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -38,9 +39,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="###########################################################################" />
<echo message="# Running the MDB Failure example #" />
Copied: branches/Branch_1416_merge/docs/examples/mdb-failure/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/mdb-failure/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/mdb-failure/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/mdb-failure/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 974 2006-05-23 03:35:38Z ovidiu $
+
+ -->
+
+<project name="MDBFailureExample" default="run">
+
+ <property environment="ENV" />
+
+ <property name="undeploy.quiet" value="false" />
+ <property name="undeploy.failonerror" value="true" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging" />
+ <property name="example.queue.name" value="testQueue" />
+
+ <property name="ej3-extension" value="jar"/>
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the MDB Failure example #" />
+ <echo message="###########################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.name}" />
+ <fail message="Could not find client jar ${messaging.client.jar.name}" unless="client.jar.present" />
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes/META-INF" />
+ <mkdir dir="./output/lib/META-INF" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="jar" depends="compile">
+ <copy todir="./output/classes/META-INF" filtering="true">
+ <fileset dir="./etc/META-INF" includes="*" />
+ <filterset>
+ <filter token="QUEUE_NAME" value="${example.queue.name}" />
+ </filterset>
+ </copy>
+ <jar destfile="./output/lib/mdb-failure-example.jar" basedir="./output/classes" includes="META-INF/**,org/jboss/example/**/MDBFailureExample.class" />
+ </target>
+
+ <target name="deploy" depends="jar">
+ <copy file="./output/lib/mdb-failure-example.jar" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <antcall target="sleep">
+ <param name="sleep.interval" value="5" />
+ </antcall>
+ </target>
+
+ <target name="run" depends="deploy">
+ <antcall target="send" />
+ <antcall target="sleep">
+ <param name="sleep.interval" value="10" />
+ </antcall>
+ <antcall target="undeploy">
+ <param name="undeploy.quiet" value="false" />
+ <param name="undeploy.failonerror" value="true" />
+ </antcall>
+ </target>
+
+ <target name="send">
+ <!-- MDBFailureExample expects to find the name of the queue to connect to as value of the
+ 'example.queue.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.mdbfailure.Sender" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/mdb-failure-example.jar" quiet="${undeploy.quiet}" failonerror="${undeploy.failonerror}" />
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..." />
+ <sleep seconds="${sleep.interval}" />
+ </target>
+
+</project>
+
Modified: branches/Branch_1416_merge/docs/examples/queue/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/queue/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/queue/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -19,10 +19,9 @@
<property name="jboss.home" value="${ENV.JBOSS_HOME}" />
<property name="jboss.configuration" value="messaging" />
<property name="example.queue.name" value="testQueue" />
-
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -35,7 +34,13 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
<target name="identify">
Copied: branches/Branch_1416_merge/docs/examples/queue/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/queue/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/queue/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/queue/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 5392 2008-11-20 00:41:52Z clebert.suconic at jboss.com $
+
+ -->
+
+<project name="QueueExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging" />
+ <property name="example.queue.name" value="testQueue" />
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the QUEUE example #" />
+ <echo message="###########################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.name}" />
+ <fail message="Could not find client jar ${messaging.client.jar.name}" unless="client.jar.present" />
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="run" depends="compile">
+ <!-- QueueExample expects to find the name of the queue to connect to as value of the
+ 'example.queue.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.queue.QueueExample" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ </target>
+
+ <target name="clean">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+</project>
+
Modified: branches/Branch_1416_merge/docs/examples/queue-failover/README.html
===================================================================
--- branches/Branch_1416_merge/docs/examples/queue-failover/README.html 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/queue-failover/README.html 2009-02-02 11:06:59 UTC (rev 5774)
@@ -22,7 +22,6 @@
This example relies on having access to a running JBoss Messaging
cluster with at least two nodes. The JBoss Messaging cluster must be
installed and started according to the userguide.
-<br>
This example also relies on having access to the <span
style="font-family: monospace;">jboss-messaging-client.jar</span>
archive included with the release bundle. If you run this example
@@ -31,6 +30,17 @@
configured to find the client jar. Otherwise, you must modify example's
<span style="font-family: monospace;">build.xml</span> accordingly.<br>
<span style="font-style: italic;"></span><br>
+<br>
+<br><br>
+For JBoss5, you should copy all as messaging-node0, configure mysql as a database, make it clustered, and copy it as messaging-node1. Start each instance as:
+<br><br>
+./run -c messaging-node0 -Djboss.service.binding.set=ports-01
+<br><br>
+<br>
+and in another window
+<br><br>
+./run.sh -c messaging-node1 -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=1
+<br><br>
<h2>Running the example</h2>
<span style="font-family: monospace;"></span><span
style="font-family: monospace;"></span><br>
Modified: branches/Branch_1416_merge/docs/examples/queue-failover/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/queue-failover/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/queue-failover/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -17,12 +17,11 @@
<property name="messaging.client.jar.path" value="../../" />
<property name="messaging.client.jar.name" value="jboss-messaging-client.jar" />
<property name="jboss.home" value="${ENV.JBOSS_HOME}" />
- <property name="jboss.configuration0" value="messaging-node0" />
+ <property name="jboss.configuration" value="messaging-node0" />
<property name="example.queue.name" value="testDistributedQueue" />
-
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -35,9 +34,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="###########################################################################" />
<echo message="# Running the QUEUE FAILOVER example #" />
@@ -76,7 +81,7 @@
</target>
<target name="deploy" depends="jar">
- <copy file="./output/lib/application-server-killer.jar" todir="${jboss.home}/server/messaging-node0/deploy" />
+ <copy file="./output/lib/application-server-killer.jar" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
<antcall target="sleep">
<param name="sleep.interval" value="5" />
</antcall>
@@ -94,7 +99,7 @@
</target>
<target name="undeploy">
- <delete file="${jboss.home}/server/messaging-node0/deploy/application-server-killer.jar" quiet="true" />
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/application-server-killer.jar" quiet="true" />
</target>
<target name="clean" depends="undeploy">
Copied: branches/Branch_1416_merge/docs/examples/queue-failover/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/queue-failover/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/queue-failover/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/queue-failover/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 974 2006-05-22 21:35:38 -0600 (Mon, 22 May 2006) ovidiu $
+
+ -->
+
+<project name="QueueFailoverExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging-node0" />
+ <property name="example.queue.name" value="testDistributedQueue" />
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the QUEUE FAILOVER example #" />
+ <echo message="###########################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.name}" />
+ <fail message="Could not find client jar ${messaging.client.jar.name}" unless="client.jar.present" />
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/lib" />
+ <mkdir dir="./output/classes" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="jar" depends="compile">
+ <jar destfile="./output/lib/application-server-killer.jar">
+ <fileset dir="../common/etc" includes="META-INF/**" />
+ <fileset dir="../common/output/classes" includes="org/jboss/example/jms/common/bean/*.class" />
+ </jar>
+ </target>
+
+ <target name="deploy" depends="jar">
+ <copy file="./output/lib/application-server-killer.jar" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <antcall target="sleep">
+ <param name="sleep.interval" value="5" />
+ </antcall>
+ </target>
+
+
+ <target name="run" depends="deploy">
+ <java classname="org.jboss.example.jms.failover.QueueFailoverExample" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ <antcall target="undeploy" />
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/application-server-killer.jar" quiet="true" />
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..." />
+ <sleep seconds="${sleep.interval}" />
+ </target>
+
+</project>
+
Modified: branches/Branch_1416_merge/docs/examples/secure-socket/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/secure-socket/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/secure-socket/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -21,9 +21,10 @@
<property name="jboss.configuration" value="messaging" />
<property name="example.queue.name" value="testQueue" />
+ <property name="messaging-deploy" value="jboss-messaging.sar"/>
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -36,9 +37,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="############################################################################" />
<echo message="# Running the SECURE SOCKET example #" />
@@ -47,14 +54,7 @@
<echo message="The client jar: ${messaging.client.jar.path}/${messaging.client.jar.name}" />
</target>
- <target name="sanity-check" depends="identify">
- <available property="client.jar.present" file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
- <fail message="Could not find client jar ${messaging.client.jar.path}/${messaging.client.jar.name}" unless="client.jar.present" />
- <available property="messaging.deployment.dir.present" file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-messaging.sar" />
- <fail message="Could not find the Messaging deployment directory ${jboss.home}/server/${jboss.configuration}/deploy/jboss-messaging.sar" unless="messaging.deployment.dir.present" />
- </target>
-
- <target name="init" depends="sanity-check">
+ <target name="init">
<mkdir dir="./output/classes" />
<mkdir dir="../common/output/classes" />
</target>
@@ -71,7 +71,7 @@
</target>
<target name="deploy">
- <copy file="./etc/messaging.keystore" todir="${jboss.home}/server/${jboss.configuration}/deploy/jboss-messaging.sar" />
+ <copy file="./etc/messaging.keystore" todir="${jboss.home}/server/${jboss.configuration}/deploy/${messaging-deploy}" />
<copy file="${remoting.path}/remoting-sslbisocket-service.xml" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
<copy file="./etc/messaging-secure-socket-service.xml" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
<antcall target="sleep">
@@ -97,7 +97,7 @@
<target name="undeploy">
<delete file="${jboss.home}/server/${jboss.configuration}/deploy/remoting-sslbisocket-service.xml" quiet="true" />
<delete file="${jboss.home}/server/${jboss.configuration}/deploy/messaging-secure-socket-service.xml" quiet="true" />
- <delete file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-messaging.sar/messaging.keystore" quiet="true" />
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/${messaging-deploy}/messaging.keystore" quiet="true" />
</target>
<target name="clean" depends="undeploy">
Copied: branches/Branch_1416_merge/docs/examples/secure-socket/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/secure-socket/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/secure-socket/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/secure-socket/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 5419 2008-11-24 05:21:45Z gaohoward $
+
+ -->
+
+<project name="SecureSocketExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="remoting.path" value="../config" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging" />
+ <property name="example.queue.name" value="testQueue" />
+
+ <property name="messaging-deploy" value="messaging"/>
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="############################################################################" />
+ <echo message="# Running the SECURE SOCKET example #" />
+ <echo message="############################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="init">
+ <mkdir dir="./output/classes" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="deploy">
+ <copy file="./etc/messaging.keystore" todir="${jboss.home}/server/${jboss.configuration}/deploy/${messaging-deploy}" />
+ <copy file="${remoting.path}/remoting-sslbisocket-service.xml" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <copy file="./etc/messaging-secure-socket-service.xml" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <antcall target="sleep">
+ <param name="sleep.interval" value="5" />
+ </antcall>
+ </target>
+
+ <target name="run" depends="compile, deploy">
+ <!-- QueueExample expects to find the name of the queue to connect to as value of the
+ 'example.queue.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.securesocket.SecureSocketExample" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="javax.net.ssl.trustStorePassword" value="secureexample" />
+ <sysproperty key="javax.net.ssl.trustStore" value="./etc/messaging.truststore" />
+ <sysproperty key="example.queue.name" value="${example.queue.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ <antcall target="undeploy" />
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/remoting-sslbisocket-service.xml" quiet="true" />
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/messaging-secure-socket-service.xml" quiet="true" />
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/${messaging-deploy}/messaging.keystore" quiet="true" />
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..." />
+ <sleep seconds="${sleep.interval}" />
+ </target>
+
+</project>
+
Copied: branches/Branch_1416_merge/docs/examples/servlet (from rev 5773, branches/Branch_1_4/docs/examples/servlet)
Deleted: branches/Branch_1416_merge/docs/examples/servlet/README.html
===================================================================
--- branches/Branch_1_4/docs/examples/servlet/README.html 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/servlet/README.html 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,169 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <meta content="text/html; charset=ISO-8859-1"
- http-equiv="content-type">
- <title>JBoss Messaging Example - Servlet Transport</title>
-</head>
-<body>
-<br>
-<h1>JBoss Messaging Servlet Transport Example</h1>
-$Revision: 5394 $
-<h2>Overview</h2>
-<p>
-This example shows how to configure a ConnectionFactory to send
-messages using the Servlet protocol. The example will use
-such a ConnectionFactory to create two JMS connections: the first one
-to send a message to the queue and the second one to read the message
-from the queue. In both cases, the message will be sent over
-an Servlet connection. The example is considered successful
-if the client receives without any error the message that was
-previously sent to the queue.</p>
-<p>
-This example needs to have access to a running JBoss Messaging
-instance.
-The JBoss Messaging instance must be installed and started according to
-the
-"Installation" paragraph from the release documentation. However, the
-example will automatically deploy its own queue, unless a queue with
-the same name is already deployed.
-</p>
-<br>
-This example also needs to have access to <span
- style="font-family: monospace;">jboss-messaging-client.jar</span>
-archive that comes with the release bundle. If you run this example
-from an unzipped installation bundle, the example run script is
-correctly configured to find the client jar. Otherwise, you must modify
-example's <span style="font-family: monospace;">build.xml</span>
-accordingly.<br>
-<br>
-<br>
-<h2>Running the example</h2>
-1. Set up the JBOSS_HOME environment variable to point to the JBoss
-instance you deployed JBoss Messaging into. For example, if you
-deployed JBoss Messaging in <span style="font-family: monospace;">C:\jboss-4.2.0.GA\server\messaging\deploy,</span>
-then your JBOSS_HOME value should be <span
- style="font-family: monospace;">C:\jboss-4.2.0.GA</span><br>
-<br>
-2. Go to the example's home directory<br>
-<br>
-<div style="margin-left: 40px;"><br>
-</div>
-<table
- style="width: 90%; text-align: left; font-family: monospace; margin-left: 40px; background-color: rgb(255, 255, 255);"
- border="1" cellpadding="2" cellspacing="2">
- <tbody>
- <tr>
- <td style="vertical-align: top;"><br>
- <span style="font-family: monospace;">cd
-...\examples\servlet</span><br>
- <br>
- </td>
- </tr>
- </tbody>
-</table>
-<span style="font-family: monospace;"></span><br>
-3. Run the example:<br>
-<br>
-<div style="margin-left: 40px;"><br>
-</div>
-<table
- style="width: 90%; text-align: left; font-family: monospace; margin-left: 40px; background-color: rgb(255, 255, 255);"
- border="1" cellpadding="2" cellspacing="2">
- <tbody>
- <tr>
- <td style="vertical-align: top;"><br>
- <span style="font-family: monospace;">ant</span><br>
- <br>
- </td>
- </tr>
- </tbody>
-</table>
-<div style="margin-left: 40px;"><br>
-</div>
-<br>
-The output of a successful run should be similar to:<br>
-<div style="margin-left: 40px;"><br>
-</div>
-<table
- style="width: 90%; text-align: left; font-family: monospace; background-color: rgb(204, 204, 204); margin-left: 40px;"
- border="1" cellpadding="2" cellspacing="2">
- <tbody>
- <tr>
- <td style="vertical-align: top;">
-<pre>
-$ ant
-Buildfile: build.xml
-
-identify:
- [echo] ############################################################################
- [echo] # Running the Servlet example #
- [echo] ############################################################################
- [echo] The queue: testQueue
- [echo] The client jar: ../../../output/lib/jboss-messaging-client.jar
-
-sanity-check:
-
-init:
- [mkdir] Created dir: C:\java\messaging\docs\examples\http\output\classes
- [mkdir] Created dir: C:\java\messaging\docs\examples\common\output\classes
-
-compile:
- [javac] Compiling 5 source files to C:\java\messaging\docs\examples\common\output\classes
- [javac] Compiling 1 source file to C:\java\messaging\docs\examples\http\output\classes
-
-deploy:
- [copy] Copying 2 files to C:\jboss-4.2.0.GA\server\messaging\deploy
- [copy] Copying 1 file to C:\jboss-4.2.0.GA\server\messaging\deploy
-
-sleep:
- [echo] Sleeping for 10 seconds ...
-
-run:
- [java] Queue /queue/testQueue exists
- [java] The message was successfully sent to the testQueue queue
- [java] Received message: Hello!
- [java] The example connected to JBoss Messaging version 1.4.0.GA (1.4)
- [java]
- [java] #####################
- [java] ### SUCCESS! ###
- [java] #####################
-
-undeploy:
- [delete] Deleting: C:\jboss-4.2.0.GA\server\messaging\deploy\messaging-servlet-service.xml
- [delete] Deleting: C:\jboss-4.2.0.GA\server\messaging\deploy\remoting-servlet-service.xml
- [delete] Deleting directory C:\jboss-4.2.0.GA\server\messaging\deploy\servlet-invoker.war
-
-BUILD SUCCESSFUL
-Total time: 14 seconds</pre>
- </td>
- </tr>
- </tbody>
-</table>
-<div style="margin-left: 40px;"><br>
-</div>
-<br>
-<h2>Troubleshooting</h2>
-<h3>1. I get <span style="font-family: monospace;">"javax.jms.JMSSecurityException:
-User null is NOT authenticated" <br>
-</span></h3>
-You probably didn't install JBoss Messaging correctly. A fresh JBoss
-Messaging installation requires changes in the security configuration
-of a <span style="font-family: monospace;">default </span>JBoss
-instance, specifically a properly configured "<small><span
- style="font-family: courier new,courier,monospace;">messaging</span></small>"
-security domain. Follow the instructions from the "Installation"
-paragraph of the release documentation. <br>
-<br>
-<br>
-<br>
-<br>
-<hr style="width: 100%; height: 2px;"><br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-</body>
-</html>
Copied: branches/Branch_1416_merge/docs/examples/servlet/README.html (from rev 5773, branches/Branch_1_4/docs/examples/servlet/README.html)
===================================================================
--- branches/Branch_1416_merge/docs/examples/servlet/README.html (rev 0)
+++ branches/Branch_1416_merge/docs/examples/servlet/README.html 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,169 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+ <title>JBoss Messaging Example - Servlet Transport</title>
+</head>
+<body>
+<br>
+<h1>JBoss Messaging Servlet Transport Example</h1>
+$Revision: 5394 $
+<h2>Overview</h2>
+<p>
+This example shows how to configure a ConnectionFactory to send
+messages using the Servlet protocol. The example will use
+such a ConnectionFactory to create two JMS connections: the first one
+to send a message to the queue and the second one to read the message
+from the queue. In both cases, the message will be sent over
+an Servlet connection. The example is considered successful
+if the client receives without any error the message that was
+previously sent to the queue.</p>
+<p>
+This example needs to have access to a running JBoss Messaging
+instance.
+The JBoss Messaging instance must be installed and started according to
+the
+"Installation" paragraph from the release documentation. However, the
+example will automatically deploy its own queue, unless a queue with
+the same name is already deployed.
+</p>
+<br>
+This example also needs to have access to <span
+ style="font-family: monospace;">jboss-messaging-client.jar</span>
+archive that comes with the release bundle. If you run this example
+from an unzipped installation bundle, the example run script is
+correctly configured to find the client jar. Otherwise, you must modify
+example's <span style="font-family: monospace;">build.xml</span>
+accordingly.<br>
+<br>
+<br>
+<h2>Running the example</h2>
+1. Set up the JBOSS_HOME environment variable to point to the JBoss
+instance you deployed JBoss Messaging into. For example, if you
+deployed JBoss Messaging in <span style="font-family: monospace;">C:\jboss-4.2.0.GA\server\messaging\deploy,</span>
+then your JBOSS_HOME value should be <span
+ style="font-family: monospace;">C:\jboss-4.2.0.GA</span><br>
+<br>
+2. Go to the example's home directory<br>
+<br>
+<div style="margin-left: 40px;"><br>
+</div>
+<table
+ style="width: 90%; text-align: left; font-family: monospace; margin-left: 40px; background-color: rgb(255, 255, 255);"
+ border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;"><br>
+ <span style="font-family: monospace;">cd
+...\examples\servlet</span><br>
+ <br>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<span style="font-family: monospace;"></span><br>
+3. Run the example:<br>
+<br>
+<div style="margin-left: 40px;"><br>
+</div>
+<table
+ style="width: 90%; text-align: left; font-family: monospace; margin-left: 40px; background-color: rgb(255, 255, 255);"
+ border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;"><br>
+ <span style="font-family: monospace;">ant</span><br>
+ <br>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<div style="margin-left: 40px;"><br>
+</div>
+<br>
+The output of a successful run should be similar to:<br>
+<div style="margin-left: 40px;"><br>
+</div>
+<table
+ style="width: 90%; text-align: left; font-family: monospace; background-color: rgb(204, 204, 204); margin-left: 40px;"
+ border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;">
+<pre>
+$ ant
+Buildfile: build.xml
+
+identify:
+ [echo] ############################################################################
+ [echo] # Running the Servlet example #
+ [echo] ############################################################################
+ [echo] The queue: testQueue
+ [echo] The client jar: ../../../output/lib/jboss-messaging-client.jar
+
+sanity-check:
+
+init:
+ [mkdir] Created dir: C:\java\messaging\docs\examples\http\output\classes
+ [mkdir] Created dir: C:\java\messaging\docs\examples\common\output\classes
+
+compile:
+ [javac] Compiling 5 source files to C:\java\messaging\docs\examples\common\output\classes
+ [javac] Compiling 1 source file to C:\java\messaging\docs\examples\http\output\classes
+
+deploy:
+ [copy] Copying 2 files to C:\jboss-4.2.0.GA\server\messaging\deploy
+ [copy] Copying 1 file to C:\jboss-4.2.0.GA\server\messaging\deploy
+
+sleep:
+ [echo] Sleeping for 10 seconds ...
+
+run:
+ [java] Queue /queue/testQueue exists
+ [java] The message was successfully sent to the testQueue queue
+ [java] Received message: Hello!
+ [java] The example connected to JBoss Messaging version 1.4.0.GA (1.4)
+ [java]
+ [java] #####################
+ [java] ### SUCCESS! ###
+ [java] #####################
+
+undeploy:
+ [delete] Deleting: C:\jboss-4.2.0.GA\server\messaging\deploy\messaging-servlet-service.xml
+ [delete] Deleting: C:\jboss-4.2.0.GA\server\messaging\deploy\remoting-servlet-service.xml
+ [delete] Deleting directory C:\jboss-4.2.0.GA\server\messaging\deploy\servlet-invoker.war
+
+BUILD SUCCESSFUL
+Total time: 14 seconds</pre>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<div style="margin-left: 40px;"><br>
+</div>
+<br>
+<h2>Troubleshooting</h2>
+<h3>1. I get <span style="font-family: monospace;">"javax.jms.JMSSecurityException:
+User null is NOT authenticated" <br>
+</span></h3>
+You probably didn't install JBoss Messaging correctly. A fresh JBoss
+Messaging installation requires changes in the security configuration
+of a <span style="font-family: monospace;">default </span>JBoss
+instance, specifically a properly configured "<small><span
+ style="font-family: courier new,courier,monospace;">messaging</span></small>"
+security domain. Follow the instructions from the "Installation"
+paragraph of the release documentation. <br>
+<br>
+<br>
+<br>
+<br>
+<hr style="width: 100%; height: 2px;"><br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+</body>
+</html>
Deleted: branches/Branch_1416_merge/docs/examples/servlet/build.xml
===================================================================
--- branches/Branch_1_4/docs/examples/servlet/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/servlet/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-
- To run the example, set JBOSS_HOME and run ant (with no parameters)
-
- $Id: build.xml 3140 2007-09-26 08:44:19Z ataylor $
-
- -->
-
-<project name="ServletExample" default="run">
-
- <property environment="ENV"/>
-
- <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
- <property file="../examples.properties"/>
- <property name="remoting.path" value="../config"/>
- <property name="messaging.client.jar.path" value="../../"/>
- <property name="messaging.client.jar.name" value="jboss-messaging-client.jar"/>
- <property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
- <property name="jboss.configuration" value="messaging"/>
- <property name="example.queue.name" value="testQueue"/>
-
- <path id="common.compilation.classpath">
- <fileset file="${jboss.home}/client/jboss-j2ee.jar"/>
- <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
- </path>
-
- <path id="example.compilation.classpath">
- <path refid="common.compilation.classpath"/>
- <pathelement path="../common/output/classes"/>
- </path>
-
- <path id="execution.classpath">
- <pathelement path="./etc"/>
- <pathelement path="../common/output/classes"/>
- <pathelement path="./output/classes"/>
- <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar"/>
- <fileset file="${jboss.home}/client/jbossall-client.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
- <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar"/>
- </path>
-
- <target name="identify">
- <echo message="############################################################################"/>
- <echo message="# Running the Servlet example #"/>
- <echo message="############################################################################"/>
- <echo message="The queue: ${example.queue.name}"/>
- <echo message="The client jar: ${messaging.client.jar.path}/${messaging.client.jar.name}"/>
- </target>
-
- <target name="sanity-check" depends="identify">
- <available property="client.jar.present" file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
- <fail message="Could not find client jar ${messaging.client.jar.path}/${messaging.client.jar.name}"
- unless="client.jar.present"/>
- </target>
-
- <target name="init" depends="sanity-check">
- <mkdir dir="./output/classes"/>
- <mkdir dir="../common/output/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
- <src path="../common/src"/>
- <classpath refid="common.compilation.classpath"/>
- </javac>
- <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
- <src path="./src"/>
- <classpath refid="example.compilation.classpath"/>
- </javac>
- </target>
-
- <target name="deploy">
- <copy todir="${jboss.home}/server/${jboss.configuration}/deploy">
- <fileset dir="${remoting.path}">
- <include name="remoting-servlet-service.xml"/>
- <include name="servlet-invoker.war/**/*"/>
- </fileset>
- </copy>
- <copy file="./etc/messaging-servlet-service.xml"
- todir="${jboss.home}/server/${jboss.configuration}/deploy"/>
- <antcall target="sleep"><param name="sleep.interval" value="10"/></antcall>
- </target>
-
- <target name="run" depends="compile, deploy">
- <!-- QueueExample expects to find the name of the queue to connect to as value of the
- 'example.queue.name' property, which *may* be defined by calling ants when this example
- is used in a smoke test -->
- <java classname="org.jboss.example.jms.servlet.ServletExample"
- classpathref="execution.classpath" fork="yes" failonerror="true">
- <sysproperty key="example.queue.name" value="${example.queue.name}"/>
- <!--
- <jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8787"/>
- -->
- </java>
- <antcall target="undeploy"/>
- </target>
-
- <target name="undeploy">
- <delete file="${jboss.home}/server/${jboss.configuration}/deploy/messaging-servlet-service.xml" quiet="true"/>
- <delete file="${jboss.home}/server/${jboss.configuration}/deploy/remoting-servlet-service.xml" quiet="true"/>
- <delete dir="${jboss.home}/server/${jboss.configuration}/deploy/servlet-invoker.war"/>
- </target>
-
- <target name="clean" depends="undeploy">
- <delete dir="./output" quiet="true"/>
- <delete dir="../common/output" quiet="true"/>
- </target>
-
- <target name="sleep">
- <echo message="Sleeping for ${sleep.interval} seconds ..."/>
- <sleep seconds="${sleep.interval}"/>
- </target>
-
-</project>
-
Copied: branches/Branch_1416_merge/docs/examples/servlet/build.xml (from rev 5773, branches/Branch_1_4/docs/examples/servlet/build.xml)
===================================================================
--- branches/Branch_1416_merge/docs/examples/servlet/build.xml (rev 0)
+++ branches/Branch_1416_merge/docs/examples/servlet/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 3140 2007-09-26 08:44:19Z ataylor $
+
+ -->
+
+<project name="ServletExample" default="run">
+
+ <property environment="ENV"/>
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties"/>
+ <property name="remoting.path" value="../config"/>
+ <property name="messaging.client.jar.path" value="../../"/>
+ <property name="messaging.client.jar.name" value="jboss-messaging-client.jar"/>
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
+ <property name="jboss.configuration" value="messaging"/>
+ <property name="example.queue.name" value="testQueue"/>
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-j2ee.jar"/>
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath"/>
+ <pathelement path="../common/output/classes"/>
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc"/>
+ <pathelement path="../common/output/classes"/>
+ <pathelement path="./output/classes"/>
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar"/>
+ <fileset file="${jboss.home}/client/jbossall-client.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar"/>
+ </path>
+
+ <target name="identify">
+ <echo message="############################################################################"/>
+ <echo message="# Running the Servlet example #"/>
+ <echo message="############################################################################"/>
+ <echo message="The queue: ${example.queue.name}"/>
+ <echo message="The client jar: ${messaging.client.jar.path}/${messaging.client.jar.name}"/>
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
+ <fail message="Could not find client jar ${messaging.client.jar.path}/${messaging.client.jar.name}"
+ unless="client.jar.present"/>
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes"/>
+ <mkdir dir="../common/output/classes"/>
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src"/>
+ <classpath refid="common.compilation.classpath"/>
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src"/>
+ <classpath refid="example.compilation.classpath"/>
+ </javac>
+ </target>
+
+ <target name="deploy">
+ <copy todir="${jboss.home}/server/${jboss.configuration}/deploy">
+ <fileset dir="${remoting.path}">
+ <include name="remoting-servlet-service.xml"/>
+ <include name="servlet-invoker.war/**/*"/>
+ </fileset>
+ </copy>
+ <copy file="./etc/messaging-servlet-service.xml"
+ todir="${jboss.home}/server/${jboss.configuration}/deploy"/>
+ <antcall target="sleep"><param name="sleep.interval" value="10"/></antcall>
+ </target>
+
+ <target name="run" depends="compile, deploy">
+ <!-- QueueExample expects to find the name of the queue to connect to as value of the
+ 'example.queue.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.servlet.ServletExample"
+ classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}"/>
+ <!--
+ <jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8787"/>
+ -->
+ </java>
+ <antcall target="undeploy"/>
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/messaging-servlet-service.xml" quiet="true"/>
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/remoting-servlet-service.xml" quiet="true"/>
+ <delete dir="${jboss.home}/server/${jboss.configuration}/deploy/servlet-invoker.war"/>
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true"/>
+ <delete dir="../common/output" quiet="true"/>
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..."/>
+ <sleep seconds="${sleep.interval}"/>
+ </target>
+
+</project>
+
Copied: branches/Branch_1416_merge/docs/examples/servlet/etc (from rev 5773, branches/Branch_1_4/docs/examples/servlet/etc)
Deleted: branches/Branch_1416_merge/docs/examples/servlet/etc/jndi.properties
===================================================================
--- branches/Branch_1_4/docs/examples/servlet/etc/jndi.properties 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/servlet/etc/jndi.properties 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,4 +0,0 @@
-### JBossNS properties
-java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
-java.naming.provider.url=http://localhost:8080/invoker/JNDIFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Copied: branches/Branch_1416_merge/docs/examples/servlet/etc/jndi.properties (from rev 5773, branches/Branch_1_4/docs/examples/servlet/etc/jndi.properties)
===================================================================
--- branches/Branch_1416_merge/docs/examples/servlet/etc/jndi.properties (rev 0)
+++ branches/Branch_1416_merge/docs/examples/servlet/etc/jndi.properties 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,4 @@
+### JBossNS properties
+java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
+java.naming.provider.url=http://localhost:8080/invoker/JNDIFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Deleted: branches/Branch_1416_merge/docs/examples/servlet/etc/log4j.xml
===================================================================
--- branches/Branch_1_4/docs/examples/servlet/etc/log4j.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/servlet/etc/log4j.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- $Id: log4j.xml 952 2006-05-17 19:26:54Z ovidiu $ -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.out"/>
- <param name="Threshold" value="INFO"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p @%t [%c{1}] %m%n"/>
- </layout>
- </appender>
-
- <root>
- <appender-ref ref="CONSOLE"/>
- </root>
-
-</log4j:configuration>
Copied: branches/Branch_1416_merge/docs/examples/servlet/etc/log4j.xml (from rev 5773, branches/Branch_1_4/docs/examples/servlet/etc/log4j.xml)
===================================================================
--- branches/Branch_1416_merge/docs/examples/servlet/etc/log4j.xml (rev 0)
+++ branches/Branch_1416_merge/docs/examples/servlet/etc/log4j.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- $Id: log4j.xml 952 2006-05-17 19:26:54Z ovidiu $ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p @%t [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+
+</log4j:configuration>
Deleted: branches/Branch_1416_merge/docs/examples/servlet/etc/messaging-servlet-service.xml
===================================================================
--- branches/Branch_1_4/docs/examples/servlet/etc/messaging-servlet-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/servlet/etc/messaging-servlet-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Servlet Transport Example.
-
- $Id: messaging-http-service.xml 2773 2007-06-12 13:31:30Z sergeypk $
- -->
-
-<server>
-
- <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
- name="jboss.messaging.destination:service=ServletConnectionFactory"
- xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends optional-attribute-name="Connector">jboss.remoting:service=Connector,transport=servlet,target=jms</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="JNDIBindings">
- <bindings>
- <binding>/ServletConnectionFactory</binding>
- </bindings>
- </attribute>
- </mbean>
-
-</server>
Copied: branches/Branch_1416_merge/docs/examples/servlet/etc/messaging-servlet-service.xml (from rev 5773, branches/Branch_1_4/docs/examples/servlet/etc/messaging-servlet-service.xml)
===================================================================
--- branches/Branch_1416_merge/docs/examples/servlet/etc/messaging-servlet-service.xml (rev 0)
+++ branches/Branch_1416_merge/docs/examples/servlet/etc/messaging-servlet-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Servlet Transport Example.
+
+ $Id: messaging-http-service.xml 2773 2007-06-12 13:31:30Z sergeypk $
+ -->
+
+<server>
+
+ <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
+ name="jboss.messaging.destination:service=ServletConnectionFactory"
+ xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends optional-attribute-name="Connector">jboss.remoting:service=Connector,transport=servlet,target=jms</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="JNDIBindings">
+ <bindings>
+ <binding>/ServletConnectionFactory</binding>
+ </bindings>
+ </attribute>
+ </mbean>
+
+</server>
Copied: branches/Branch_1416_merge/docs/examples/servlet/src (from rev 5773, branches/Branch_1_4/docs/examples/servlet/src)
Copied: branches/Branch_1416_merge/docs/examples/servlet/src/org (from rev 5773, branches/Branch_1_4/docs/examples/servlet/src/org)
Copied: branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss (from rev 5773, branches/Branch_1_4/docs/examples/servlet/src/org/jboss)
Copied: branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example (from rev 5773, branches/Branch_1_4/docs/examples/servlet/src/org/jboss/example)
Copied: branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms (from rev 5773, branches/Branch_1_4/docs/examples/servlet/src/org/jboss/example/jms)
Copied: branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/servlet (from rev 5773, branches/Branch_1_4/docs/examples/servlet/src/org/jboss/example/jms/servlet)
Deleted: branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/servlet/ServletExample.java
===================================================================
--- branches/Branch_1_4/docs/examples/servlet/src/org/jboss/example/jms/servlet/ServletExample.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/servlet/ServletExample.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,140 +0,0 @@
-/*
- * 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.example.jms.servlet;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-import org.jboss.example.jms.common.ExampleSupport;
-
-
-/**
- * The example creates a connection to the default provider and uses the connection to send a
- * message to the queue "queue/testQueue". Then, the example creates a second connection to the
- * provider and uses it to receive the message.
- *
- * Since this example is also used by the smoke test, it is essential that the VM exits with exit
- * code 0 in case of successful execution and a non-zero value on failure.
- *
- * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision: 2977 $</tt>
- *
- * $Id: HttpExample.java 2977 2007-08-08 15:32:14Z timfox $
- */
-public class ServletExample extends ExampleSupport
-{
-
- public void example() throws Exception
- {
- String destinationName = getDestinationJNDIName();
-
- InitialContext ic = null;
- ConnectionFactory cf = null;
- Connection connection = null;
- Connection connection2 = null;
-
- try
- {
- ic = new InitialContext();
-
- cf = (ConnectionFactory)ic.lookup("/ServletConnectionFactory");
- log("ocnnection factory: " + cf);
- Queue queue = (Queue)ic.lookup(destinationName);
- log("Queue " + destinationName + " exists");
-
- connection = cf.createConnection();
- Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer sender = session.createProducer(queue);
-
- TextMessage message = session.createTextMessage("Hello!");
- sender.send(message);
- log("The message was successfully sent to the " + queue.getQueueName() + " queue");
-
- connection2 = cf.createConnection();
- Session session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageConsumer consumer = session2.createConsumer(queue);
-
- connection2.start();
-
- message = (TextMessage)consumer.receive(2000);
- log("Received message: " + message.getText());
- assertEquals("Hello!", message.getText());
-
- displayProviderInfo(connection2.getMetaData());
-
- }
- finally
- {
- if(ic != null)
- {
- try
- {
- ic.close();
- }
- catch(Exception e)
- {
- throw e;
- }
- }
-
- //ALWAYS close your connection in a finally block to avoid leaks
- //Closing connection also takes care of closing its related objects e.g. sessions
- closeConnection(connection);
- closeConnection(connection2);
- }
- }
-
- private void closeConnection(Connection con)
- {
- try
- {
- if (con != null)
- {
- con.close();
- }
- }
- catch(JMSException jmse)
- {
- log("Could not close connection " + con +" exception was " +jmse);
- }
- }
-
-
- protected boolean isQueueExample()
- {
- return true;
- }
-
- public static void main(String[] args)
- {
- new ServletExample().run();
- }
-
-}
Copied: branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/servlet/ServletExample.java (from rev 5773, branches/Branch_1_4/docs/examples/servlet/src/org/jboss/example/jms/servlet/ServletExample.java)
===================================================================
--- branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/servlet/ServletExample.java (rev 0)
+++ branches/Branch_1416_merge/docs/examples/servlet/src/org/jboss/example/jms/servlet/ServletExample.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,140 @@
+/*
+ * 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.example.jms.servlet;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+
+import org.jboss.example.jms.common.ExampleSupport;
+
+
+/**
+ * The example creates a connection to the default provider and uses the connection to send a
+ * message to the queue "queue/testQueue". Then, the example creates a second connection to the
+ * provider and uses it to receive the message.
+ *
+ * Since this example is also used by the smoke test, it is essential that the VM exits with exit
+ * code 0 in case of successful execution and a non-zero value on failure.
+ *
+ * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision: 2977 $</tt>
+ *
+ * $Id: HttpExample.java 2977 2007-08-08 15:32:14Z timfox $
+ */
+public class ServletExample extends ExampleSupport
+{
+
+ public void example() throws Exception
+ {
+ String destinationName = getDestinationJNDIName();
+
+ InitialContext ic = null;
+ ConnectionFactory cf = null;
+ Connection connection = null;
+ Connection connection2 = null;
+
+ try
+ {
+ ic = new InitialContext();
+
+ cf = (ConnectionFactory)ic.lookup("/ServletConnectionFactory");
+ log("ocnnection factory: " + cf);
+ Queue queue = (Queue)ic.lookup(destinationName);
+ log("Queue " + destinationName + " exists");
+
+ connection = cf.createConnection();
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageProducer sender = session.createProducer(queue);
+
+ TextMessage message = session.createTextMessage("Hello!");
+ sender.send(message);
+ log("The message was successfully sent to the " + queue.getQueueName() + " queue");
+
+ connection2 = cf.createConnection();
+ Session session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageConsumer consumer = session2.createConsumer(queue);
+
+ connection2.start();
+
+ message = (TextMessage)consumer.receive(2000);
+ log("Received message: " + message.getText());
+ assertEquals("Hello!", message.getText());
+
+ displayProviderInfo(connection2.getMetaData());
+
+ }
+ finally
+ {
+ if(ic != null)
+ {
+ try
+ {
+ ic.close();
+ }
+ catch(Exception e)
+ {
+ throw e;
+ }
+ }
+
+ //ALWAYS close your connection in a finally block to avoid leaks
+ //Closing connection also takes care of closing its related objects e.g. sessions
+ closeConnection(connection);
+ closeConnection(connection2);
+ }
+ }
+
+ private void closeConnection(Connection con)
+ {
+ try
+ {
+ if (con != null)
+ {
+ con.close();
+ }
+ }
+ catch(JMSException jmse)
+ {
+ log("Could not close connection " + con +" exception was " +jmse);
+ }
+ }
+
+
+ protected boolean isQueueExample()
+ {
+ return true;
+ }
+
+ public static void main(String[] args)
+ {
+ new ServletExample().run();
+ }
+
+}
Property changes on: branches/Branch_1416_merge/docs/examples/stateless
___________________________________________________________________
Name: svn:ignore
+ output
Modified: branches/Branch_1416_merge/docs/examples/stateless/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/stateless/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/stateless/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -19,10 +19,9 @@
<property name="jboss.home" value="${ENV.JBOSS_HOME}" />
<property name="jboss.configuration" value="messaging" />
<property name="example.queue.name" value="testQueue" />
-
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -35,9 +34,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="###########################################################################" />
<echo message="# Running the STATELESS SESSION BEAN example #" />
Copied: branches/Branch_1416_merge/docs/examples/stateless/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/stateless/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/stateless/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/stateless/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 5408 2008-11-21 04:43:36Z clebert.suconic at jboss.com $
+
+ -->
+
+<project name="StatelessExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging" />
+ <property name="example.queue.name" value="testQueue" />
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the STATELESS SESSION BEAN example #" />
+ <echo message="###########################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.name}" />
+ <fail message="Could not find client jar ${messaging.client.jar.name}" unless="client.jar.present" />
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes/META-INF" />
+ <mkdir dir="./output/lib" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="jar" depends="compile">
+ <copy todir="./output/classes/META-INF">
+ <fileset dir="./etc/META-INF" includes="*" />
+ </copy>
+ <jar destfile="./output/lib/stateless-example.jar" basedir="./output/classes" includes="META-INF/**,org/jboss/example/jms/stateless/bean/*.class" />
+ </target>
+
+ <target name="deploy" depends="jar">
+ <copy file="./output/lib/stateless-example.jar" todir="${jboss.home}/server/${jboss.configuration}/deploy" />
+ <antcall target="sleep">
+ <param name="sleep.interval" value="5" />
+ </antcall>
+ </target>
+
+ <target name="run" depends="deploy">
+ <antcall target="send-and-receive" />
+ <antcall target="undeploy" />
+ </target>
+
+ <target name="send-and-receive">
+ <!-- The client expects to find the name of the queue to connect to as value of the
+ 'example.queue.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.stateless.client.Client" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/stateless-example.jar" quiet="true" />
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..." />
+ <sleep seconds="${sleep.interval}" />
+ </target>
+
+</project>
+
Modified: branches/Branch_1416_merge/docs/examples/stateless-clustered/README.html
===================================================================
--- branches/Branch_1416_merge/docs/examples/stateless-clustered/README.html 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/stateless-clustered/README.html 2009-02-02 11:06:59 UTC (rev 5774)
@@ -26,6 +26,7 @@
documentation. However, the example will automatically deploy its own
queue, unless a queue with the same name is already deployed.
</p>
+<br>
<p>
This example also relies on having access to <tt>jboss-messaging-client.jar</tt>
archive that comes with the release bundle. If you run this example
@@ -33,7 +34,18 @@
configured to find the client jar. Otherwise, you must modify example's
<tt>build.xml</tt> accordingly.
</p>
+<br><br>
+For JBoss5, you should copy all as messaging-node0, configure mysql as a database, make it clustered, and copy it as messaging-node1. Start each instance as:
+<br><br>
+./run -c messaging-node0 -Djboss.service.binding.set=ports-01
+<br><br>
+<br>
+and in another window
+<br><br>
+./run.sh -c messaging-node1 -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=1
+<br><br>
+
<h2>Running the example</h2>
<p>
1. Set up the JBOSS_HOME environment variable to point to the JBoss
Modified: branches/Branch_1416_merge/docs/examples/stateless-clustered/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/stateless-clustered/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/stateless-clustered/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -19,10 +19,9 @@
<property name="jboss.home" value="${ENV.JBOSS_HOME}" />
<property name="jboss.configuration" value="messaging-node0" />
<property name="example.queue.name" value="testFarmQueue" />
-
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -35,9 +34,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="###########################################################################" />
<echo message="# Running the STATELESS CLUSTERED SESSION BEAN example #" />
Copied: branches/Branch_1416_merge/docs/examples/stateless-clustered/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/stateless-clustered/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/stateless-clustered/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/stateless-clustered/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 5408 2008-11-21 04:43:36Z clebert.suconic at jboss.com $
+
+ -->
+
+<project name="StatelessClusteredExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging-node0" />
+ <property name="example.queue.name" value="testFarmQueue" />
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the STATELESS CLUSTERED SESSION BEAN example #" />
+ <echo message="###########################################################################" />
+ <echo message="The queue: ${example.queue.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fail message="Could not find client jar ${messaging.client.jar.name}" unless="client.jar.present" />
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes/META-INF" />
+ <mkdir dir="./output/lib" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="jar" depends="compile">
+ <copy todir="./output/classes/META-INF">
+ <fileset dir="./etc/META-INF" includes="*" />
+ </copy>
+ <jar destfile="./output/lib/stateless-clustered-example.jar" basedir="./output/classes" includes="META-INF/**,org/jboss/example/jms/statelessclustered/bean/*.class" />
+ </target>
+
+ <target name="deploy" depends="jar">
+ <copy file="./etc/destinations-farm-service.xml" todir="${jboss.home}/server/${jboss.configuration}/farm" />
+ <copy file="./output/lib/stateless-clustered-example.jar" todir="${jboss.home}/server/${jboss.configuration}/farm" />
+ <antcall target="sleep">
+ <param name="sleep.interval" value="15" />
+ </antcall>
+ </target>
+
+ <target name="run" depends="deploy">
+ <antcall target="send-and-receive" />
+ <antcall target="undeploy" />
+ </target>
+
+ <target name="send-and-receive">
+ <!-- The client expects to find the name of the queue to connect to as value of the
+ 'example.queue.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.statelessclustered.client.Client" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/farm/stateless-clustered-example.jar" quiet="true" />
+ <delete file="${jboss.home}/server/${jboss.configuration}/farm/destinations-farm-service.xml" quiet="true" />
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..." />
+ <sleep seconds="${sleep.interval}" />
+ </target>
+
+</project>
+
Property changes on: branches/Branch_1416_merge/docs/examples/topic
___________________________________________________________________
Name: svn:ignore
+ output
Modified: branches/Branch_1416_merge/docs/examples/topic/build.xml
===================================================================
--- branches/Branch_1416_merge/docs/examples/topic/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/examples/topic/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -19,10 +19,9 @@
<property name="jboss.home" value="${ENV.JBOSS_HOME}" />
<property name="jboss.configuration" value="messaging" />
<property name="example.topic.name" value="testTopic" />
-
+
<path id="common.compilation.classpath">
<fileset file="${jboss.home}/client/jboss-j2ee.jar" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
<fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
</path>
@@ -35,9 +34,15 @@
<pathelement path="./etc" />
<pathelement path="../common/output/classes" />
<pathelement path="./output/classes" />
- <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar" />
+ <fileset file="${jboss.home}/client/jbossall-client.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" />
+ <fileset file="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar" />
</path>
-
+
<target name="identify">
<echo message="###########################################################################" />
<echo message="# Running the TOPIC example #" />
@@ -52,16 +57,16 @@
</target>
<target name="init" depends="sanity-check">
- <mkdir dir="./output" />
- <mkdir dir="../common/output" />
+ <mkdir dir="./output/classes" />
+ <mkdir dir="../common/output/classes" />
</target>
<target name="compile" depends="init">
- <javac destdir="../common/output" debug="on" debuglevel="lines,vars,source">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
<src path="../common/src" />
<classpath refid="common.compilation.classpath" />
</javac>
- <javac destdir="./output" debug="on" debuglevel="lines,vars,source">
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
<src path="./src" />
<classpath refid="example.compilation.classpath" />
</javac>
Copied: branches/Branch_1416_merge/docs/examples/topic/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/topic/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/topic/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/topic/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 5408 2008-11-21 04:43:36Z clebert.suconic at jboss.com $
+
+ -->
+
+<project name="TopicExample" default="run">
+
+ <property environment="ENV" />
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties" />
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging" />
+ <property name="example.topic.name" value="testTopic" />
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-javaee.jar" />
+ <fileset file="${messaging.client.jar.name}" />
+ </path>
+
+ <path id="example.compilation.classpath">
+ <path refid="common.compilation.classpath" />
+ <pathelement path="../common/output/classes" />
+ </path>
+
+ <path id="execution.classpath">
+ <pathelement path="./etc" />
+ <pathelement path="../common/output/classes" />
+ <pathelement path="./output/classes" />
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################" />
+ <echo message="# Running the TOPIC example #" />
+ <echo message="###########################################################################" />
+ <echo message="The topic: ${example.topic.name}" />
+ <echo message="The client jar: ${messaging.client.jar.name}" />
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.name}" />
+ <fail message="Could not find client jar ${messaging.client.jar.name}" unless="client.jar.present" />
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes" />
+ <mkdir dir="../common/output/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src" />
+ <classpath refid="common.compilation.classpath" />
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src" />
+ <classpath refid="example.compilation.classpath" />
+ </javac>
+ </target>
+
+ <target name="run" depends="compile">
+ <!-- TopicExample expects to find the name of the topic to connect to as value of the
+ 'example.topic.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.topic.TopicExample" classpathref="execution.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.topic.name" value="${example.topic.name}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ </target>
+
+ <target name="clean">
+ <delete dir="./output" quiet="true" />
+ <delete dir="../common/output" quiet="true" />
+ </target>
+
+</project>
+
Copied: branches/Branch_1416_merge/docs/examples/web-service/build.xml.AS5 (from rev 5773, branches/Branch_1_4/docs/examples/web-service/build.xml.AS5)
===================================================================
--- branches/Branch_1416_merge/docs/examples/web-service/build.xml.AS5 (rev 0)
+++ branches/Branch_1416_merge/docs/examples/web-service/build.xml.AS5 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+ $Id: build.xml 5302 2008-11-07 05:44:31Z clebert.suconic at jboss.com $
+
+ -->
+
+<project name="WebServicesExample" default="run">
+
+ <property environment="ENV"/>
+
+ <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+ <property file="../examples.properties"/>
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}" />
+ <property name="messaging.client.jar.name" value="${jboss.home}/client/jboss-messaging-client.jar" />
+ <property name="jboss.configuration" value="messaging"/>
+ <property name="example.queue.name" value="testQueue"/>
+
+ <path id="common.compilation.classpath">
+ <fileset file="${jboss.home}/client/jboss-j2ee.jar"/>
+ <fileset dir="${jboss.home}/client" includes="*.jar" />
+ <fileset file="${messaging.client.jar.name}"/>
+ </path>
+
+ <property name="jboss.client" value="${jboss.home}/client"/>
+
+ <path id="runtime.classpath">
+ <path refid="common.compilation.classpath"/>
+ <pathelement path="./etc"/>
+ <pathelement path="../common/output/classes"/>
+ <pathelement path="./output/classes"/>
+ <pathelement location="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
+
+ <!-- all this stuff for WebServices -->
+ <pathelement location="${jboss.home}/lib/endorsed/xercesImpl.jar"/>
+ <pathelement location="${jboss.client}/activation.jar"/>
+ <pathelement location="${jboss.client}/commons-logging.jar"/>
+ <pathelement location="${jboss.client}/javassist.jar"/>
+ <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement location="${jboss.client}/jbossws-client.jar"/>
+ <pathelement location="${jboss.client}/log4j.jar"/>
+ <pathelement location="${jboss.client}/mail.jar"/>
+ <pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
+ <pathelement location="${jboss.client}/jboss-jaxws.jar"/>
+ <pathelement location="${jboss.client}/jboss-jaxrpc.jar"/>
+ <pathelement location="${jboss.client}/jboss-saaj.jar"/>
+ <pathelement location="${jboss.client}/wsdl4j.jar"/>
+ <pathelement location="${jboss.client}/jaxb-api.jar"/>
+ </path>
+
+ <path id="client.classpath">
+ <path refid="common.compilation.classpath"/>
+ <pathelement path="./etc"/>
+ <pathelement path="../common/output/classes"/>
+ <pathelement path="./output/client-classes"/>
+
+ <!-- all this stuff for WebServices -->
+ <fileset file="${jboss.home}/server/${jboss.configuration}/lib/jboss-remoting.jar"/>
+ <pathelement location="${jboss.client}/activation.jar"/>
+ <pathelement location="${jboss.client}/commons-logging.jar"/>
+ <pathelement location="${jboss.client}/javassist.jar"/>
+ <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement location="${jboss.client}/jbossws-client.jar"/>
+ <pathelement location="${jboss.client}/log4j.jar"/>
+ <pathelement location="${jboss.client}/mail.jar"/>
+ <pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
+ <pathelement location="${jboss.client}/jboss-jaxws.jar"/>
+ <pathelement location="${jboss.client}/jboss-jaxrpc.jar"/>
+ <pathelement location="${jboss.client}/jboss-saaj.jar"/>
+ <pathelement location="${jboss.client}/wsdl4j.jar"/>
+ <pathelement location="${jboss.client}/jaxb-api.jar"/>
+ <pathelement location="${jboss.home}/lib/endorsed/xercesImpl.jar"/>
+
+
+ <pathelement location="${messaging.client.jar.name}"/>
+ <pathelement location="${jboss.home}/client/jbossall-client.jar"/>
+ <pathelement location="${jboss.home}/server/${jboss.configuration}/lib/log4j.jar"/>
+ <pathelement location="${jboss.home}/server/${jboss.configuration}/lib/javassist.jar"/>
+ <pathelement location="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+ <pathelement location="${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar"/>
+
+
+ </path>
+
+ <target name="identify">
+ <echo message="###########################################################################"/>
+ <echo message="# Running the WebServices example #"/>
+ <echo message="###########################################################################"/>
+ <echo message="The queue: ${example.queue.name}"/>
+ <echo message="The client jar: ${messaging.client.jar.name}"/>
+ </target>
+
+ <target name="sanity-check" depends="identify">
+ <available property="client.jar.present" file="${messaging.client.jar.name}"/>
+ <fail message="Could not find client jar ${messaging.client.jar.name}"
+ unless="client.jar.present"/>
+ </target>
+
+ <target name="init" depends="sanity-check">
+ <mkdir dir="./output/classes/META-INF"/>
+ <mkdir dir="./output/lib"/>
+ <mkdir dir="../common/output/classes"/>
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="../common/output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="../common/src"/>
+ <classpath refid="common.compilation.classpath"/>
+ </javac>
+ <javac destdir="./output/classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./src"/>
+ <classpath refid="runtime.classpath"/>
+ </javac>
+ </target>
+
+ <target name="run-wsdl-client" depends="compile">
+ <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
+ <classpath refid="runtime.classpath"/>
+ </taskdef>
+
+ <mkdir dir="./output/client"/>
+
+ <get src="http://127.0.0.1:8080/jms-web-service/JMSWebServiceExample?wsdl" dest="./output/service.wsdl" />
+
+ <wstools config="./etc/client-config/client-config.xml"
+ dest="./output/client"/>
+ </target>
+
+
+ <target name="war" depends="compile">
+ <jar destfile="./output/lib/jms-web-service.war">
+ <zipfileset dir="./output/classes" prefix="WEB-INF/classes"/>
+ <zipfileset dir="./etc/WEB-INF" prefix="WEB-INF"/>
+ </jar>
+ </target>
+
+ <target name="deploy" depends="war">
+ <copy file="./output/lib/jms-web-service.war"
+ todir="${jboss.home}/server/${jboss.configuration}/deploy"/>
+ <antcall target="sleep"><param name="sleep.interval" value="10"/></antcall>
+ </target>
+
+ <target name="compile-client">
+ <mkdir dir="./output/client-classes"/>
+ <javac destdir="./output/client-classes" debug="on" debuglevel="lines,vars,source">
+ <src path="./output/client"/>
+ <src path="./src-client"/>
+ <classpath refid="runtime.classpath"/>
+ </javac>
+ </target>
+
+
+ <target name="run" depends="deploy, run-wsdl-client, compile-client">
+ <antcall target="send-and-receive"/>
+ <antcall target="undeploy"/>
+ </target>
+
+ <target name="send-and-receive">
+ <!-- The client expects to find the name of the queue to connect to as value of the
+ 'example.queue.name' property, which *may* be defined by calling ants when this example
+ is used in a smoke test -->
+ <java classname="org.jboss.example.jms.webservices.client.Client"
+ classpathref="client.classpath" fork="yes" failonerror="true">
+ <sysproperty key="example.queue.name" value="${example.queue.name}"/>
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+ -->
+ </java>
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.configuration}/deploy/jms-web-service.war"
+ quiet="true"/>
+ </target>
+
+ <target name="clean" depends="undeploy">
+ <delete dir="./output" quiet="true"/>
+ <delete dir="../common/output" quiet="true"/>
+ </target>
+
+ <target name="sleep">
+ <echo message="Sleeping for ${sleep.interval} seconds ..."/>
+ <sleep seconds="${sleep.interval}"/>
+ </target>
+
+</project>
+
Modified: branches/Branch_1416_merge/docs/userguide/en/modules/about.xml
===================================================================
--- branches/Branch_1416_merge/docs/userguide/en/modules/about.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/userguide/en/modules/about.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="about">
- <title>About JBoss Messaging 1.4.1</title>
+ <title>About JBoss Messaging 1.4</title>
<para>JBoss Messaging is the new enterprise messaging system from JBoss. It
is a complete rewrite of JBossMQ, the legacy JBoss JMS provider.</para>
@@ -31,4 +31,4 @@
<para>Permanent Team: Tim Fox (Project Lead), Jeff Mesnil (Core Developer),
Andy Taylor (Core Developer), Clebert Suconic (Core Developer), Howard Gao (Core Developer)</para>
-</chapter>
\ No newline at end of file
+</chapter>
Modified: branches/Branch_1416_merge/docs/userguide/en/modules/configuration.xml
===================================================================
--- branches/Branch_1416_merge/docs/userguide/en/modules/configuration.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/userguide/en/modules/configuration.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -31,85 +31,6 @@
considered the security implications before removing the security
interceptor.</para>
- <section id="conf.jb5.securityMetadataStore">
- <title>JBoss5 Specific - Configuring the SecurityStore</title>
-
- <para>Starting on JBossMessaging 1.4.1 the SecurityStore is a pluggable
- object, and it has a default implementation on
- messaging-service.xml.</para>
-
- <programlisting> <!-- The SecurityStore mbean -->
- <mbean code="org.jboss.jms.server.security.SecurityMetadataStore"
- name="jboss.messaging:service=SecurityStore">
-
- <!-- The default security configuration to apply to destinations - this can be overridden on a per destination basis
- -->
- <attribute name="DefaultSecurityConfig">
- <security>
- <role name="guest" read="true" write="true" create="true"/>
- </security>
- </attribute>
-
- <!-- The JAAS security domain to use for JBoss Messaging -->
- <attribute name="SecurityDomain">java:/jaas/messaging</attribute>
-
- <!--
- This attribute defines what's the SuckerPassword used on this SecurityStore
- -->
- <attribute name="SuckerPassword">CHANGE ME!!</attribute>
- </mbean> </programlisting>
-
- <section id="conf.securityMetadataStore.attributes">
- <title>SecurityStore Attributes</title>
-
- <section id="conf.securityMetadataStore.attributes.defaultsecurity">
- <title>DefaultSecurityConfig</title>
-
- <para>Default security configuration is used when the security
- configuration for a specific queue or topic has not been overridden in
- the destination's deployment descriptor. It has exactly the same
- syntax and semantics as in JBossMQ.</para>
-
- <para>The <literal>DefaultSecurityConfig</literal> attribute element
- should contain one <literal><security></literal> element. The
- <literal><security></literal> element can contain multiple
- <literal><role></literal> elements. Each
- <literal><role></literal> element defines the default access for
- that particular role.</para>
-
- <para>If the <literal>read</literal> attribute is
- <literal>true</literal> then that role will be able to read (create
- consumers, receive messaages or browse) destinations by
- default.</para>
-
- <para>If the <literal>write</literal> attribute is
- <literal>true</literal> then that role will be able to write (create
- producers or send messages) to destinations by default.</para>
-
- <para>If the <literal>create</literal> attribute is
- <literal>true</literal> then that role will be able to create durable
- subscriptions on topics by default.</para>
- </section>
-
- <section id="conf.securityMetadataStore.attributes.securitydomain">
- <title>SecurityDomain</title>
-
- <para>The JAAS security domain to be used by this server peer</para>
- </section>
-
- <section id="conf.securityMetadataStore.attributes.suckerpassword">
- <title>SuckerPassword</title>
-
- <para>This defines how the SecurityStore will authenticate the sucker
- user (JBM.SUCKER)</para>
- </section>
- </section>
- </section>
-
- <section id="conf.jb4.security">
- <title>JBoss4/EAP4.3 Specific - Configuring the SecurityStore</title>
- </section>
-
<section id="conf.serverpeer">
<title>Configuring the ServerPeer</title>
@@ -2505,7 +2426,7 @@
which is very useful during development. You could have multiple IPs on the same server and bind each server on a different IP if you wanted to deal with OS configs,
but case you prefer not dealing with OS configs you have the option of using the ServiceBindingManager.</para>
- <para>On JBoss4 you must match the remoting configs accordingly to remoting-bisocket-service.xml. On JBoss5 there is a simpler configuration where you just define the Ports using properties.</para>
+ <para>On JBoss4 you must match the remoting configs accordingly to remoting-bisocket-service.xml. </para>
<para>If you are using a newer version of JBM in an older version of JBAS
then the example bindings in the AS distribution may well be out of date.
Modified: branches/Branch_1416_merge/docs/userguide/en/modules/installation.xml
===================================================================
--- branches/Branch_1416_merge/docs/userguide/en/modules/installation.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/userguide/en/modules/installation.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -9,7 +9,7 @@
<para>Please note that JBoss EAP 4.3 and JBoss 5 comes with JBoss Messaging
pre-installed as default JMS provider so if you are using that, there is no need to manually
- install JBoss Messaging</para>
+ install JBoss Messaging.</para>
<para>By default, JBoss AS 4.2 ships with JBossMQ as default JMS provider.
In order to use the JBoss AS instance with JBoss Messaging, you need to
@@ -175,12 +175,7 @@
<listitem>
<para>If you want to run multiple JBoss Messaging nodes on the same
box using the same IP address, e.g. for development purposes, then
- you can use the ServiceBindingManager to do this as follows:</para>
-
- <para><warning>JBoss5 has introduced a much simpler ServiceBindingManager.
- You should refer to the JBoss5 documentation about how to administer the new bindingManager if you are using JBoss5.
- </warning></para>
-
+ you can use the ServiceBindingManager to do this as follows:</para>
<itemizedlist>
<listitem>
@@ -250,7 +245,8 @@
</programlisting>
- <warning>You must ensure that the config (like above) is
+ <warning>The above config only apply to JBoss 4.2 and EAP 4.3.
+ On EAP4.3 and JBOSS 4.2 You must ensure that the config (like above) is
identical to that in
<literal>remoting-bisocket-service.xml</literal> With the
exception of the actual serverBindPort which clearly must be
@@ -260,7 +256,8 @@
may be out of date and you will need to copy the config from
<literal>remoting-bisocket-service.xml. DO NOT just copy and
paste from the above example - copy it from the JBoss Messaging
- distribution.</literal></warning>
+ distribution.</literal>.
+ </warning>
<para>You should ensure that each node is configured to use a
different ports range.</para>
@@ -611,17 +608,16 @@
<listitem>
<para>
<note>
- JBoss Messaging 1.4.1.GA requires pecific versions
- of jboss-remoting.jar if used outside of JBoss 5. If you are installing JBoss Messaging 1.4.1.GA at JBoss 4.2+, you should use this version:
- <ulink url="http://repository.jboss.com/jboss/remoting/2.5.0.SP1/ ">Remoting 2.5.0.SP1</ulink>.
- If you are using JBoss5 you don't need to take any extra steps on the remoting installation.
- </note>
+ JBoss Messaging 1.4 requires a patched version of jboss-remoting.jar. This version is available
+ and can be downloaded from <ulink url="http://repository.jboss.com/jboss/remoting/2.2.2.SP11-brew/"> here</ulink>.
+ The version is JBoss Remoting 2.2.2.SP11-brew. Please download it and copy it into the
+ <literal>$JBOSS_HOME/server/<your server name>/lib</literal> directory of any server profiles that use JBoss
+ Messaging. If you are using JBoss Messaging from a standalone client also make sure this jar is on your
+ classpath *before* jbossall-client.jar.
+ </note>
</para>
</listitem>
- <para>You should also make these changes on any configuration you
- choose, to remove all references to the old JBossMQ:</para>
-
<listitem>
<para>Edit <literal>$JBOSS_CONFIG/deploy/jms-ds.xml</literal> and
replace jboss.mq by jboss.messaging on every occurrence</para>
@@ -904,7 +900,7 @@
</section>
<section id="inst.remoteclient">
- <title>Accessing JBoss Messaging from a remote client</title>
+ <title>Accessing JBoss Messaging from a remote client - JBoss 4.2 and EAP 4.3</title>
<para>In order to access JBoss Messaging from a client outside the JBoss
app server, you will need to ensure the following jar files are on the
@@ -913,14 +909,11 @@
<itemizedlist>
<listitem>
<para><note>
- If you are using JBoss Messaging 1.4.1 outiside of JBoss 5 or EAP 4.3, you need to make sure you use a JBoss Remoting 2.5.0.SP1. If you are using JBoss5 or EAP 4.3 you will have the required JAR available already:
- The version could be found at:
-
- <ulink
- url="http://repository.jboss.com/jboss/remoting/2.5.0.SP1/lib/">here</ulink>
-
- . Please download it and make sure this jar is on your classpath *before* jbossall-client.jar.
- </note></para>
+ JBoss Messaging 1.4 requires a patched version of jboss-remoting.jar. The version is JBoss Remoting
+ 2.2.2.SP11-brew. This version is available on JBoss EAP 4.3, so if you're using a different version you
+ should download it. The patched jar can be found at <ulink url="http://repository.jboss.com/jboss/remoting/2.2.2.SP11-brew/lib/">here</ulink>.
+ Please download it and make sure this jar is on your classpath *before* jbossall-client.jar.
+ </note></para>
</listitem>
<listitem>
@@ -936,9 +929,9 @@
<listitem>
<para>$JBOSS_HOME/server/<SERVER_NAME>/deploy/jboss-aop.deployer/jboss-aop.jar</para>
- <para>JBoss AOP 2.0.0.GA</para>
+ <para>JBoss AOP 1.5.5.GA_CP03-brew</para>
- <para><ulink url="http://repository.jboss.com/jboss/aop/2.0.0.GA/lib/">http://repository.jboss.com/jboss/aop/2.0.0.GA/lib/</ulink></para>
+ <para><ulink url="http://repository.jboss.com/jboss/aop/1.5.5.GA_CP03-brew/lib/">http://repository.jboss.com/jboss/aop/1.5.5.GA_CP03-brew/lib/</ulink></para>
<para>(For AOP, sometimes you have to use a specific JAR according to
your JVM of choice. Use the most convenient for you)</para>
@@ -947,10 +940,10 @@
<listitem>
<para>$JBOSS_HOME/server/<SERVER_NAME>/lib/javassist.jar</para>
- <para>Javassist 3.9.0.GA-brew</para>
+ <para>Javassist 3.8.0.GA</para>
<para><ulink
- url="http://repository.jboss.com/javassist/3.9.0.GA-brew/lib/">http://repository.jboss.com/javassist/3.9.0.GA-brew/lib/</ulink></para>
+ url="http://repository.jboss.com/javassist/3.8.0.GA-brew/lib/">http://repository.jboss.com/javassist/3.8.0.GA-brew/lib/</ulink></para>
</listitem>
<listitem>
@@ -1219,4 +1212,4 @@
setting the subscription name and client id. You can see these arguments
in the JBM Bridge chapter.</para>
</section>
-</chapter>
\ No newline at end of file
+</chapter>
Modified: branches/Branch_1416_merge/docs/userguide/en/modules/runningexamples.xml
===================================================================
--- branches/Branch_1416_merge/docs/userguide/en/modules/runningexamples.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/docs/userguide/en/modules/runningexamples.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -3,8 +3,12 @@
<title>Running the Examples</title>
<para>In the directory <literal>docs/examples</literal>, you will find a set
- of examples demonstrating JBoss Messaging working in various examples, they
- include: <itemizedlist>
+ of examples demonstrating JBoss Messaging working in various examples</para>
+
+ <para>Before running these examples, you must deploy the example-destinations located under /docs/examples/destinations</para>
+
+ <para>Examples list:
+ <itemizedlist>
<listitem>
<para>docs/example/queue</para>
Modified: branches/Branch_1416_merge/integration/AS5/etc/remoting/remoting-sslbisocket-service.xml
===================================================================
--- branches/Branch_1416_merge/integration/AS5/etc/remoting/remoting-sslbisocket-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/integration/AS5/etc/remoting/remoting-sslbisocket-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -23,7 +23,7 @@
<attribute name="dataType" isParam="true">jms</attribute>
<attribute name="socket.check_connection" isParam="true">false</attribute>
<attribute name="serverBindAddress">${jboss.bind.address}</attribute>
- <attribute name="serverBindPort">${jboss.messaging.connector.bisocket.port:4459}</attribute>
+ <attribute name="serverBindPort">4459</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="serverSocketFactory">jboss.messaging:service=ServerSocketFactory,type=SSL</attribute>
@@ -102,7 +102,7 @@
-->
<attribute name="UseSSLServerSocketFactory">false</attribute>
<!-- This is the url string to the key store to use -->
- <attribute name="KeyStoreURL">messaging.keystore</attribute>
+ <attribute name="KeyStoreURL">${jboss.server.home.url}/deploy/messaging/messaging.keystore</attribute>
<!-- The password for the key store -->
<attribute name="KeyStorePassword">secureexample</attribute>
<!-- The password for the keys (will use KeystorePassword if this is not set explicitly. -->
Modified: branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/db2-persistence-service.xml
===================================================================
--- branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/db2-persistence-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/db2-persistence-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -150,7 +150,7 @@
<attribute name="FailoverOnNodeLeave">false</attribute>
- <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
+ <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute>
<attribute name="ControlChannelName">jbm-control</attribute>
<attribute name="DataChannelName">jbm-data</attribute>
<attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
Modified: branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/mssql-persistence-service.xml
===================================================================
--- branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/mssql-persistence-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/mssql-persistence-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -146,7 +146,7 @@
<attribute name="FailoverOnNodeLeave">false</attribute>
- <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
+ <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute>
<attribute name="ControlChannelName">jbm-control</attribute>
<attribute name="DataChannelName">jbm-data</attribute>
<attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
Modified: branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/mysql-persistence-service.xml
===================================================================
--- branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/mysql-persistence-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/mysql-persistence-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -146,7 +146,7 @@
<attribute name="FailoverOnNodeLeave">false</attribute>
- <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
+ <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute>
<attribute name="ControlChannelName">jbm-control</attribute>
<attribute name="DataChannelName">jbm-data</attribute>
<attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
Modified: branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/ndb-persistence-service.xml
===================================================================
--- branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/ndb-persistence-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/ndb-persistence-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -148,7 +148,7 @@
<attribute name="FailoverOnNodeLeave">false</attribute>
- <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
+ <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute>
<attribute name="ControlChannelName">jbm-control</attribute>
<attribute name="DataChannelName">jbm-data</attribute>
<attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
Modified: branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/null-persistence-service.xml
===================================================================
--- branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/null-persistence-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/null-persistence-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -53,7 +53,7 @@
<attribute name="FailoverOnNodeLeave">false</attribute>
- <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
+ <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute>
<attribute name="ControlChannelName">jbm-control</attribute>
<attribute name="DataChannelName">jbm-data</attribute>
<attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
Modified: branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/oracle-persistence-service.xml
===================================================================
--- branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/oracle-persistence-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/oracle-persistence-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -150,7 +150,7 @@
<attribute name="FailoverOnNodeLeave">false</attribute>
- <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
+ <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute>
<attribute name="ControlChannelName">jbm-control</attribute>
<attribute name="DataChannelName">jbm-data</attribute>
<attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
Modified: branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/postgresql-persistence-service.xml
===================================================================
--- branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/postgresql-persistence-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/postgresql-persistence-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -146,7 +146,7 @@
<attribute name="FailoverOnNodeLeave">false</attribute>
- <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
+ <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute>
<attribute name="ControlChannelName">jbm-control</attribute>
<attribute name="DataChannelName">jbm-data</attribute>
<attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
Modified: branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/sybase-persistence-service.xml
===================================================================
--- branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/sybase-persistence-service.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/integration/AS5/etc/server/default/deploy/sybase-persistence-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -151,7 +151,7 @@
<attribute name="FailoverOnNodeLeave">false</attribute>
- <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
+ <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute>
<attribute name="ControlChannelName">jbm-control</attribute>
<attribute name="DataChannelName">jbm-data</attribute>
<attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
Copied: branches/Branch_1416_merge/integration/EAP4/etc/remoting/remoting-servlet-service.xml (from rev 5773, branches/Branch_1_4/integration/EAP4/etc/remoting/remoting-servlet-service.xml)
===================================================================
--- branches/Branch_1416_merge/integration/EAP4/etc/remoting/remoting-servlet-service.xml (rev 0)
+++ branches/Branch_1416_merge/integration/EAP4/etc/remoting/remoting-servlet-service.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Servlet-based Remoting service deployment descriptor.
+
+ -->
+
+<server>
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=servlet,target=jms"
+ display-name="JMS Servlet transport Connector">
+ <attribute name="Configuration">
+ <config>
+ <invoker transport="servlet">
+ <!-- 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>
+ <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
+ <attribute name="serverBindPort">8080</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>
+ <attribute name="callbackStore">org.jboss.remoting.callback.BlockingCallbackStore</attribute>
+ <attribute name="unwrapSingletonArrays">true</attribute>
+ <attribute name="path">servlet-invoker/JmsServerInvokerServlet</attribute>
+ <attribute name="return-exception">true</attribute>
+ <attribute name="createUniqueObjectName">true</attribute>
+ <attribute name="useAllParams" isParam="true">true</attribute>
+ <!-- End immutable parameters -->
+
+ <attribute name="stopLeaseOnFailure" isParam="true">true</attribute>
+
+ <!-- Periodicity of client pings. Server window by default is twice this figure -->
+ <attribute name="clientLeasePeriod" isParam="true">10000</attribute>
+ <attribute name="validatorPingPeriod" isParam="true">10000</attribute>
+ <attribute name="validatorPingTimeout" isParam="true">5000</attribute>
+ <attribute name="registerCallbackListener">false</attribute>
+
+ <attribute name="timeout" isParam="true">0</attribute>
+
+ <!-- Set this to true if you want the servlet transport to block waiting for server->client traffic.
+ Or false if you want it to poll for new traffic periodically. Recommended is blocking -->
+ <attribute name="blockingMode" isParam="true">blocking</attribute>
+
+ <!-- Timeout for blocking. Only has relevance if blockingMode = blocking -->
+ <attribute name="blockingTimeout" isParam="true">30000</attribute>
+
+ <!-- The periodicity of polling. Only has relevance if blockingMode = nonblocking -->
+ <!--attribute name="callbackPollPeriod" isParam="true">10000</attribute-->
+ </invoker>
+ <handlers>
+ <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
+ </handlers>
+ </config>
+ </attribute>
+ </mbean>
+
+</server>
Copied: branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war (from rev 5773, branches/Branch_1_4/integration/EAP4/etc/remoting/servlet-invoker.war)
Copied: branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF (from rev 5773, branches/Branch_1_4/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF)
Deleted: branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/web.xml
===================================================================
--- branches/Branch_1_4/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/web.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/web.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<!-- The the JBossRemoting server invoker servlet web.xml descriptor
-$Id: web.xml,v 1.2 2006/07/17 03:44:00 telrod Exp $
--->
-<web-app>
-
- <servlet>
- <servlet-name>JmsServerInvokerServlet</servlet-name>
- <description>The JmsServerInvokerServlet receives JMS requests via HTTP
- protocol from within a web container and passes it onto the
- ServletServerInvoker for processing.
- </description>
- <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
- <init-param>
- <param-name>locatorUrl</param-name>
- <param-value>
- <![CDATA[servlet://${jboss.bind.address}:8080/servlet-invoker/JmsServerInvokerServlet/?dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&pingFrequency=214748364&pingWindowFactor=10&stopLeaseOnFailure=true&clientLeasePeriod=10000&validatorPingPeriod=10000&validatorPingTimeout=5000&timeout=0&blockingMode=blocking&blockingTimeout=30000&useAllParams=true]]>
- </param-value>
- <description>The servlet server invoker</description>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>JmsServerInvokerServlet</servlet-name>
- <url-pattern>/JmsServerInvokerServlet/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
-
Copied: branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/web.xml (from rev 5773, branches/Branch_1_4/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/web.xml)
===================================================================
--- branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/web.xml (rev 0)
+++ branches/Branch_1416_merge/integration/EAP4/etc/remoting/servlet-invoker.war/WEB-INF/web.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!-- The the JBossRemoting server invoker servlet web.xml descriptor
+$Id: web.xml,v 1.2 2006/07/17 03:44:00 telrod Exp $
+-->
+<web-app>
+
+ <servlet>
+ <servlet-name>JmsServerInvokerServlet</servlet-name>
+ <description>The JmsServerInvokerServlet receives JMS requests via HTTP
+ protocol from within a web container and passes it onto the
+ ServletServerInvoker for processing.
+ </description>
+ <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
+ <init-param>
+ <param-name>locatorUrl</param-name>
+ <param-value>
+ <![CDATA[servlet://${jboss.bind.address}:8080/servlet-invoker/JmsServerInvokerServlet/?dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&pingFrequency=214748364&pingWindowFactor=10&stopLeaseOnFailure=true&clientLeasePeriod=10000&validatorPingPeriod=10000&validatorPingTimeout=5000&timeout=0&blockingMode=blocking&blockingTimeout=30000&useAllParams=true]]>
+ </param-value>
+ <description>The servlet server invoker</description>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>JmsServerInvokerServlet</servlet-name>
+ <url-pattern>/JmsServerInvokerServlet/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/client/ClientAOPStackLoader.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/client/ClientAOPStackLoader.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/client/ClientAOPStackLoader.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -64,13 +64,13 @@
return;
}
- ClassLoader savedLoader = Thread.currentThread().getContextClassLoader();
+ ClassLoader savedLoader = SecurityActions.getTCL();
try
{
// This was done because of some weird behavior of AOP & classLoading
// http://jira.jboss.org/jira/browse/JBMESSAGING-980
- Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+ SecurityActions.setTCL(this.getClass().getClassLoader());
byte[] clientAOPStack = delegate.getClientAOPStack();
@@ -80,7 +80,7 @@
}
finally
{
- Thread.currentThread().setContextClassLoader(savedLoader);
+ SecurityActions.setTCL(savedLoader);
}
}
Copied: branches/Branch_1416_merge/src/main/org/jboss/jms/client/SecurityActions.java (from rev 5773, branches/Branch_1_4/src/main/org/jboss/jms/client/SecurityActions.java)
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/client/SecurityActions.java (rev 0)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/client/SecurityActions.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
+ * 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.jms.client;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * A SecurityActions
+ *
+ * SecurityActions need to be on each package because of configuration issues on the Security Manager
+ *
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ *
+ * Created Nov 14, 2008 1:50:58 PM
+ *
+ *
+ */
+class SecurityActions
+{
+
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ // Static --------------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ // Public --------------------------------------------------------
+
+ // Package protected ---------------------------------------------
+
+ static ClassLoader getTCL()
+ {
+ if (System.getSecurityManager() != null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+ static void setTCL(final ClassLoader tcl)
+ {
+ if (System.getSecurityManager() != null)
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ }
+ else
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ return null;
+ }
+ });
+ }
+ }
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+
+}
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/client/container/ClientConsumer.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/client/container/ClientConsumer.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/client/container/ClientConsumer.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -61,8 +61,10 @@
// Static ---------------------------------------------------------------------------------------
- private static boolean trace;
+ private static boolean trace;
+ private static boolean debug;
+
private static final int WAIT_TIMEOUT = 30000;
@@ -70,6 +72,7 @@
{
log = Logger.getLogger(ClientConsumer.class);
trace = log.isTraceEnabled();
+ debug = log.isDebugEnabled();
}
private static boolean checkExpiredOrReachedMaxdeliveries(MessageProxy proxy,
@@ -84,17 +87,14 @@
if (expired || reachedMaxDeliveries)
{
- if (trace)
+ if (expired)
{
- if (expired)
- {
- log.trace(proxy.getMessage() + " has expired, cancelling to server");
- }
- else
- {
- log.trace(proxy.getMessage() + " has reached maximum delivery number " + maxDeliveries +", cancelling to server");
- }
+ if (debug) { log.debug(proxy.getMessage() + " has expired, cancelling to server"); }
}
+ else
+ {
+ if (debug) { log.debug(proxy.getMessage() + " has reached maximum delivery number " + maxDeliveries +", cancelling to server"); }
+ }
if (shouldCancel)
{
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -489,7 +489,7 @@
}
/**
- * @return true if the listener was correctly installed, or false if the add attepmt was ignored
+ * @return true if the listener was correctly installed, or false if the add attempt was ignored
* because there is already another listener installed.
*/
public synchronized boolean addConnectionListener(ConsolidatedRemotingConnectionListener listener)
@@ -499,7 +499,7 @@
return false;
}
- client.addConnectionListener(listener);
+ client.addConnectionListener(listener, serverLocator.getParameters());
remotingConnectionListener = listener;
return true;
@@ -507,7 +507,7 @@
public synchronized void addPlainConnectionListener(ConnectionListener listener)
{
- client.addConnectionListener(listener);
+ client.addConnectionListener(listener, serverLocator.getParameters());
}
public synchronized void removePlainConnectionListener(ConnectionListener listener)
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/server/bridge/Bridge.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/server/bridge/Bridge.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/server/bridge/Bridge.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -26,6 +26,7 @@
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
+import java.util.Properties;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -58,6 +59,7 @@
* A Bridge
*
* @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:hgao at redhat.com">Howard Gao</a>
* @version <tt>$Revision$</tt>
*
* $Id$
@@ -164,14 +166,30 @@
private volatile boolean addMessageIDInHeader;
-
-
private boolean started;
private LinkedList<Message> messages;
private Object lock;
+ private String sourceCffName;
+
+ private String targetCffName;
+
+ private Properties sourceProviderProperties;
+
+ private Properties targetProviderProperties;
+
+ private String sourceDestName;
+
+ private String targetDestName;
+
+ private boolean isSameSourceAndTarget;
+
+ private String queueCffName;
+
+ private String topicCffName;
+
private ConnectionFactoryFactory sourceCff;
private ConnectionFactoryFactory targetCff;
@@ -220,14 +238,14 @@
* Constructor for MBean
*/
public Bridge()
- {
+ {
this.messages = new LinkedList<Message>();
- this.lock = new Object();
+ this.lock = new Object();
}
- public Bridge(ConnectionFactoryFactory sourceCff, ConnectionFactoryFactory destCff,
- DestinationFactory sourceDestinationFactory, DestinationFactory targetDestinationFactory,
+ public Bridge(boolean sameSourceNTarget, Properties srcProps, Properties tarProps,
+ String srcDestName, String tarDestName, String qCffName, String tCffName,
String sourceUsername, String sourcePassword,
String targetUsername, String targetPassword,
String selector, long failureRetryInterval,
@@ -236,41 +254,28 @@
int maxBatchSize, long maxBatchTime,
String subName, String clientID,
boolean addMessageIDInHeader)
- {
+ {
this();
- this.sourceCff = sourceCff;
-
- this.targetCff = destCff;
-
- this.sourceDestinationFactory = sourceDestinationFactory;
-
- this.targetDestinationFactory = targetDestinationFactory;
-
+ this.isSameSourceAndTarget = sameSourceNTarget;
+ this.sourceProviderProperties = srcProps;
+ this.targetProviderProperties = tarProps;
+ this.sourceDestName = srcDestName;
+ this.targetDestName = tarDestName;
+ this.queueCffName = qCffName;
+ this.topicCffName = tCffName;
this.sourceUsername = sourceUsername;
-
this.sourcePassword = sourcePassword;
-
this.targetUsername = targetUsername;
-
this.targetPassword = targetPassword;
-
this.selector = selector;
-
this.failureRetryInterval = failureRetryInterval;
-
this.maxRetries = maxRetries;
-
this.qualityOfServiceMode = qosMode;
-
this.maxBatchSize = maxBatchSize;
-
this.maxBatchTime = maxBatchTime;
-
this.subName = subName;
-
this.clientID = clientID;
-
this.addMessageIDInHeader = addMessageIDInHeader;
this.name = "Bridge-" + System.identityHashCode(this);
@@ -280,7 +285,6 @@
log.trace("Created " + this);
}
}
-
// MessagingComponent overrides --------------------------------------------------
@@ -703,46 +707,55 @@
return started;
}
- public synchronized void setSourceConnectionFactoryFactory(ConnectionFactoryFactory cff)
+ public void setSourceCFFName(String name)
{
- if (started)
- {
- log.warn(name + " Cannot set SourceConnectionFactoryFactory while bridge is started");
- return;
- }
- this.sourceCff = cff;
+ sourceCffName = name;
}
- public synchronized void setDestConnectionFactoryFactory(ConnectionFactoryFactory cff)
+ public void setTargetCFFName(String name)
{
- if (started)
- {
- log.warn(name + " Cannot set DestConnectionFactoryFactory while bridge is started");
- return;
- }
- this.targetCff = cff;
+ targetCffName = name;
}
+
+ public void setSourceProps(Properties sourceProps)
+ {
+ sourceProviderProperties = sourceProps;
+ }
+
+ public void setTargetProps(Properties targetProps)
+ {
+ targetProviderProperties = targetProps;
+ }
+
+ public void setSourceDestinationName(String sourceDestinationLookup)
+ {
+ sourceDestName = sourceDestinationLookup;
+ }
+
+ public void setTargetDestinationName(String targetDestinationLookup)
+ {
+ targetDestName = targetDestinationLookup;
+ }
+
+ public void setIsSameSourceAndTarget(boolean sameSourceAndTarget)
+ {
+ isSameSourceAndTarget = sameSourceAndTarget;
+ }
+
+ public void setQueueCffName(String name)
+ {
+ queueCffName = name;
+ }
+
+ public void setTopicCffName(String name)
+ {
+ topicCffName = name;
+ }
// Private -------------------------------------------------------------------
private void checkParams()
{
- if (sourceCff == null)
- {
- throw new IllegalArgumentException("sourceCff cannot be null");
- }
- if (targetCff == null)
- {
- throw new IllegalArgumentException("targetCff cannot be null");
- }
- if (sourceDestinationFactory == null)
- {
- throw new IllegalArgumentException("sourceDestinationFactory cannot be null");
- }
- if (targetDestinationFactory == null)
- {
- throw new IllegalArgumentException("targetDestinationFactory cannot be null");
- }
if (failureRetryInterval < 0 && failureRetryInterval != -1)
{
throw new IllegalArgumentException("failureRetryInterval must be > 0 or -1 to represent no retry");
@@ -919,9 +932,41 @@
try
{
//Lookup the destinations
- sourceDestination = sourceDestinationFactory.createDestination();
+ sourceDestinationFactory = new JNDIDestinationFactory(sourceProviderProperties, sourceDestName);
+ sourceDestination = sourceDestinationFactory.createDestination();
- targetDestination = targetDestinationFactory.createDestination();
+ targetDestinationFactory = new JNDIDestinationFactory(targetProviderProperties, targetDestName);
+ targetDestination = targetDestinationFactory.createDestination();
+
+ //factories
+ if(sourceDestination instanceof Topic)
+ {
+ sourceCffName = topicCffName;
+ }
+ else
+ {
+ sourceCffName = queueCffName;
+ }
+
+ sourceCff = new JNDIConnectionFactoryFactory(sourceProviderProperties, sourceCffName);
+
+ if (isSameSourceAndTarget)
+ {
+ targetCff = sourceCff;
+ }
+ else
+ {
+ if(targetDestination instanceof Topic)
+ {
+ targetCffName = topicCffName;
+ }
+ else
+ {
+ targetCffName = queueCffName;
+ }
+
+ targetCff = new JNDIConnectionFactoryFactory(targetProviderProperties, targetCffName);
+ }
if (sourceCff == targetCff)
{
@@ -946,11 +991,6 @@
}
}
- //Lookup the destinations
- sourceDestination = sourceDestinationFactory.createDestination();
-
- targetDestination = targetDestinationFactory.createDestination();
-
sourceConn = createConnection(sourceUsername, sourcePassword, sourceCff);
if (forwardMode != FORWARD_MODE_LOCALTX)
@@ -1661,5 +1701,6 @@
}
}
}
- }
+ }
+
}
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/server/bridge/BridgeService.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/server/bridge/BridgeService.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/server/bridge/BridgeService.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -317,53 +317,16 @@
Properties targetProps = (Properties)server.getAttribute(targetProviderLoader, "Properties");
- // JBMESSAGING-1183: set the factory refs according to the destinations types
- Context icSource = new InitialContext(sourceProps);
- Context icTarget = new InitialContext(targetProps);
- Destination sourceDest = (Destination)icSource.lookup(sourceDestinationLookup);
- Destination targetDest = (Destination)icTarget.lookup(targetDestinationLookup);
- String sourceFactoryRef = "QueueFactoryRef";
- if(sourceDest instanceof Topic)
- {
- sourceFactoryRef = "TopicFactoryRef";
- }
- String targetFactoryRef = "QueueFactoryRef";
- if(targetDest instanceof Topic)
- {
- targetFactoryRef = "TopicFactoryRef";
- }
-
- String sourceCFRef = (String)server.getAttribute(sourceProviderLoader, sourceFactoryRef);
+ String queueCffName = (String)server.getAttribute(getSourceProviderLoader(), "QueueFactoryRef");
+ String topicCffName = (String)server.getAttribute(getSourceProviderLoader(), "TopicFactoryRef");
- String targetCFRef = (String)server.getAttribute(targetProviderLoader, targetFactoryRef);
-
- ConnectionFactoryFactory sourceCff =
- new JNDIConnectionFactoryFactory(sourceProps, sourceCFRef);
-
- ConnectionFactoryFactory destCff;
-
- if (sameSourceAndTarget)
- {
- destCff = sourceCff;
- }
- else
- {
- destCff= new JNDIConnectionFactoryFactory(targetProps, targetCFRef);
- }
-
- bridge.setName(serviceName.getCanonicalName());
-
- bridge.setSourceConnectionFactoryFactory(sourceCff);
-
- bridge.setDestConnectionFactoryFactory(destCff);
-
- DestinationFactory sourceDestinationFactory = new JNDIDestinationFactory(sourceProps, sourceDestinationLookup);
-
- DestinationFactory targetDestinationFactory = new JNDIDestinationFactory(targetProps, targetDestinationLookup);
-
- bridge.setSourceDestinationFactory(sourceDestinationFactory);
-
- bridge.setTargetDestinationFactory(targetDestinationFactory);
+ bridge.setIsSameSourceAndTarget(sameSourceAndTarget);
+ bridge.setSourceProps(sourceProps);
+ bridge.setTargetProps(targetProps);
+ bridge.setSourceDestinationName(sourceDestinationLookup);
+ bridge.setTargetDestinationName(targetDestinationLookup);
+ bridge.setQueueCffName(queueCffName);
+ bridge.setTopicCffName(topicCffName);
bridge.start();
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -21,6 +21,8 @@
import org.jboss.system.ServiceMBeanSupport;
import org.w3c.dom.Element;
+
+
/**
* A deployable JBoss Messaging connection factory.
*
@@ -394,7 +396,7 @@
}
//We don't use Class.forName() since then it won't work with scoped deployments
- Class clz = Thread.currentThread().getContextClassLoader().loadClass(factoryName);
+ Class clz = SecurityActions.getTCL().loadClass(factoryName);
loadBalancingFactory = (LoadBalancingFactory)clz.newInstance();
}
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -164,13 +164,13 @@
if (supportsFailover && replicator == null)
{
- log.warn("supportsFailover attribute is true on connection factory: " + uniqueName + " but post office is non clustered. " +
+ log.info("supportsFailover attribute is true on connection factory: " + uniqueName + " but post office is non clustered. " +
"So connection factory will *not* support failover");
}
if (supportsLoadBalancing && replicator == null)
{
- log.warn("supportsLoadBalancing attribute is true on connection factory: " + uniqueName + " but post office is non clustered. " +
+ log.info("supportsLoadBalancing attribute is true on connection factory: " + uniqueName + " but post office is non clustered. " +
"So connection factory will *not* support load balancing");
}
Copied: branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/SecurityActions.java (from rev 5773, branches/Branch_1_4/src/main/org/jboss/jms/server/connectionfactory/SecurityActions.java)
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/SecurityActions.java (rev 0)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/server/connectionfactory/SecurityActions.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
+ * 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.jms.server.connectionfactory;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * A SecurityActions
+ *
+ * SecurityActions need to be on each package because of configuration issues on the Security Manager
+ *
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ *
+ * Created Nov 14, 2008 1:50:58 PM
+ *
+ *
+ */
+class SecurityActions
+{
+
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ // Static --------------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ // Public --------------------------------------------------------
+
+ // Package protected ---------------------------------------------
+
+ static ClassLoader getTCL()
+ {
+ if (System.getSecurityManager() != null)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ else
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ }
+
+ static ClassLoader getClassLoader(final Class<?> clazz)
+ {
+ if (System.getSecurityManager() != null)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return clazz.getClassLoader();
+ }
+ });
+
+ }
+ else
+ {
+ return clazz.getClassLoader();
+ }
+
+ }
+
+ static void setTCL(final ClassLoader tcl)
+ {
+ if (System.getSecurityManager() != null)
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ return null;
+ }
+ });
+ }
+ else
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ }
+ }
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+
+}
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/SecurityActions.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/SecurityActions.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/SecurityActions.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -29,7 +29,6 @@
import org.jboss.security.SecurityAssociation;
-
/** A collection of privileged actions for this package
* @author Scott.Stark at jboss.org
* @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
@@ -43,45 +42,40 @@
{
PrincipalInfoAction PRIVILEGED = new PrincipalInfoAction()
{
- public void push(final Principal principal, final Object credential,
- final Subject subject)
+ public void push(final Principal principal, final Object credential, final Subject subject)
{
- AccessController.doPrivileged(
- new PrivilegedAction()
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
{
- public Object run()
- {
- SecurityAssociation.pushSubjectContext(subject, principal, credential);
- return null;
- }
+ SecurityAssociation.pushSubjectContext(subject, principal, credential);
+ return null;
}
- );
+ });
}
+
public void dup()
{
- AccessController.doPrivileged(
- new PrivilegedAction()
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
{
- public Object run()
- {
- SecurityAssociation.dupSubjectContext();
- return null;
- }
+ SecurityAssociation.dupSubjectContext();
+ return null;
}
- );
+ });
}
+
public void pop()
{
- AccessController.doPrivileged(
- new PrivilegedAction()
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
{
- public Object run()
- {
- SecurityAssociation.popSubjectContext();
- return null;
- }
+ SecurityAssociation.popSubjectContext();
+ return null;
}
- );
+ });
}
};
@@ -91,10 +85,12 @@
{
SecurityAssociation.pushSubjectContext(subject, principal, credential);
}
+
public void dup()
{
SecurityAssociation.dupSubjectContext();
}
+
public void pop()
{
SecurityAssociation.popSubjectContext();
@@ -102,14 +98,15 @@
};
void push(Principal principal, Object credential, Subject subject);
+
void dup();
+
void pop();
}
- static void pushSubjectContext(Principal principal, Object credential,
- Subject subject)
+ static void pushSubjectContext(Principal principal, Object credential, Subject subject)
{
- if(System.getSecurityManager() == null)
+ if (System.getSecurityManager() == null)
{
PrincipalInfoAction.NON_PRIVILEGED.push(principal, credential, subject);
}
@@ -118,10 +115,10 @@
PrincipalInfoAction.PRIVILEGED.push(principal, credential, subject);
}
}
-
+
static void popSubjectContext()
{
- if(System.getSecurityManager() == null)
+ if (System.getSecurityManager() == null)
{
PrincipalInfoAction.NON_PRIVILEGED.pop();
}
@@ -130,4 +127,61 @@
PrincipalInfoAction.PRIVILEGED.pop();
}
}
- }
+
+ static ClassLoader getTCL()
+ {
+ if (System.getSecurityManager() == null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+ static ClassLoader getClassLoader(final Class<?> clazz)
+ {
+ if (System.getSecurityManager() == null)
+ {
+ return clazz.getClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return clazz.getClassLoader();
+ }
+ });
+ }
+
+ }
+
+ static void setTCL(final ClassLoader tcl)
+ {
+ if (System.getSecurityManager() == null)
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ }
+ else
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ return null;
+ }
+ });
+ }
+ }
+
+}
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -21,7 +21,10 @@
*/
package org.jboss.jms.server.endpoint;
-import java.util.List;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.Map;
import java.util.Set;
@@ -44,6 +47,7 @@
import org.jboss.remoting.callback.Callback;
import org.jboss.remoting.callback.InvokerCallbackHandler;
import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
+import org.jboss.security.SecurityAssociation;
/**
* Concrete implementation of ConnectionFactoryEndpoint
@@ -209,12 +213,12 @@
* failover. Negative values are ignored (mean regular connection creation attempt).
*/
private ClientConnectionDelegate
- createConnectionDelegateInternal(String username,
- String password,
- int failedNodeID,
- String remotingSessionID, String clientVMID,
- byte versionToUse,
- ServerInvokerCallbackHandler callbackHandler)
+ createConnectionDelegateInternal(final String username,
+ final String password,
+ final int failedNodeID,
+ final String remotingSessionID, final String clientVMID,
+ final byte versionToUse,
+ final ServerInvokerCallbackHandler callbackHandler)
throws Exception
{
log.trace("creating a new connection for user " + username);
@@ -224,7 +228,28 @@
// up thread local immediately after we used the information, otherwise some other people
// security my be screwed up, on account of thread local security stack being corrupted.
- serverPeer.getSecurityManager().authenticate(username, password);
+ if (System.getSecurityManager() == null)
+ {
+ serverPeer.getSecurityManager().authenticate(username, password);
+ }
+ else
+ {
+ try
+ {
+ AccessController.doPrivileged(new PrivilegedExceptionAction<Object>()
+ {
+ public Object run() throws Exception
+ {
+ serverPeer.getSecurityManager().authenticate(username, password);
+ return null;
+ }
+ });
+ }
+ catch (PrivilegedActionException pe)
+ {
+ throw pe.getException();
+ }
+ }
// We don't need the SubjectContext on thread local anymore, clean it up
SecurityActions.popSubjectContext();
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -139,6 +139,8 @@
// Attributes -----------------------------------------------------------------------------------
private boolean trace = log.isTraceEnabled();
+
+ private boolean debug = log.isDebugEnabled();
private String id;
@@ -1203,7 +1205,13 @@
DeliveryRecord rec = (DeliveryRecord)entry.getValue();
- rec.del.cancel();
+ /*
+ * https://jira.jboss.org/jira/browse/JBMESSAGING-1440
+ */
+ if (!rec.del.isXAPrepared())
+ {
+ rec.del.cancel();
+ }
channels.add(rec.del.getObserver());
}
@@ -1623,6 +1631,7 @@
{
//Sent to expiry queue
+ if (debug) { log.debug("Sending expired message: " + rec.del.getReference() + " to expiry queue " + rec.expiryQueue); }
JBossMessage copy = makeCopyForDLQOrExpiry(true, del);
moveInTransaction(copy, del, rec.expiryQueue, false);
@@ -1630,6 +1639,7 @@
else
{
//Send to DLQ
+ if (debug) { log.debug("Sending message: " + rec.del.getReference() + " to dlq " + rec.dlq); }
JBossMessage copy = makeCopyForDLQOrExpiry(false, del);
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/tx/MessagingXAResource.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/tx/MessagingXAResource.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/tx/MessagingXAResource.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -109,7 +109,8 @@
return false;
}
- boolean same = ((MessagingXAResource)xaResource).rm.getServerID() == this.rm.getServerID();
+ boolean same = (((MessagingXAResource)xaResource).rm.getServerID() == this.rm.getServerID())
+ && (((MessagingXAResource)xaResource).rm.getTransactions() == this.rm.getTransactions());
if (trace) { log.trace("Calling isSameRM, result is " + same + " " + ((MessagingXAResource)xaResource).rm.getServerID() + " " + this.rm.getServerID()); }
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/tx/ResourceManager.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/tx/ResourceManager.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/tx/ResourceManager.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -602,7 +602,12 @@
return new Xid[0];
}
}
-
+
+ Map getTransactions()
+ {
+ return transactions;
+ }
+
// Private --------------------------------------------------------------------------------------
private ClientTransaction getTxInternal(Object xid)
Copied: branches/Branch_1416_merge/src/main/org/jboss/jms/wireformat/SecurityActions.java (from rev 5773, branches/Branch_1_4/src/main/org/jboss/jms/wireformat/SecurityActions.java)
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/wireformat/SecurityActions.java (rev 0)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/wireformat/SecurityActions.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,88 @@
+/*
+ * 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.jms.wireformat;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/** A collection of privileged actions for this package
+ * @author Clebert Suconic
+ */
+class SecurityActions
+{
+ static ClassLoader getTCL()
+ {
+ if (System.getSecurityManager() == null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+ static ClassLoader getClassLoader(final Class<?> clazz)
+ {
+ if (System.getSecurityManager() == null)
+ {
+ return clazz.getClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return clazz.getClassLoader();
+ }
+ });
+ }
+
+ }
+
+ static void setTCL(final ClassLoader tcl)
+ {
+ if (System.getSecurityManager() == null)
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ }
+ else
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ return null;
+ }
+ });
+ }
+ }
+
+}
Modified: branches/Branch_1416_merge/src/main/org/jboss/jms/wireformat/SerializedPacket.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/jms/wireformat/SerializedPacket.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/jms/wireformat/SerializedPacket.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -28,6 +28,7 @@
import org.jboss.remoting.loading.ObjectInputStreamWithClassLoader;
+
/**
* For carrying a remoting non JBM invocation across the wire. Also used for internal invocation
* request return values e.g. PONG. This would be used for pings, disconnect, addlistener,
@@ -67,7 +68,7 @@
// need to use the thread context class loader, otherwise deserialization of various
// remoting and messaging things will fail in a scoped domain
ObjectInputStream ois =
- new ObjectInputStreamWithClassLoader(is, Thread.currentThread().getContextClassLoader());
+ new ObjectInputStreamWithClassLoader(is, SecurityActions.getTCL());
payload = ois.readObject();
}
Modified: branches/Branch_1416_merge/src/main/org/jboss/messaging/core/contract/Delivery.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/messaging/core/contract/Delivery.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/messaging/core/contract/Delivery.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -48,4 +48,9 @@
void cancel() throws Throwable;
boolean isRecovered();
+
+ /**
+ * Mark if this delivery is with a prepared XA transaction.
+ */
+ boolean isXAPrepared();
}
Modified: branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/ChannelSupport.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/ChannelSupport.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/ChannelSupport.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -47,6 +47,7 @@
import org.jboss.messaging.util.prioritylinkedlist.BasicPriorityLinkedList;
import org.jboss.messaging.util.prioritylinkedlist.PriorityLinkedList;
import org.jboss.util.timeout.Timeout;
+import org.jboss.util.timeout.TimeoutExt;
import org.jboss.util.timeout.TimeoutTarget;
import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
@@ -299,6 +300,13 @@
acknowledgeInternal(d, null, false);
}
+ /*
+ * Note: If a XA tx is not committed while failure happens, cancelling of the
+ * delivery shouldn't put the message with transactions back to re-deliver.
+ * It must be there in DB until the transaction recovery happens.
+ *
+ * @see org.jboss.messaging.core.contract.DeliveryObserver#cancel(org.jboss.messaging.core.contract.Delivery)
+ */
public void cancel(Delivery del) throws Throwable
{
//We may need to update the delivery count in the database
@@ -385,7 +393,7 @@
distributor = null;
}
- clearAllScheduledDeliveries();
+ clearAllScheduledDeliveries(false);
}
}
@@ -429,12 +437,12 @@
del.acknowledge(null);
}
+ clearAllScheduledDeliveries(true);
deliveringCount.set(0);
log.trace(this + " done removing all references, there are " + this.messageRefs.size());
}
- clearAllScheduledDeliveries();
}
public List undelivered(Filter filter)
@@ -553,7 +561,7 @@
// Protected ------------------------------------------------------------------------------------
- protected void clearAllScheduledDeliveries()
+ protected void clearAllScheduledDeliveries(boolean needRemove)
{
synchronized (scheduledDeliveries)
{
@@ -566,6 +574,26 @@
Timeout timeout = (Timeout)iter.next();
timeout.cancel();
+
+ if (needRemove) {
+ if (timeout instanceof TimeoutExt) {
+ TimeoutExt te = (TimeoutExt)timeout;
+ DeliverRefTimeoutTarget target = (DeliverRefTimeoutTarget)te.getTimeoutTarget();
+
+ log.trace("clearing scheduled ref " + target.ref);
+
+ SimpleDelivery del = new SimpleDelivery(this, target.ref);
+
+ try
+ {
+ del.acknowledge(null);
+ }
+ catch (Throwable e)
+ {
+ log.warn("exception when acknowledging", e);
+ }
+ }
+ }
}
scheduledDeliveries.clear();
Modified: branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/PagingChannelSupport.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/PagingChannelSupport.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/PagingChannelSupport.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -236,7 +236,7 @@
firstPagingOrder = nextPagingOrder = 0;
- clearAllScheduledDeliveries();
+ clearAllScheduledDeliveries(false);
}
}
Modified: branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/SimpleDelivery.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/SimpleDelivery.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/SimpleDelivery.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -50,6 +50,7 @@
private DeliveryObserver observer;
private MessageReference reference;
private boolean recovered;
+ private Transaction tx;
private boolean trace = log.isTraceEnabled();
@@ -73,6 +74,7 @@
this.observer = observer;
this.selectorAccepted = selectorAccepted;
this.recovered = recovered;
+ this.tx = null;
}
// Delivery implementation ----------------------------------------------------------------------
@@ -95,6 +97,8 @@
public void acknowledge(Transaction tx) throws Throwable
{
if (trace) { log.trace(this + " acknowledging delivery " + ( tx == null ? "non-transactionally" : "in " + tx)); }
+
+ this.tx = tx;
observer.acknowledge(this, tx);
}
@@ -118,6 +122,20 @@
return "Delivery" + (reference == null ? "" : "[" + reference + "]");
}
+ /* (non-Javadoc)
+ * @see org.jboss.messaging.core.contract.Delivery#isXA()
+ */
+ public boolean isXAPrepared()
+ {
+ if (tx != null) {
+ if (tx.getXid() != null)
+ {
+ return tx.getState() == Transaction.STATE_PREPARED;
+ }
+ }
+ return false;
+ }
+
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
Modified: branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -3016,27 +3016,27 @@
localQueue.mergeIn(queue.getChannelID(), failedNodeID.intValue());
log.debug("Merged queue");
+
+ //Delete from storage
+
+ //Note we must do this *after* we have done any merge.
+ //This is because if we did it first, then the merge failed, we'd be left with the old channel deleted
+ //but the messages would have still be in the old channel
+ //meaning they would have disappeared from the users point of view and it would involve manual
+ //database intervention to correct it
+ //See http://jira.jboss.com/jira/browse/JBMESSAGING-1113
+
+ deleteBindingFromStorage(queue);
+
+ log.debug(this + " deleted binding for " + queue.getName());
}
else
{
//Cannot failover if there is no queue deployed.
- throw new IllegalStateException("Cannot failover " + queue.getName() + " since it does not exist on this node. " +
+ log.warn("Cannot failover " + queue.getName() + " since it does not exist on this node. " +
"You must deploy your clustered destinations on ALL nodes of the cluster");
}
-
- //Delete from storage
-
- //Note we must do this *after* we have done any merge.
- //This is because if we did it first, then the merge failed, we'd be left with the old channel deleted
- //but the messages would have still be in the old channel
- //meaning they would have disappeared from the users point of view and it would involve manual
- //database intervention to correct it
- //See http://jira.jboss.com/jira/browse/JBMESSAGING-1113
-
- deleteBindingFromStorage(queue);
-
- log.debug(this + " deleted binding for " + queue.getName());
// Note we do not need to send an unbind request across the cluster - this is because
// when the node crashes a view change will hit the other nodes and that will cause
Modified: branches/Branch_1416_merge/src/main/org/jboss/messaging/util/JBMExecutor.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/messaging/util/JBMExecutor.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/messaging/util/JBMExecutor.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -22,10 +22,6 @@
package org.jboss.messaging.util;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-
/** Any Executor being used on client side has to clean its contextClassLoader, as that could cause leaks.
* This class encapsulates the necessary cleanup to avoid that leak.
*
@@ -51,7 +47,7 @@
private boolean needToSetClassLoader = true;
- public JBMExecutor(String name)
+ public JBMExecutor(final String name)
{
super(name);
}
@@ -59,22 +55,15 @@
class TCLRunnable implements Runnable
{
- private Runnable realRunnable;
+ private final Runnable realRunnable;
+
private ClassLoader tcl;
- public TCLRunnable(Runnable realRunnable)
+ public TCLRunnable(final Runnable realRunnable)
{
if (needToSetClassLoader)
{
- tcl = AccessController.doPrivileged(
- new PrivilegedAction<ClassLoader>()
- {
- public ClassLoader run()
- {
- return Thread.currentThread().getContextClassLoader();
- }
- }
- );
+ tcl = SecurityActions.getTCL();
}
this.realRunnable = realRunnable;
@@ -86,52 +75,44 @@
if (needToSetClassLoader)
{
needToSetClassLoader = false;
-
- AccessController.doPrivileged(
- new PrivilegedAction()
- {
- public Object run()
- {
- Thread.currentThread().setContextClassLoader(tcl);
- return null;
- }
- }
- );
+ SecurityActions.setTCL(tcl);
}
realRunnable.run();
}
}
-
- public void execute(Runnable runnable) throws InterruptedException
+ @Override
+ public void execute(final Runnable runnable) throws InterruptedException
{
super.execute(new TCLRunnable(runnable));
}
-
+
public void clearClassLoader() throws InterruptedException
{
super.execute(new Runnable()
- {
- @SuppressWarnings("unchecked")
- public void run()
- {
- needToSetClassLoader = true;
- }
- });
-
+ {
+ @SuppressWarnings("unchecked")
+ public void run()
+ {
+ needToSetClassLoader = true;
+ }
+ });
+
}
-
public void clearAllExceptCurrentTask()
{
try
{
- while (queue_.poll(0) != null);
+ while (queue_.poll(0) != null)
+ {
+ ;
+ }
}
catch (InterruptedException ex)
{
- Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
}
}
-
+
}
Modified: branches/Branch_1416_merge/src/main/org/jboss/messaging/util/ObjectInputStreamWithClassLoader.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/messaging/util/ObjectInputStreamWithClassLoader.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/messaging/util/ObjectInputStreamWithClassLoader.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -59,7 +59,7 @@
protected Class resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException
{
String name = desc.getName();
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ ClassLoader loader = SecurityActions.getTCL();
try
{
Class clazz = loader.loadClass(name);
Modified: branches/Branch_1416_merge/src/main/org/jboss/messaging/util/OrderedExecutorFactory.java
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/messaging/util/OrderedExecutorFactory.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/src/main/org/jboss/messaging/util/OrderedExecutorFactory.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -22,8 +22,6 @@
package org.jboss.messaging.util;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
@@ -80,13 +78,7 @@
{
if (needToSetClassLoader)
{
- tcl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
- {
- public ClassLoader run()
- {
- return Thread.currentThread().getContextClassLoader();
- }
- });
+ tcl = SecurityActions.getTCL();
}
synchronized (tasks)
{
@@ -108,14 +100,8 @@
{
needToSetClassLoader = false;
- AccessController.doPrivileged(new PrivilegedAction()
- {
- public Object run()
- {
- Thread.currentThread().setContextClassLoader(tcl);
- return null;
- }
- });
+ SecurityActions.setTCL(tcl);
+
}
for (;;)
Copied: branches/Branch_1416_merge/src/main/org/jboss/messaging/util/SecurityActions.java (from rev 5773, branches/Branch_1_4/src/main/org/jboss/messaging/util/SecurityActions.java)
===================================================================
--- branches/Branch_1416_merge/src/main/org/jboss/messaging/util/SecurityActions.java (rev 0)
+++ branches/Branch_1416_merge/src/main/org/jboss/messaging/util/SecurityActions.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,88 @@
+/*
+ * 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.messaging.util;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/** A collection of privileged actions for this package
+ * @author Clebert Suconic
+ */
+class SecurityActions
+{
+ static ClassLoader getTCL()
+ {
+ if (System.getSecurityManager() == null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+ static ClassLoader getClassLoader(final Class<?> clazz)
+ {
+ if (System.getSecurityManager() == null)
+ {
+ return clazz.getClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return clazz.getClassLoader();
+ }
+ });
+ }
+
+ }
+
+ static void setTCL(final ClassLoader tcl)
+ {
+ if (System.getSecurityManager() == null)
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ }
+ else
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ return null;
+ }
+ });
+ }
+ }
+
+}
Modified: branches/Branch_1416_merge/tests/bin/.testrc.example
===================================================================
--- branches/Branch_1416_merge/tests/bin/.testrc.example 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/bin/.testrc.example 2009-02-02 11:06:59 UTC (rev 5774)
@@ -32,7 +32,7 @@
# It is also possible to configure a test to run in clustered mode by using the "-clustered"
# switch.
#
-CLUSTERED=false
+TEST_CLUSTERED=false
TEST_BIND_ADDRESS=localhost
Copied: branches/Branch_1416_merge/tests/bin/loop-clustered (from rev 5773, branches/Branch_1_4/tests/bin/loop-clustered)
===================================================================
--- branches/Branch_1416_merge/tests/bin/loop-clustered (rev 0)
+++ branches/Branch_1416_merge/tests/bin/loop-clustered 2009-02-02 11:06:59 UTC (rev 5774)
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+
+count=5000
+i=0
+
+while [ $i -lt $count ]; do
+ i=`expr $i + 1`
+ echo "#############################################"
+ echo "# #"
+ echo "# Running test loop $i"
+ echo "# #"
+ echo "#############################################"
+ echo ""
+ cat /dev/null > ../output/logs/messaging-tests.trace.log
+ if ! ./runtest -remote -clustered; then
+ echo "Test failed on loop $i"
+ exit 1
+ fi
+done
+
+
+echo "#############################################"
+echo "# #"
+echo "# $count loops ran successfully"
+echo "# #"
+echo "#############################################"
Property changes on: branches/Branch_1416_merge/tests/bin/runtest
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: branches/Branch_1416_merge/tests/bin/stop-rmi-server
___________________________________________________________________
Name: svn:executable
+ *
Modified: branches/Branch_1416_merge/tests/build.properties
===================================================================
--- branches/Branch_1416_merge/tests/build.properties 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/build.properties 2009-02-02 11:06:59 UTC (rev 5774)
@@ -2,5 +2,7 @@
# Local overrides for the builds initiated by build.sh
#
-#test.bind.address=192.168.1.104
-default.database=mysql
+test.bind.address=192.168.1.101
+test.bind.address=localhost
+jgroups.bind_addr=localhost
+#default.database=mysql
Modified: branches/Branch_1416_merge/tests/build.xml
===================================================================
--- branches/Branch_1416_merge/tests/build.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/build.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -333,6 +333,7 @@
<sysproperty key="jboss.messaging.datachanneludpaddress" value="${jboss.messaging.datachanneludpaddress}" />
<sysproperty key="jboss.messaging.controlchanneludpaddress" value="${jboss.messaging.controlchanneludpaddress}" />
<sysproperty key="jboss.messaging.ipttl" value="${jboss.messaging.ipttl}" />
+ <sysproperty key="java.net.preferIPv4Stack" value="true" />
<sysproperty key="test.database" value="${functional.tests.database}" />
<sysproperty key="test.logfile.suffix" value="invm" />
<sysproperty key="build.lib" value="${build.lib}" />
@@ -409,7 +410,7 @@
<echo message="" />
<echo message="Running remote tests, junit.batchtest.fork=${junit.batchtest.fork}, remoting=${test.remoting}" />
<echo message="" />
-
+
<junit printsummary="${junit.printsummary}" fork="on" forkMode="once" includeantruntime="yes" haltonerror="${junit.haltonerror}" haltonfailure="${junit.haltonfailure}" showoutput="${junit.showoutput}" timeout="${junit.timeout}">
<sysproperty key="remote" value="true" />
@@ -420,6 +421,15 @@
<sysproperty key="test.remoting" value="${test.remoting}" />
<sysproperty key="test.logfile.suffix" value="remote-client" />
<sysproperty key="objectstore.dir" value="${objectstore.dir}" />
+
+ <sysproperty key="jboss.messaging.groupname" value="${jboss.messaging.groupname}" />
+ <sysproperty key="jboss.messaging.datachanneludpport" value="${jboss.messaging.datachanneludpport}" />
+ <sysproperty key="jboss.messaging.controlchanneludpport" value="${jboss.messaging.controlchanneludpport}" />
+ <sysproperty key="jboss.messaging.datachanneludpaddress" value="${jboss.messaging.datachanneludpaddress}" />
+ <sysproperty key="jboss.messaging.controlchanneludpaddress" value="${jboss.messaging.controlchanneludpaddress}" />
+ <sysproperty key="jboss.messaging.ipttl" value="${jboss.messaging.ipttl}" />
+ <sysproperty key="java.net.preferIPv4Stack" value="true" />
+
<jvmarg value="-Xmx512M" />
<!--
<jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=n,suspend=n,address=antjunit"/>
Modified: branches/Branch_1416_merge/tests/etc/container.xml
===================================================================
--- branches/Branch_1416_merge/tests/etc/container.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/etc/container.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -35,7 +35,7 @@
<url>jdbc:mysql://localhost/messaging</url>
<driver>com.mysql.jdbc.Driver</driver>
<isolation>TRANSACTION_READ_COMMITTED</isolation>
- <username>root</username>
+ <username>sa</username>
</database-configuration>
Modified: branches/Branch_1416_merge/tests/etc/server/default/deploy/mock-channelfactory-stacks.xml
===================================================================
--- branches/Branch_1416_merge/tests/etc/server/default/deploy/mock-channelfactory-stacks.xml 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/etc/server/default/deploy/mock-channelfactory-stacks.xml 2009-02-02 11:06:59 UTC (rev 5774)
@@ -129,6 +129,511 @@
</config>
</stack>
+ <!-- ClusteredPostOfficeTest needs to run multiple JGroups instances inside the same VM, and we need multiple stacks for that -->
+
+
+ <stack name="jbm-control_1"
+ description="Stack optimized for the JBoss Messaging Control Channel">
+ <config>
+ <UDP
+ singleton_name="shared-udp_1"
+ mcast_port="${jboss.jgroups.udp.mcast_port:45688}"
+ mcast_addr="${jgroups.udp.mcast_addr:228.11.11.11}"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="true"
+ discard_incompatible_packets="true"
+ enable_bundling="false"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="${jgroups.udp.ip_ttl:2}"
+ thread_naming_pattern="cl"
+ timer.num_threads="12"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="20"
+ thread_pool.max_threads="200"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="1000"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="20"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="run"/>
+ <PING timeout="2000"
+ num_initial_members="3"/>
+ <MERGE2 max_interval="100000"
+ min_interval="20000"/>
+ <FD_SOCK />
+ <FD timeout="6000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500" />
+ <BARRIER />
+ <pbcast.NAKACK use_stats_for_retransmission="false"
+ exponential_backoff="150"
+ use_mcast_xmit="true" gc_lag="0"
+ retransmit_timeout="50,300,600,1200"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <VIEW_SYNC avg_send_interval="10000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="true"
+ view_bundling="true"/>
+ <FC max_credits="500000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000" />
+ <pbcast.STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="20000"/>
+ </config>
+ </stack>
+
+ <stack name="jbm-data_1"
+ description="Stack optimized for the JBoss Messaging Data Channel">
+ <config>
+ <TCP singleton_name="jbm-data_1"
+ start_port="7900"
+ loopback="true"
+ recv_buf_size="20000000"
+ send_buf_size="640000"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="false"
+ use_send_queues="false"
+ sock_conn_timeout="300"
+ skip_suspected_members="true"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="8"
+ thread_pool.max_threads="200"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="500"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="100"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="run"/>
+ <MPING timeout="5000"
+ mcast_addr="${jboss.messaging.datachanneludpaddress,jboss.partition.udpGroup:228.6.6.6}"
+ mcast_port="${jboss.messaging.datachanneludpport:45567}"
+ ip_ttl="${jboss.messaging.ipttl:8}"
+ num_initial_members="5"
+ num_ping_requests="3"/>
+ <MERGE2 max_interval="100000" min_interval="20000"/>
+ <FD_SOCK/>
+ <FD timeout="6000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <BARRIER/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <VIEW_SYNC avg_send_interval="10000"/>
+
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="true" view_bundling="true"/>
+ </config>
+ </stack>
+
+ <stack name="jbm-control_2"
+ description="Stack optimized for the JBoss Messaging Control Channel">
+ <config>
+ <UDP
+ singleton_name="shared-udp_2"
+ mcast_port="${jboss.jgroups.udp.mcast_port:45688}"
+ mcast_addr="${jgroups.udp.mcast_addr:228.11.11.11}"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="true"
+ discard_incompatible_packets="true"
+ enable_bundling="false"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="${jgroups.udp.ip_ttl:2}"
+ thread_naming_pattern="cl"
+ timer.num_threads="12"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="20"
+ thread_pool.max_threads="200"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="1000"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="20"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="run"/>
+ <PING timeout="2000"
+ num_initial_members="3"/>
+ <MERGE2 max_interval="100000"
+ min_interval="20000"/>
+ <FD_SOCK />
+ <FD timeout="6000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500" />
+ <BARRIER />
+ <pbcast.NAKACK use_stats_for_retransmission="false"
+ exponential_backoff="150"
+ use_mcast_xmit="true" gc_lag="0"
+ retransmit_timeout="50,300,600,1200"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <VIEW_SYNC avg_send_interval="10000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="true"
+ view_bundling="true"/>
+ <FC max_credits="500000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000" />
+ <pbcast.STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="20000"/>
+ </config>
+ </stack>
+
+ <stack name="jbm-data_2"
+ description="Stack optimized for the JBoss Messaging Data Channel">
+ <config>
+ <TCP singleton_name="jbm-data_2"
+ start_port="7900"
+ loopback="true"
+ recv_buf_size="20000000"
+ send_buf_size="640000"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="false"
+ use_send_queues="false"
+ sock_conn_timeout="300"
+ skip_suspected_members="true"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="8"
+ thread_pool.max_threads="200"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="500"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="100"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="run"/>
+ <MPING timeout="5000"
+ mcast_addr="${jboss.messaging.datachanneludpaddress,jboss.partition.udpGroup:228.6.6.6}"
+ mcast_port="${jboss.messaging.datachanneludpport:45567}"
+ ip_ttl="${jboss.messaging.ipttl:8}"
+ num_initial_members="5"
+ num_ping_requests="3"/>
+ <MERGE2 max_interval="100000" min_interval="20000"/>
+ <FD_SOCK/>
+ <FD timeout="6000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <BARRIER/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <VIEW_SYNC avg_send_interval="10000"/>
+
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="true" view_bundling="true"/>
+ </config>
+ </stack>
+
+ <stack name="jbm-control_3"
+ description="Stack optimized for the JBoss Messaging Control Channel">
+ <config>
+ <UDP
+ singleton_name="shared-udp_3"
+ mcast_port="${jboss.jgroups.udp.mcast_port:45688}"
+ mcast_addr="${jgroups.udp.mcast_addr:228.11.11.11}"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="true"
+ discard_incompatible_packets="true"
+ enable_bundling="false"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="${jgroups.udp.ip_ttl:2}"
+ thread_naming_pattern="cl"
+ timer.num_threads="12"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="20"
+ thread_pool.max_threads="200"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="1000"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="20"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="run"/>
+ <PING timeout="2000"
+ num_initial_members="3"/>
+ <MERGE2 max_interval="100000"
+ min_interval="20000"/>
+ <FD_SOCK />
+ <FD timeout="6000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500" />
+ <BARRIER />
+ <pbcast.NAKACK use_stats_for_retransmission="false"
+ exponential_backoff="150"
+ use_mcast_xmit="true" gc_lag="0"
+ retransmit_timeout="50,300,600,1200"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <VIEW_SYNC avg_send_interval="10000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="true"
+ view_bundling="true"/>
+ <FC max_credits="500000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000" />
+ <pbcast.STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="20000"/>
+ </config>
+ </stack>
+
+ <stack name="jbm-data_3"
+ description="Stack optimized for the JBoss Messaging Data Channel">
+ <config>
+ <TCP singleton_name="jbm-data_3"
+ start_port="7900"
+ loopback="true"
+ recv_buf_size="20000000"
+ send_buf_size="640000"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="false"
+ use_send_queues="false"
+ sock_conn_timeout="300"
+ skip_suspected_members="true"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="8"
+ thread_pool.max_threads="200"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="500"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="100"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="run"/>
+ <MPING timeout="5000"
+ mcast_addr="${jboss.messaging.datachanneludpaddress,jboss.partition.udpGroup:228.6.6.6}"
+ mcast_port="${jboss.messaging.datachanneludpport:45567}"
+ ip_ttl="${jboss.messaging.ipttl:8}"
+ num_initial_members="5"
+ num_ping_requests="3"/>
+ <MERGE2 max_interval="100000" min_interval="20000"/>
+ <FD_SOCK/>
+ <FD timeout="6000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <BARRIER/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <VIEW_SYNC avg_send_interval="10000"/>
+
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="true" view_bundling="true"/>
+ </config>
+ </stack>
+
+
+ <stack name="jbm-control_4"
+ description="Stack optimized for the JBoss Messaging Control Channel">
+ <config>
+ <UDP
+ singleton_name="shared-udp_4"
+ mcast_port="${jboss.jgroups.udp.mcast_port:45688}"
+ mcast_addr="${jgroups.udp.mcast_addr:228.11.11.11}"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="true"
+ discard_incompatible_packets="true"
+ enable_bundling="false"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="${jgroups.udp.ip_ttl:2}"
+ thread_naming_pattern="cl"
+ timer.num_threads="12"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="20"
+ thread_pool.max_threads="200"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="1000"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="20"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="run"/>
+ <PING timeout="2000"
+ num_initial_members="3"/>
+ <MERGE2 max_interval="100000"
+ min_interval="20000"/>
+ <FD_SOCK />
+ <FD timeout="6000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500" />
+ <BARRIER />
+ <pbcast.NAKACK use_stats_for_retransmission="false"
+ exponential_backoff="150"
+ use_mcast_xmit="true" gc_lag="0"
+ retransmit_timeout="50,300,600,1200"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <VIEW_SYNC avg_send_interval="10000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="true"
+ view_bundling="true"/>
+ <FC max_credits="500000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000" />
+ <pbcast.STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="20000"/>
+ </config>
+ </stack>
+
+ <stack name="jbm-data_4"
+ description="Stack optimized for the JBoss Messaging Data Channel">
+ <config>
+ <TCP singleton_name="jbm-data_4"
+ start_port="7900"
+ loopback="true"
+ recv_buf_size="20000000"
+ send_buf_size="640000"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="false"
+ use_send_queues="false"
+ sock_conn_timeout="300"
+ skip_suspected_members="true"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="8"
+ thread_pool.max_threads="200"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="500"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="100"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="run"/>
+ <MPING timeout="5000"
+ mcast_addr="${jboss.messaging.datachanneludpaddress,jboss.partition.udpGroup:228.6.6.6}"
+ mcast_port="${jboss.messaging.datachanneludpport:45567}"
+ ip_ttl="${jboss.messaging.ipttl:8}"
+ num_initial_members="5"
+ num_ping_requests="3"/>
+ <MERGE2 max_interval="100000" min_interval="20000"/>
+ <FD_SOCK/>
+ <FD timeout="6000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <BARRIER/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <VIEW_SYNC avg_send_interval="10000"/>
+
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="true" view_bundling="true"/>
+ </config>
+ </stack>
+
+
</protocol_stacks>
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/core/PostOfficeTestBase.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/core/PostOfficeTestBase.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/core/PostOfficeTestBase.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -44,7 +44,9 @@
import org.jboss.messaging.core.impl.tx.TransactionRepository;
import org.jboss.test.messaging.MessagingTestCase;
import org.jboss.test.messaging.core.postoffice.ClusteredPersistenceServiceConfigFileJChannelFactory;
+import org.jboss.test.messaging.tools.container.ServiceConfigHelper;
import org.jboss.test.messaging.tools.container.ServiceContainer;
+import org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement;
import org.jboss.test.messaging.util.CoreMessageFactory;
/**
@@ -84,9 +86,9 @@
String configFilePath = sc.getPersistenceConfigFile(true);
+
ChannelFactory jChannelFactory =
- new ClusteredPersistenceServiceConfigFileJChannelFactory(configFilePath,
- sc.getMBeanServer());
+ new ClusteredPersistenceServiceConfigFileJChannelFactory(configFilePath, sc.getMBeanServer(), nodeID);
MessagingPostOffice postOffice =
new MessagingPostOffice(sc.getDataSource(), sc.getTransactionManager(),
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/core/postoffice/ClusteredPersistenceServiceConfigFileJChannelFactory.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/core/postoffice/ClusteredPersistenceServiceConfigFileJChannelFactory.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/core/postoffice/ClusteredPersistenceServiceConfigFileJChannelFactory.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -49,6 +49,8 @@
// ... or just plain XML configuration.
private Element controlConfig;
private Element dataConfig;
+
+ private final int node;
// Constructors ---------------------------------------------------------------------------------
@@ -67,9 +69,20 @@
throws Exception
{
this.configFilePath = configFilePath;
+ this.node=-1;
init(configFilePath, mbeanServer);
}
+ public ClusteredPersistenceServiceConfigFileJChannelFactory(String configFilePath,
+ MBeanServer mbeanServer,
+ int node)
+ throws Exception
+ {
+ this.configFilePath = configFilePath;
+ this.node=node;
+ init(configFilePath, mbeanServer);
+ }
+
// ChannelFactory ------------------------------------------------------------------------------
public Channel createControlChannel() throws Exception
@@ -140,13 +153,23 @@
throw new IllegalStateException("Cannot find ControlChannelName");
}
+ if (node > 0)
+ {
+ controlChannelName += "_" + node;
+ }
+
String dataChannelName = (String)postOfficeConfig.getAttributeValue("DataChannelName");
-
+
if (dataChannelName == null)
{
throw new IllegalStateException("Cannot find DataChannelName");
}
+ if (node > 0)
+ {
+ dataChannelName += "_" + node;
+ }
+
try
{
if(mbeanServer.getMBeanInfo(channelFactoryName) != null)
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/JMSTestCase.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/JMSTestCase.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/JMSTestCase.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -20,113 +20,126 @@
public class JMSTestCase extends MessagingTestCase
{
protected static Topic topic1;
-
+
protected static Topic topic2;
-
+
protected static Topic topic3;
-
+
protected static Queue queue1;
-
+
protected static Queue queue2;
-
+
protected static Queue queue3;
-
+
protected static Queue queue4;
-
+
protected static JBossConnectionFactory cf;
-
+
protected static InitialContext ic;
-
+
protected static final String defaultConf = "all";
-
+
protected static String conf;
-
+
protected String overrideConf;
-
+
protected boolean startMessagingServer = true;
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- boolean changeServer = false;
-
- String newConf = null;
-
- if (overrideConf == null && !defaultConf.equals(conf))
- {
- //Going back to default
- changeServer = true;
-
- newConf = defaultConf;
- }
-
- if (overrideConf != null && !overrideConf.equals(conf))
- {
- //Applying new config
- changeServer = true;
-
- newConf = overrideConf;
- }
-
- if (changeServer || !ServerManagement.isStarted(0))
- {
- log.info("Config has changed so stopping server with " + conf + " config and starting new one with " + newConf);
-
- ServerManagement.stop();
-
- if (changeServer)
- {
- conf = newConf;
- }
-
- ServerManagement.start(0, conf);
-
- deployAndLookupAdministeredObjects();
- }
- else
- {
- log.info("Server does not need to be changed");
- }
-
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ boolean changeServer = false;
+
+ String newConf = null;
+
+ if (overrideConf == null && !defaultConf.equals(conf))
+ {
+ // Going back to default
+ changeServer = true;
+
+ newConf = defaultConf;
+ }
+
+ if (overrideConf != null && !overrideConf.equals(conf))
+ {
+ // Applying new config
+ changeServer = true;
+
+ newConf = overrideConf;
+ }
+
+ if (changeServer || !ServerManagement.isStarted(0))
+ {
+ log.info("Config has changed so stopping server with " + conf + " config and starting new one with " + newConf);
+
+ ServerManagement.stop();
+
+ if (changeServer)
+ {
+ conf = newConf;
+ }
+
+ ServerManagement.start(0, conf);
+
+ deployAndLookupAdministeredObjects();
+ }
+ else
+ {
+ log.info("Server does not need to be changed");
+ }
+
+ checkNotEmpty();
+ }
+
+ /**
+ * @throws Exception
+ */
+ protected void checkNotEmpty() throws Exception
+ {
checkEmpty(queue1);
checkEmpty(queue2);
checkEmpty(queue3);
checkEmpty(queue4);
-
+
// Check no subscriptions left lying around
-
+
checkNoSubscriptions(topic1);
- checkNoSubscriptions(topic2);
- checkNoSubscriptions(topic3);
- }
-
- protected void tearDown() throws Exception
- {
- super.tearDown();
-
- //A few sanity checks
-
- if (ServerManagement.isStarted(0))
- {
- if (checkNoMessageData())
- {
- fail("Message Data exists");
- }
- }
-
- //This will tell us if any connections have been left open
- assertEquals(0, ResourceManagerFactory.instance.size());
- }
+ checkNoSubscriptions(topic2);
+ checkNoSubscriptions(topic3);
+ }
- public JMSTestCase(String name)
- {
- super(name);
- }
-
- protected void deployAndLookupAdministeredObjects() throws Exception
- {
- ServerManagement.deployTopic("Topic1");
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ // A few sanity checks
+
+ if (ServerManagement.isStarted(0))
+ {
+ if (checkNoMessageData())
+ {
+ fail("Message Data exists");
+ }
+
+ checkNotEmpty();
+ }
+
+ // This will tell us if any connections have been left open
+ assertEquals(0, ResourceManagerFactory.instance.size());
+
+ }
+
+ public JMSTestCase(final String name)
+ {
+ super(name);
+ }
+
+ protected void deployAndLookupAdministeredObjects() throws Exception
+ {
+ ServerManagement.deployTopic("Topic1");
ServerManagement.deployTopic("Topic2");
ServerManagement.deployTopic("Topic3");
ServerManagement.deployQueue("Queue1");
@@ -143,5 +156,5 @@
queue2 = (Queue)ic.lookup("/queue/Queue2");
queue3 = (Queue)ic.lookup("/queue/Queue3");
queue4 = (Queue)ic.lookup("/queue/Queue4");
- }
+ }
}
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/RemotingConnectionConfigurationTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/RemotingConnectionConfigurationTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/RemotingConnectionConfigurationTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -1,212 +1,206 @@
-/*
- * 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;
-
-import java.lang.reflect.Field;
-import java.net.InetAddress;
-import java.util.HashSet;
-import java.util.Map;
-
-import org.jboss.jms.client.JBossConnection;
-import org.jboss.jms.client.delegate.ClientConnectionDelegate;
-import org.jboss.jms.client.remoting.JMSRemotingConnection;
-import org.jboss.remoting.Client;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.callback.CallbackPoller;
-import org.jboss.remoting.callback.InvokerCallbackHandler;
-import org.jboss.remoting.transport.Connector;
-import org.jboss.remoting.transport.PortUtil;
-import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.test.messaging.tools.container.ServiceContainer;
-
-/**
- *
- * @author <a href="ron.sigal at jboss.com">Ron Sigal</a>
- * @author <a href="ovidiu at feodorov.com">Ovidiu Feodorov</a>
- *
- * $Id$
- */
-public class RemotingConnectionConfigurationTest extends JMSTestCase
-{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- public RemotingConnectionConfigurationTest(String name)
- {
- super(name);
- }
- // Public --------------------------------------------------------
-
- /**
- * It only makes sense to run remote. Exclude it from "invm-tests" target configuration.
- */
- public void testDefaultHTTPCallbackPollPeriod() throws Exception
- {
- if (!ServerManagement.isRemote())
- {
- return;
- }
-
- JBossConnection connection = null;
-
- try
- {
- connection = (JBossConnection)cf.createConnection();
- connection.start();
-
- ClientConnectionDelegate delegate = (ClientConnectionDelegate)connection.getDelegate();
- JMSRemotingConnection remotingConnection = delegate.getRemotingConnection();
- Client client = remotingConnection.getRemotingClient();
-
- Field field = JMSRemotingConnection.class.getDeclaredField("serverLocator");
- field.setAccessible(true);
- InvokerLocator locator = (InvokerLocator)field.get(remotingConnection);
- String transport = locator.getProtocol();
-
- if (!"http".equals(transport))
- {
- // not interesting
- return;
- }
-
- field = Client.class.getDeclaredField("callbackPollers");
- field.setAccessible(true);
- Map callbackPollers = (Map)field.get(client);
- assertEquals(1, callbackPollers.size());
-
- CallbackPoller callbackPoller = (CallbackPoller)callbackPollers.values().iterator().next();
-
- field = CallbackPoller.class.getDeclaredField("pollPeriod");
- field.setAccessible(true);
- Long pollPeriod = (Long)field.get(callbackPoller);
- assertEquals(ServiceContainer.HTTP_CONNECTOR_CALLBACK_POLL_PERIOD, pollPeriod.longValue());
- }
- finally
- {
- if (connection != null)
- {
- connection.close();
- }
- }
- }
-
-
- /**
- * It only makes sense to run remote. Exclude it from "invm-tests" target configuration.
- */
- public void testConnectionConfiguration() throws Exception
- {
- if (!ServerManagement.isRemote())
- {
- return;
- }
-
- JBossConnection connection = null;
-
- try
- {
- String address = InetAddress.getLocalHost().getHostAddress();
- System.setProperty("jboss.messaging.callback.bind.address", address);
-
- int freePort = PortUtil.findFreePort(InetAddress.getLocalHost().getHostName());
- System.setProperty("jboss.messaging.callback.bind.port", Integer.toString(freePort));
-
- String pollPeriod = "654";
- System.setProperty("jboss.messaging.callback.pollPeriod", pollPeriod);
-
- System.setProperty("jboss.messaging.callback.reportPollingStatistics", "true");
-
- connection = (JBossConnection)cf.createConnection();
- connection.start();
-
- ClientConnectionDelegate delegate = (ClientConnectionDelegate)connection.getDelegate();
- JMSRemotingConnection remotingConnection = delegate.getRemotingConnection();
- Client client = remotingConnection.getRemotingClient();
-
- Field field = JMSRemotingConnection.class.getDeclaredField("serverLocator");
- field.setAccessible(true);
- InvokerLocator locator = (InvokerLocator)field.get(remotingConnection);
- String transport = locator.getProtocol();
-
- if ("socket".equals(transport)
- || "sslsocket".equals(transport)
- || "bisocket".equals(transport)
- || "sslbisocket".equals(transport))
- {
- field = Client.class.getDeclaredField("callbackConnectors");
- field.setAccessible(true);
- Map callbackConnectors = (Map)field.get(client);
-
- InvokerCallbackHandler callbackHandler = remotingConnection.getCallbackManager();
- HashSet map = (HashSet) callbackConnectors.get(callbackHandler);
- Connector connector = (Connector)map.iterator().next();
- locator = new InvokerLocator(connector.getInvokerLocator());
- assertEquals(address, locator.getHost());
- assertEquals(freePort, locator.getPort());
- }
- else if ("http".equals(transport))
- {
- field = Client.class.getDeclaredField("callbackPollers");
- field.setAccessible(true);
- Map callbackPollers = (Map)field.get(client);
- assertEquals(1, callbackPollers.size());
-
- CallbackPoller callbackPoller =
- (CallbackPoller)callbackPollers.values().iterator().next();
-
- field = CallbackPoller.class.getDeclaredField("pollPeriod");
- field.setAccessible(true);
-
- assertEquals(pollPeriod, ((Long)field.get(callbackPoller)).toString());
-
- field = CallbackPoller.class.getDeclaredField("reportStatistics");
- field.setAccessible(true);
- assertEquals(true, ((Boolean) field.get(callbackPoller)).booleanValue());
- }
- else
- {
- fail("Unrecognized transport: " + transport);
- }
- }
- finally
- {
- if (connection != null)
- {
- connection.close();
- }
-
- System.clearProperty("jboss.messaging.callback.bind.address");
-
- System.clearProperty("jboss.messaging.callback.bind.port");
-
- System.clearProperty("jboss.messaging.callback.pollPeriod");
-
- System.clearProperty("jboss.messaging.callback.reportPollingStatistics");
-
- }
- }
-}
+/*
+ * 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;
+
+import java.lang.reflect.Field;
+import java.net.InetAddress;
+import java.util.HashSet;
+import java.util.Map;
+
+import org.jboss.jms.client.JBossConnection;
+import org.jboss.jms.client.delegate.ClientConnectionDelegate;
+import org.jboss.jms.client.remoting.JMSRemotingConnection;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.callback.CallbackPoller;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.transport.Connector;
+import org.jboss.remoting.transport.PortUtil;
+import org.jboss.test.messaging.tools.ServerManagement;
+import org.jboss.test.messaging.tools.container.ServiceContainer;
+
+/**
+ *
+ * @author <a href="ron.sigal at jboss.com">Ron Sigal</a>
+ * @author <a href="ovidiu at feodorov.com">Ovidiu Feodorov</a>
+ * @author <a href="hgao at redhat.com">Howard Gao</a>
+ *
+ * $Id$
+ */
+public class RemotingConnectionConfigurationTest extends JMSTestCase
+{
+ // Constants -----------------------------------------------------
+
+ // Static --------------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ public RemotingConnectionConfigurationTest(String name)
+ {
+ super(name);
+ }
+ // Public --------------------------------------------------------
+
+ /**
+ * It only makes sense to run remote. Exclude it from "invm-tests" target configuration.
+ */
+ //disable it because it doesn't make sense to test pollPeriod in blocking mode.
+ //see JBMESSAGING-1131 Ron's comments.
+/*
+ public void testDefaultHTTPCallbackPollPeriod() throws Exception
+ {
+ if (!ServerManagement.isRemote())
+ {
+ return;
+ }
+
+ JBossConnection connection = null;
+
+ try
+ {
+ connection = (JBossConnection)cf.createConnection();
+ connection.start();
+
+ ClientConnectionDelegate delegate = (ClientConnectionDelegate)connection.getDelegate();
+ JMSRemotingConnection remotingConnection = delegate.getRemotingConnection();
+ Client client = remotingConnection.getRemotingClient();
+
+ Field field = JMSRemotingConnection.class.getDeclaredField("serverLocator");
+ field.setAccessible(true);
+ InvokerLocator locator = (InvokerLocator)field.get(remotingConnection);
+ String transport = locator.getProtocol();
+
+ if (!"http".equals(transport))
+ {
+ // not interesting
+ return;
+ }
+
+ field = Client.class.getDeclaredField("callbackPollers");
+ field.setAccessible(true);
+ Map callbackPollers = (Map)field.get(client);
+ assertEquals(1, callbackPollers.size());
+
+ CallbackPoller callbackPoller = (CallbackPoller)callbackPollers.values().iterator().next();
+
+ field = CallbackPoller.class.getDeclaredField("pollPeriod");
+ field.setAccessible(true);
+ Long pollPeriod = (Long)field.get(callbackPoller);
+ assertEquals(ServiceContainer.HTTP_CONNECTOR_CALLBACK_POLL_PERIOD, pollPeriod.longValue());
+ }
+ finally
+ {
+ if (connection != null)
+ {
+ connection.close();
+ }
+ }
+ }
+*/
+
+ /**
+ * It only makes sense to run remote. Exclude it from "invm-tests" target configuration.
+ */
+ public void testConnectionConfiguration() throws Exception
+ {
+ if (!ServerManagement.isRemote())
+ {
+ return;
+ }
+
+ JBossConnection connection = null;
+
+ try
+ {
+ String address = InetAddress.getLocalHost().getHostAddress();
+ System.setProperty("jboss.messaging.callback.bind.address", address);
+
+ int freePort = PortUtil.findFreePort(InetAddress.getLocalHost().getHostName());
+ System.setProperty("jboss.messaging.callback.bind.port", Integer.toString(freePort));
+
+ System.setProperty("jboss.messaging.callback.reportPollingStatistics", "true");
+
+ connection = (JBossConnection)cf.createConnection();
+ connection.start();
+
+ ClientConnectionDelegate delegate = (ClientConnectionDelegate)connection.getDelegate();
+ JMSRemotingConnection remotingConnection = delegate.getRemotingConnection();
+ Client client = remotingConnection.getRemotingClient();
+
+ Field field = JMSRemotingConnection.class.getDeclaredField("serverLocator");
+ field.setAccessible(true);
+ InvokerLocator locator = (InvokerLocator)field.get(remotingConnection);
+ String transport = locator.getProtocol();
+
+ if ("socket".equals(transport)
+ || "sslsocket".equals(transport)
+ || "bisocket".equals(transport)
+ || "sslbisocket".equals(transport))
+ {
+ field = Client.class.getDeclaredField("callbackConnectors");
+ field.setAccessible(true);
+ Map callbackConnectors = (Map)field.get(client);
+
+ InvokerCallbackHandler callbackHandler = remotingConnection.getCallbackManager();
+ HashSet map = (HashSet) callbackConnectors.get(callbackHandler);
+ Connector connector = (Connector)map.iterator().next();
+ locator = new InvokerLocator(connector.getInvokerLocator());
+ assertEquals(address, locator.getHost());
+ assertEquals(freePort, locator.getPort());
+ }
+ else if ("http".equals(transport))
+ {
+ field = Client.class.getDeclaredField("callbackPollers");
+ field.setAccessible(true);
+ Map callbackPollers = (Map)field.get(client);
+ assertEquals(1, callbackPollers.size());
+
+ CallbackPoller callbackPoller =
+ (CallbackPoller)callbackPollers.values().iterator().next();
+
+ field = CallbackPoller.class.getDeclaredField("reportStatistics");
+ field.setAccessible(true);
+ assertEquals(true, ((Boolean) field.get(callbackPoller)).booleanValue());
+ }
+ else
+ {
+ fail("Unrecognized transport: " + transport);
+ }
+ }
+ finally
+ {
+ if (connection != null)
+ {
+ connection.close();
+ }
+
+ System.clearProperty("jboss.messaging.callback.bind.address");
+
+ System.clearProperty("jboss.messaging.callback.bind.port");
+
+ System.clearProperty("jboss.messaging.callback.reportPollingStatistics");
+ }
+ }
+}
+
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/ScheduledDeliveryTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/ScheduledDeliveryTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/ScheduledDeliveryTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -267,6 +267,48 @@
}
}
+ //https://jira.jboss.org/jira/browse/JBMESSAGING-1460
+ public void testRemoveAllReferences() throws Exception
+ {
+ Connection conn = null;
+
+ try
+ {
+ conn = cf.createConnection();
+
+ Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ MessageProducer prod = sess.createProducer(queue1);
+
+ // Send one scheduled
+
+ long now = System.currentTimeMillis();
+
+ TextMessage tm1 = sess.createTextMessage("testScheduled1");
+ tm1.setLongProperty(JBossMessage.JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME, now + 5000);
+ prod.send(tm1);
+
+ assertRemainingMessages(1);
+
+ removeAllMessages(queue1.getQueueName(), true, 0);
+
+ //stop the queue
+ String on = "jboss.messaging.destination:service=Queue" + ",name=" + queue1.getQueueName();
+ ServerManagement.getServer(0).invoke(new ObjectName(on), "stop", null, null);
+
+ //start the queue again
+ ServerManagement.getServer(0).invoke(new ObjectName(on), "start", null, null);
+
+ assertRemainingMessages(0);
+ }
+ finally
+ {
+ if (conn != null)
+ {
+ conn.close();
+ }
+ }
+ }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/XARecoveryTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/XARecoveryTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/XARecoveryTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -3549,5 +3549,215 @@
}
}
}
+
+ /*
+ * https://jira.jboss.org/jira/browse/JBMESSAGING-1440
+ */
+ public void testReceivingMessageOfPreparedTransaction() throws Exception
+ {
+ log.trace("starting testReceivingMessageOfPreparedTransaction");
+
+ Connection conn1 = null;
+
+ XAConnection conn2 = null;
+
+ XAConnection conn3 = null;
+
+ XAConnection conn4 = null;
+
+ Connection conn5 = null;
+
+ try
+ {
+ //First send a message to the queue
+ conn1 = cf.createConnection();
+
+ Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ MessageProducer prod = sess1.createProducer(queue4);
+ prod.setDeliveryMode(DeliveryMode.PERSISTENT);
+ TextMessage tm1 = sess1.createTextMessage("TxM1");
+
+ prod.send(tm1);
+
+ conn2 = cf.createXAConnection();
+
+ XASession sess2 = conn2.createXASession();
+
+ XAResource res1 = sess2.getXAResource();
+
+ //Pretend to be a transaction manager by interacting through the XAResources
+ Xid xid1 = new MessagingXid("tx1".getBytes(), 42, "abcdef".getBytes());
+
+ res1.start(xid1, XAResource.TMNOFLAGS);
+
+ MessageConsumer cons = sess2.createConsumer(queue4);
+
+ conn2.start();
+
+ //Consume the message
+
+ TextMessage rm1 = (TextMessage)cons.receive(1000);
+
+ assertNotNull(rm1);
+
+ assertEquals(tm1.getText(), rm1.getText());
+
+ res1.end(xid1, XAResource.TMSUCCESS);
+
+ //prepare the tx
+
+ res1.prepare(xid1);
+
+ conn1.close();
+
+ conn2.close();
+
+ conn1 = null;
+
+ conn2 = null;
+
+ //Now receive again
+
+ conn3 = cf.createXAConnection();
+
+ XASession sess3 = conn3.createXASession();
+
+ XAResource res3 = sess3.getXAResource();
+
+ Xid xid2 = new MessagingXid("tx2".getBytes(), 42, "ghijkl".getBytes());
+
+ res3.start(xid2, XAResource.TMNOFLAGS);
+
+ MessageConsumer cons3 = sess3.createConsumer(queue4);
+
+ conn3.start();
+
+ //Consume the message
+
+ TextMessage rm3 = (TextMessage)cons3.receive(3000);
+
+ assertNull(rm3);
+
+ res3.end(xid2, XAResource.TMSUCCESS);
+
+ res3.prepare(xid2);
+ res3.commit(xid2, false);
+
+ conn3.close();
+ conn3 = null;
+
+ //now recover the lost message
+ ServerManagement.stopServerPeer();
+
+ ServerManagement.startServerPeer();
+
+ deployAndLookupAdministeredObjects();
+
+ //Now recover
+
+ conn4 = cf.createXAConnection();
+
+ XASession sess4 = conn4.createXASession();
+
+ XAResource res4 = sess4.getXAResource();
+
+ Xid[] xids = res4.recover(XAResource.TMSTARTRSCAN);
+ assertEquals(1, xids.length);
+
+ Xid[] xids2 = res4.recover(XAResource.TMENDRSCAN);
+ assertEquals(0, xids2.length);
+
+ assertEquals(xid1, xids[0]);
+
+ //commit the tx
+
+ res4.commit(xids[0], false);
+
+ //The message should never be received again
+
+ conn4.close();
+ conn4 = null;
+
+ conn5 = cf.createConnection();
+
+ Session sess5 = conn5.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ MessageConsumer cons5 = sess5.createConsumer(queue4);
+
+ conn5.start();
+
+ Message m = cons5.receive(1000);
+
+ assertNull(m);
+
+ conn5.close();
+ conn5 = null;
+
+ }
+ finally
+ {
+ if (conn1 != null)
+ {
+ try
+ {
+ conn1.close();
+ }
+ catch (Exception e)
+ {
+ //Ignore
+ }
+ }
+
+ if (conn2 != null)
+ {
+ try
+ {
+ conn2.close();
+ }
+ catch (Exception e)
+ {
+ //Ignore
+ }
+ }
+
+ if (conn3 != null)
+ {
+ try
+ {
+ conn3.close();
+ }
+ catch (Exception e)
+ {
+ //Ignore
+ }
+ }
+
+ if (conn4 != null)
+ {
+ try
+ {
+ conn4.close();
+ }
+ catch (Exception e)
+ {
+ //Ignore
+ }
+ }
+
+ if (conn5 != null)
+ {
+ try
+ {
+ conn5.close();
+ }
+ catch (Exception e)
+ {
+ //Ignore
+ }
+ }
+ }
+ }
+
}
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/XATest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/XATest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/XATest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -21,14 +21,45 @@
*/
package org.jboss.test.messaging.jms;
+import java.util.ArrayList;
+
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.ServerSession;
+import javax.jms.ServerSessionPool;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.XAConnection;
+import javax.jms.XAConnectionFactory;
+import javax.jms.XASession;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.transaction.RollbackException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import javax.transaction.xa.XAException;
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+
import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple;
+
import org.jboss.jms.client.JBossConnection;
import org.jboss.jms.client.JBossSession;
import org.jboss.jms.client.delegate.ClientConnectionDelegate;
import org.jboss.jms.client.delegate.DelegateSupport;
import org.jboss.jms.client.state.ConnectionState;
import org.jboss.jms.client.state.SessionState;
-import org.jboss.jms.tx.*;
+import org.jboss.jms.tx.ClientTransaction;
+import org.jboss.jms.tx.LocalTx;
+import org.jboss.jms.tx.MessagingXAResource;
+import org.jboss.jms.tx.MessagingXid;
+import org.jboss.jms.tx.ResourceManager;
+import org.jboss.jms.tx.ResourceManagerFactory;
import org.jboss.logging.Logger;
import org.jboss.test.messaging.tools.ServerManagement;
import org.jboss.test.messaging.tools.container.InVMInitialContextFactory;
@@ -36,16 +67,6 @@
import org.jboss.tm.TransactionManagerLocator;
import org.jboss.tm.TxUtils;
-import javax.jms.*;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-import java.util.ArrayList;
-
/**
*
* A XATestBase
@@ -65,7 +86,7 @@
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
-
+
protected TransactionManager tm;
protected Transaction suspendedTx;
@@ -74,26 +95,25 @@
// Constructors --------------------------------------------------
- public XATest(String name)
+ public XATest(final String name)
{
super(name);
}
-
// TestCase overrides -------------------------------------------
public void setUp() throws Exception
- {
+ {
super.setUp();
-
- ResourceManagerFactory.instance.clear();
- //Also need a local tx mgr if test is running remote
+ ResourceManagerFactory.instance.clear();
+
+ // Also need a local tx mgr if test is running remote
if (ServerManagement.isRemote())
{
- sc = new ServiceContainer("transaction");
+ sc = new ServiceContainer("transaction");
- //Don't drop the tables again!
+ // Don't drop the tables again!
sc.start(false);
}
@@ -102,7 +122,7 @@
tm = (TransactionManager)localIc.lookup(ServiceContainer.TRANSACTION_MANAGER_JNDI_NAME);
assertTrue(tm instanceof TransactionManagerImple);
-
+
if (!ServerManagement.isRemote())
{
suspendedTx = tm.suspend();
@@ -110,24 +130,28 @@
}
public void tearDown() throws Exception
- {
+ {
if (TxUtils.isUncommitted(tm))
{
- //roll it back
+ // roll it back
try
{
tm.rollback();
}
catch (Throwable ignore)
{
- //The connection will probably be closed so this may well throw an exception
+ // The connection will probably be closed so this may well throw an exception
}
}
if (tm.getTransaction() != null)
{
Transaction tx = tm.suspend();
if (tx != null)
- log.warn("Transaction still associated with thread " + tx + " at status " + TxUtils.getStatusAsString(tx.getStatus()));
+ {
+ log.warn("Transaction still associated with thread " + tx +
+ " at status " +
+ TxUtils.getStatusAsString(tx.getStatus()));
+ }
}
if (suspendedTx != null)
@@ -139,7 +163,7 @@
{
sc.stop();
}
-
+
super.tearDown();
}
@@ -161,12 +185,11 @@
validate that both sets of work W1 and W2 get applied.
*/
- //http://jira.jboss.com/jira/browse/JBMESSAGING-1221
+ // http://jira.jboss.com/jira/browse/JBMESSAGING-1221
public void testMemoryLeakForLocalTXsWithWork() throws Exception
{
XAConnection conn = null;
- Transaction tx1 = null;
try
{
@@ -180,12 +203,12 @@
ResourceManager rm = state.getResourceManager();
- //Create a session
- JBossSession sess1 = (JBossSession) conn.createXASession();
+ // Create a session
+ JBossSession sess1 = (JBossSession)conn.createXASession();
DummyListener listener = new DummyListener();
sess1.setMessageListener(listener);
conn.start();
- MessagingXAResource res1 = (MessagingXAResource) sess1.getXAResource();
+ MessagingXAResource res1 = (MessagingXAResource)sess1.getXAResource();
tm.begin();
Transaction trans = tm.getTransaction();
@@ -194,41 +217,44 @@
MessageProducer p = sess1.createProducer(queue1);
MessageConsumer cons = sess1.createConsumer(queue1);
conn.start();
- //send 10 messages
- for(int i = 0; i < 10; i++)
+ // send 10 messages
+ for (int i = 0; i < 10; i++)
{
TextMessage message = sess1.createTextMessage("delistedwork" + i);
p.send(message);
}
- //now receive 5
- for(int i = 0; i < 5; i++)
+ // now receive 5
+ for (int i = 0; i < 5; i++)
{
- TextMessage textMessage = (TextMessage) cons.receive();
+ TextMessage textMessage = (TextMessage)cons.receive();
assertEquals("delistedwork" + i, textMessage.getText());
}
- //once we enlist ensure that the 5 acks are merged ok, the first timne we do this there is nothing to merge in the global tx
- //so all acks are just copied
+ // once we enlist ensure that the 5 acks are merged ok, the first timne we do this there is nothing to merge in
+ // the global tx
+ // so all acks are just copied
trans.enlistResource(res1);
SessionState sstate = (SessionState)((DelegateSupport)sess1.getDelegate()).getState();
ClientTransaction clientTransaction = rm.getTx(sstate.getCurrentTxId());
- assertEquals("to many session states", clientTransaction.getSessionStates().size(), 1 );
- ClientTransaction.SessionTxState sessionTxState = (ClientTransaction.SessionTxState) clientTransaction.getSessionStates().get(0);
- assertEquals("wrong number of acks",5, sessionTxState.getAcks().size());
+ assertEquals("to many session states", clientTransaction.getSessionStates().size(), 1);
+ ClientTransaction.SessionTxState sessionTxState = (ClientTransaction.SessionTxState)clientTransaction.getSessionStates()
+ .get(0);
+ assertEquals("wrong number of acks", 5, sessionTxState.getAcks().size());
trans.delistResource(res1, XAResource.TMSUCCESS);
- for(int i = 5; i < 10; i++)
+ for (int i = 5; i < 10; i++)
{
- TextMessage textMessage = (TextMessage) cons.receive();
+ TextMessage textMessage = (TextMessage)cons.receive();
assertEquals("delistedwork" + i, textMessage.getText());
}
- //now reenlist and make sure that there are now 10 acks, this time around a merge will be done with the first 5 acks
+ // now reenlist and make sure that there are now 10 acks, this time around a merge will be done with the first
+ // 5 acks
//
trans.enlistResource(res1);
clientTransaction = rm.getTx(sstate.getCurrentTxId());
- assertEquals("to many session states", clientTransaction.getSessionStates().size(), 1 );
- sessionTxState = (ClientTransaction.SessionTxState) clientTransaction.getSessionStates().get(0);
- assertEquals("wrong number of acks",10, sessionTxState.getAcks().size());
+ assertEquals("to many session states", clientTransaction.getSessionStates().size(), 1);
+ sessionTxState = (ClientTransaction.SessionTxState)clientTransaction.getSessionStates().get(0);
+ assertEquals("wrong number of acks", 10, sessionTxState.getAcks().size());
tm.commit();
@@ -244,12 +270,11 @@
}
- //http://jira.jboss.com/jira/browse/JBMESSAGING-1221
+ // http://jira.jboss.com/jira/browse/JBMESSAGING-1221
public void testMemoryLeakForLocalTXsOnJoinOnePhase() throws Exception
{
XAConnection conn = null;
- Transaction tx1 = null;
try
{
@@ -263,9 +288,9 @@
ResourceManager rm = state.getResourceManager();
- //Create a session
+ // Create a session
XASession sess1 = conn.createXASession();
- MessagingXAResource res1 = (MessagingXAResource) sess1.getXAResource();
+ MessagingXAResource res1 = (MessagingXAResource)sess1.getXAResource();
byte[] branchQualifier = new byte[] { 1, 2, 3, 4, 5, 6, 0, 0, 0, 0 };
byte[] globalTxId = new byte[] { 6, 5, 4, 3, 2, 1, 0, 0, 0, 0 };
int rmSizeBeforeStart = rm.size();
@@ -292,12 +317,12 @@
}
}
- //http://jira.jboss.com/jira/browse/JBMESSAGING-1221
+
+ // http://jira.jboss.com/jira/browse/JBMESSAGING-1221
public void testMemoryLeakForLocalTXsOnJoinTwoPhase() throws Exception
{
XAConnection conn = null;
- Transaction tx1 = null;
try
{
@@ -311,9 +336,9 @@
ResourceManager rm = state.getResourceManager();
- //Create a session
+ // Create a session
XASession sess1 = conn.createXASession();
- MessagingXAResource res1 = (MessagingXAResource) sess1.getXAResource();
+ MessagingXAResource res1 = (MessagingXAResource)sess1.getXAResource();
byte[] branchQualifier = new byte[] { 1, 2, 3, 4, 5, 6, 0, 0, 0, 0 };
byte[] globalTxId = new byte[] { 6, 5, 4, 3, 2, 1, 0, 0, 0, 0 };
int rmSizeBeforeStart = rm.size();
@@ -341,12 +366,67 @@
}
}
- //http://jira.jboss.com/jira/browse/JBMESSAGING-1221
+
+ public void testTransactionRollbackAfterClosingAConnectionWithEnlistedResource() throws Exception
+ {
+ XAConnection conn = null;
+ XAConnection conn2 = null;
+
+ try
+ {
+
+ conn = cf.createXAConnection();
+
+ // Create a session
+ XASession sess1 = conn.createXASession();
+ XAResource res1 = (XAResource)sess1.getXAResource();
+
+ tm.begin();
+
+ Transaction transaction = tm.getTransaction();
+ transaction.enlistResource(res1);
+
+ // a remoting exception occurs -> we close the connection
+ conn.close();
+ // and we create a new one
+ conn2 = cf.createXAConnection();
+
+ XASession sess2 = conn2.createXASession();
+ XAResource res2 = (XAResource)sess2.getXAResource();
+
+ assertFalse(res2.isSameRM(res1));
+ transaction.enlistResource(res2);
+
+ assertFalse(transaction.delistResource(res1, XAResource.TMSUCCESS));
+ assertTrue(transaction.delistResource(res2, XAResource.TMSUCCESS));
+
+ try {
+ transaction.commit();
+ fail("transaction must roll back since res1 was not properly delisted");
+ }
+ catch (RollbackException e)
+ {
+ }
+ }
+ finally
+ {
+ if (conn != null)
+ {
+ conn.close();
+ }
+ if (conn2 != null)
+ {
+ conn2.close();
+ }
+
+ }
+ }
+
+ // http://jira.jboss.com/jira/browse/JBMESSAGING-1221
public void testMemoryLeakForLocalTXsOnResumeOnePhase() throws Exception
{
XAConnection conn = null;
- Transaction tx1 = null;
try
{
@@ -360,9 +440,9 @@
ResourceManager rm = state.getResourceManager();
- //Create a session
+ // Create a session
XASession sess1 = conn.createXASession();
- MessagingXAResource res1 = (MessagingXAResource) sess1.getXAResource();
+ MessagingXAResource res1 = (MessagingXAResource)sess1.getXAResource();
byte[] branchQualifier = new byte[] { 1, 2, 3, 4, 5, 6, 0, 0, 0, 0 };
byte[] globalTxId = new byte[] { 6, 5, 4, 3, 2, 1, 0, 0, 0, 0 };
int rmSizeBeforeStart = rm.size();
@@ -389,12 +469,12 @@
}
}
- //http://jira.jboss.com/jira/browse/JBMESSAGING-1221
+
+ // http://jira.jboss.com/jira/browse/JBMESSAGING-1221
public void testMemoryLeakForLocalTXsOnJResumeTwoPhase() throws Exception
{
XAConnection conn = null;
- Transaction tx1 = null;
try
{
@@ -408,9 +488,9 @@
ResourceManager rm = state.getResourceManager();
- //Create a session
+ // Create a session
XASession sess1 = conn.createXASession();
- MessagingXAResource res1 = (MessagingXAResource) sess1.getXAResource();
+ MessagingXAResource res1 = (MessagingXAResource)sess1.getXAResource();
byte[] branchQualifier = new byte[] { 1, 2, 3, 4, 5, 6, 0, 0, 0, 0 };
byte[] globalTxId = new byte[] { 6, 5, 4, 3, 2, 1, 0, 0, 0, 0 };
int rmSizeBeforeStart = rm.size();
@@ -438,6 +518,7 @@
}
}
+
/* If there is no global tx present the send must behave as non transacted.
* See http://www.jboss.com/index.html?module=bb&op=viewtopic&t=98577&postdays=0&postorder=asc&start=0
* http://jira.jboss.com/jira/browse/JBMESSAGING-410
@@ -461,7 +542,7 @@
XAConnection xconn = xcf.createXAConnection();
XASession xs = xconn.createXASession();
-
+
MessageProducer p = xs.createProducer(queue1);
Message m = xs.createTextMessage("one");
@@ -489,7 +570,6 @@
}
}
-
/*
* If messages are consumed using an XASession that is not enlisted in a transaction then the behaviour of the session
* falls back to being AUTO_ACK - i.e. the messages will get acked immediately.
@@ -533,7 +613,7 @@
try
{
ObjectName queueMBean = new ObjectName("jboss.messaging.destination:service=Queue,name=Queue1");
- Integer count = (Integer) ServerManagement.getAttribute(queueMBean, "MessageCount");
+ Integer count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
assertEquals(1, count.intValue());
// using XA with a ConnectionConsumer (testing the transaction behavior under MDBs)
@@ -553,7 +633,7 @@
assertEquals(1, listener.messages.size());
// Message should still be on server
- count = (Integer) ServerManagement.getAttribute(queueMBean, "MessageCount");
+ count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
assertEquals(1, count.intValue());
XAResource resource = xasession.getXAResource();
@@ -581,7 +661,7 @@
trans.commit();
// After commit the message should be consumed
- count = (Integer) ServerManagement.getAttribute(queueMBean, "MessageCount");
+ count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
assertEquals(0, count.intValue());
}
finally
@@ -596,8 +676,7 @@
}
}
}
-
-
+
/*
* If messages are consumed using an XASession that is not enlisted in a transaction then the behaviour of the session
* falls back to being AUTO_ACK - i.e. the messages will get acked immediately.
@@ -657,11 +736,11 @@
TextMessage rm = (TextMessage)c.receive(1000);
assertEquals("one", rm.getText());
-
+
// messages should be acked
count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
assertEquals(0, count.intValue());
-
+
xconn.close();
}
finally
@@ -673,7 +752,6 @@
}
}
}
-
/*
* If messages are consumed using an XASession that is not enlisted in a transaction then the behaviour of the session
@@ -842,7 +920,7 @@
// I can't call xasession.close for this test as JCA layer would cache the session
// So.. keep this close commented!
- //xasession.close();
+ // xasession.close();
count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
assertEquals(0, count.intValue());
@@ -856,7 +934,7 @@
}
}
- //See http://jira.jboss.com/jira/browse/JBMESSAGING-638
+ // See http://jira.jboss.com/jira/browse/JBMESSAGING-638
public void testResourceManagerMemoryLeakOnCommit() throws Exception
{
XAConnection xaConn = null;
@@ -918,7 +996,7 @@
}
}
- //See http://jira.jboss.com/jira/browse/JBMESSAGING-638
+ // See http://jira.jboss.com/jira/browse/JBMESSAGING-638
public void testResourceManagerMemoryLeakOnRollback() throws Exception
{
XAConnection xaConn = null;
@@ -990,10 +1068,10 @@
try
{
- //First send some messages to a queue
+ // First send some messages to a queue
ObjectName queueMBean = new ObjectName("jboss.messaging.destination:service=Queue,name=Queue1");
- Integer count = (Integer) ServerManagement.getAttribute(queueMBean, "MessageCount");
+ Integer count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
assertEquals(0, count.intValue());
conn = cf.createConnection();
@@ -1010,7 +1088,7 @@
prod.send(tm2);
- count = (Integer) ServerManagement.getAttribute(queueMBean, "MessageCount");
+ count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
assertEquals(2, count.intValue());
xaConn = cf.createXAConnection();
@@ -1031,15 +1109,15 @@
assertEquals(2, listener.messages.size());
- assertEquals("message1", ((TextMessage)(listener.messages.get(0))).getText());
- assertEquals("message2", ((TextMessage)(listener.messages.get(1))).getText());
+ assertEquals("message1", ((TextMessage)listener.messages.get(0)).getText());
+ assertEquals("message2", ((TextMessage)listener.messages.get(1)).getText());
- count = (Integer) ServerManagement.getAttribute(queueMBean, "MessageCount");
+ count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
assertEquals(2, count.intValue());
listener.messages.clear();
- //Now we enlist the session in an xa transaction
+ // Now we enlist the session in an xa transaction
XAResource res = xaSession.getXAResource();
@@ -1048,25 +1126,26 @@
Transaction tx = tm.getTransaction();
tx.enlistResource(res);
- //This should cause the work done previously to be converted into work done in the xa transaction
- //this is what an MDB does
- //There is a difficulty in transactional delivery with an MDB.
- //The message is received from the destination and then sent to the mdb container so
- //it can call onMessage.
- //For transactional delivery the receipt of the message should be in a transaction but by the time
- //the mdb container is invoked the message has already been received it is too late - the message
- //has already been received and passed on (see page 199 (chapter 5 JMS and Transactions, section "Application Server Integration"
- //of Mark Little's book Java Transaction processing
- //for a discussion of how different app serves deal with this)
- //The way jboss messaging (and jboss mq) deals with this is to convert any work done
- //prior to when the xasession is enlisted in the tx, into work done in the xa tx
+ // This should cause the work done previously to be converted into work done in the xa transaction
+ // this is what an MDB does
+ // There is a difficulty in transactional delivery with an MDB.
+ // The message is received from the destination and then sent to the mdb container so
+ // it can call onMessage.
+ // For transactional delivery the receipt of the message should be in a transaction but by the time
+ // the mdb container is invoked the message has already been received it is too late - the message
+ // has already been received and passed on (see page 199 (chapter 5 JMS and Transactions, section
+ // "Application Server Integration"
+ // of Mark Little's book Java Transaction processing
+ // for a discussion of how different app serves deal with this)
+ // The way jboss messaging (and jboss mq) deals with this is to convert any work done
+ // prior to when the xasession is enlisted in the tx, into work done in the xa tx
tx.delistResource(res, XAResource.TMSUCCESS);
- //Now rollback the tx - this should cause redelivery of the two messages
+ // Now rollback the tx - this should cause redelivery of the two messages
tm.rollback();
- count = (Integer) ServerManagement.getAttribute(queueMBean, "MessageCount");
+ count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
assertEquals(2, count.intValue());
Thread.sleep(1000);
@@ -1086,7 +1165,7 @@
assertEquals(0, listener.messages.size());
- count = (Integer) ServerManagement.getAttribute(queueMBean, "MessageCount");
+ count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
assertEquals(0, count.intValue());
assertNull(tm.getTransaction());
@@ -1103,16 +1182,17 @@
xaConn.close();
}
- /* if (suspended != null)
- {
- tm.resume(suspended);
- }*/
+ /* if (suspended != null)
+ {
+ tm.resume(suspended);
+ }*/
}
}
- //http://jira.jboss.com/jira/browse/JBMESSAGING-721
+ // http://jira.jboss.com/jira/browse/JBMESSAGING-721
// Note: The behavior of this test was changed after http://jira.jboss.com/jira/browse/JBMESSAGING-946
- // When you have a XASession without a transaction enlisted we will behave the same way as non transactedSession, AutoAck
+ // When you have a XASession without a transaction enlisted we will behave the same way as non transactedSession,
+ // AutoAck
public void testTransactionIdSetAfterCommit() throws Exception
{
Connection conn = null;
@@ -1121,7 +1201,7 @@
try
{
- //First send some messages to a queue
+ // First send some messages to a queue
conn = cf.createConnection();
@@ -1137,7 +1217,6 @@
prod.send(tm2);
-
xaConn = cf.createXAConnection();
XASession xaSession = xaConn.createXASession();
@@ -1146,7 +1225,7 @@
MessageConsumer cons = xaSession.createConsumer(queue1);
- //Now we enlist the session in an xa transaction
+ // Now we enlist the session in an xa transaction
XAResource res = xaSession.getXAResource();
@@ -1157,15 +1236,15 @@
tx.delistResource(res, XAResource.TMSUCCESS);
- //Then we do a commit
+ // Then we do a commit
tm.commit();
// I have changed where this begin was originally set
// as when you don't have a resource enlisted, XASessions will act as
// non transacted + AutoAck
- //And enlist again - this should convert the work done in the local tx
- //into the global branch
+ // And enlist again - this should convert the work done in the local tx
+ // into the global branch
tx = tm.getTransaction();
@@ -1174,7 +1253,7 @@
tx = tm.getTransaction();
tx.enlistResource(res);
- //Then we receive the messages outside the tx
+ // Then we receive the messages outside the tx
TextMessage rm1 = (TextMessage)cons.receive(1000);
@@ -1194,7 +1273,7 @@
tx.delistResource(res, XAResource.TMSUCCESS);
- //Now rollback the tx - this should cause redelivery of the two messages
+ // Now rollback the tx - this should cause redelivery of the two messages
tx.rollback();
rm1 = (TextMessage)cons.receive(1000);
@@ -1228,7 +1307,7 @@
}
- //http://jira.jboss.com/jira/browse/JBMESSAGING-721
+ // http://jira.jboss.com/jira/browse/JBMESSAGING-721
public void testTransactionIdSetAfterRollback() throws Exception
{
Connection conn = null;
@@ -1237,7 +1316,7 @@
try
{
- //First send some messages to a queue
+ // First send some messages to a queue
conn = cf.createConnection();
@@ -1261,7 +1340,7 @@
MessageConsumer cons = xaSession.createConsumer(queue1);
- //Now we enlist the session in an xa transaction
+ // Now we enlist the session in an xa transaction
XAResource res = xaSession.getXAResource();
@@ -1271,12 +1350,12 @@
tx.enlistResource(res);
tx.delistResource(res, XAResource.TMSUCCESS);
- //Then we do a rollback
+ // Then we do a rollback
tm.rollback();
tm.begin();
- //And enlist again - the work should then be converted into the global tx branch
+ // And enlist again - the work should then be converted into the global tx branch
// I have changed where this begin was originally set
// as when you don't have a resource enlisted, XASessions will act as
@@ -1286,7 +1365,7 @@
tx.enlistResource(res);
- //Then we receive the messages outside the global tx
+ // Then we receive the messages outside the global tx
TextMessage rm1 = (TextMessage)cons.receive(1000);
@@ -1305,7 +1384,7 @@
assertNull(rm3);
tx.delistResource(res, XAResource.TMSUCCESS);
- //Now rollback the tx - this should cause redelivery of the two messages
+ // Now rollback the tx - this should cause redelivery of the two messages
tx.rollback();
rm1 = (TextMessage)cons.receive(1000);
@@ -1376,16 +1455,16 @@
res1.prepare(trailing);
- //Now "crash" the server
+ // Now "crash" the server
ServerManagement.stopServerPeer();
ServerManagement.startServerPeer();
deployAndLookupAdministeredObjects();
-
+
conn1.close();
-
+
conn1 = cf.createXAConnection();
XAResource res = conn1.createXASession().getXAResource();
@@ -1409,7 +1488,7 @@
finally
{
removeAllMessages(queue1.getQueueName(), true, 0);
-
+
if (conn1 != null)
{
try
@@ -1418,7 +1497,7 @@
}
catch (Exception e)
{
- //Ignore
+ // Ignore
}
}
}
@@ -1426,7 +1505,7 @@
public void test2PCSendCommit1PCOptimization() throws Exception
{
- //Since both resources have some RM, TM will probably use 1PC optimization
+ // Since both resources have some RM, TM will probably use 1PC optimization
XAConnection conn = null;
Connection conn2 = null;
@@ -1482,8 +1561,6 @@
}
}
-
-
public void test2PCSendCommit() throws Exception
{
XAConnection conn = null;
@@ -1500,7 +1577,7 @@
MessagingXAResource res = (MessagingXAResource)sess.getXAResource();
XAResource res2 = new DummyXAResource();
- //To prevent 1PC optimization being used
+ // To prevent 1PC optimization being used
res.setPreventJoining(true);
Transaction tx = tm.getTransaction();
@@ -1543,10 +1620,9 @@
}
}
-
public void test2PCSendRollback1PCOptimization() throws Exception
{
- //Since both resources have some RM, TM will probably use 1PC optimization
+ // Since both resources have some RM, TM will probably use 1PC optimization
XAConnection conn = null;
Connection conn2 = null;
@@ -1598,7 +1674,6 @@
}
}
-
public void test2PCSendFailOnPrepare() throws Exception
{
XAConnection conn = null;
@@ -1612,7 +1687,7 @@
XASession sess = conn.createXASession();
MessagingXAResource res = (MessagingXAResource)sess.getXAResource();
- //prevent 1Pc optimisation
+ // prevent 1Pc optimisation
res.setPreventJoining(true);
XAResource res2 = new DummyXAResource(true);
@@ -1645,7 +1720,7 @@
}
catch (Exception e)
{
- //We should expect this
+ // We should expect this
}
conn2 = cf.createConnection();
@@ -1681,7 +1756,7 @@
XASession sess = conn.createXASession();
MessagingXAResource res = (MessagingXAResource)sess.getXAResource();
- //prevent 1Pc optimisation
+ // prevent 1Pc optimisation
res.setPreventJoining(true);
XAResource res2 = new DummyXAResource();
@@ -1725,7 +1800,7 @@
public void test2PCReceiveCommit1PCOptimization() throws Exception
{
- //Since both resources have some RM, TM will probably use 1PC optimization
+ // Since both resources have some RM, TM will probably use 1PC optimization
XAConnection conn = null;
Connection conn2 = null;
@@ -1735,7 +1810,7 @@
conn2 = cf.createConnection();
conn2.start();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("XATest1");
prod.send(m);
m = sessProducer.createTextMessage("XATest2");
@@ -1757,7 +1832,6 @@
MessageConsumer cons = sess.createConsumer(queue1);
-
TextMessage m2 = (TextMessage)cons.receive(MAX_TIMEOUT);
assertNotNull(m2);
@@ -1773,7 +1847,7 @@
tm.commit();
- //New tx
+ // New tx
tm.begin();
tx = tm.getTransaction();
tx.enlistResource(res);
@@ -1812,7 +1886,7 @@
conn2 = cf.createConnection();
conn2.start();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("XATest1");
prod.send(m);
m = sessProducer.createTextMessage("XATest2");
@@ -1835,7 +1909,6 @@
MessageConsumer cons = sess.createConsumer(queue1);
-
TextMessage m2 = (TextMessage)cons.receive(MAX_TIMEOUT);
assertNotNull(m2);
@@ -1851,7 +1924,7 @@
tm.commit();
- //New tx
+ // New tx
tm.begin();
tx = tm.getTransaction();
tx.enlistResource(res);
@@ -1882,7 +1955,7 @@
public void test2PCReceiveRollback1PCOptimization() throws Exception
{
- //Since both resources have some RM, TM will probably use 1PC optimization
+ // Since both resources have some RM, TM will probably use 1PC optimization
XAConnection conn = null;
Connection conn2 = null;
@@ -1891,7 +1964,7 @@
{
conn2 = cf.createConnection();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("XATest1");
prod.send(m);
@@ -1914,7 +1987,6 @@
MessageConsumer cons = sess.createConsumer(queue1);
-
TextMessage m2 = (TextMessage)cons.receive(MAX_TIMEOUT);
assertNotNull(m2);
assertEquals("XATest1", m2.getText());
@@ -1927,9 +1999,9 @@
tm.rollback();
- //Message should be redelivered
+ // Message should be redelivered
- //New tx
+ // New tx
tm.begin();
tx = tm.getTransaction();
tx.enlistResource(res);
@@ -1971,14 +2043,13 @@
{
conn2 = cf.createConnection();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("XATest1");
prod.send(m);
m = sessProducer.createTextMessage("XATest2");
prod.send(m);
-
conn = cf.createXAConnection();
conn.start();
@@ -1996,7 +2067,6 @@
MessageConsumer cons = sess.createConsumer(queue1);
-
TextMessage m2 = (TextMessage)cons.receive(MAX_TIMEOUT);
assertNotNull(m2);
assertEquals("XATest1", m2.getText());
@@ -2009,9 +2079,9 @@
tm.rollback();
- //Message should be redelivered
+ // Message should be redelivered
- //New tx
+ // New tx
tm.begin();
tx = tm.getTransaction();
tx.enlistResource(res);
@@ -2046,7 +2116,6 @@
}
-
public void test1PCSendCommit() throws Exception
{
XAConnection conn = null;
@@ -2061,11 +2130,9 @@
XASession sess = conn.createXASession();
XAResource res = sess.getXAResource();
-
Transaction tx = tm.getTransaction();
tx.enlistResource(res);
-
MessageProducer prod = sess.createProducer(queue1);
prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
Message m = sess.createTextMessage("XATest1");
@@ -2102,7 +2169,6 @@
}
-
public void test1PCSendRollback() throws Exception
{
XAConnection conn = null;
@@ -2161,7 +2227,7 @@
conn2 = cf.createConnection();
conn2.start();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("XATest1");
prod.send(m);
m = sessProducer.createTextMessage("XATest2");
@@ -2180,7 +2246,6 @@
MessageConsumer cons = sess.createConsumer(queue1);
-
TextMessage m2 = (TextMessage)cons.receive(MAX_TIMEOUT);
assertNotNull(m2);
@@ -2194,7 +2259,7 @@
tm.commit();
- //New tx
+ // New tx
tm.begin();
tx = tm.getTransaction();
tx.enlistResource(res);
@@ -2230,13 +2295,12 @@
{
conn2 = cf.createConnection();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("XATest1");
prod.send(m);
m = sessProducer.createTextMessage("XATest2");
prod.send(m);
-
conn = cf.createXAConnection();
conn.start();
@@ -2250,7 +2314,6 @@
MessageConsumer cons = sess.createConsumer(queue1);
-
TextMessage m2 = (TextMessage)cons.receive(MAX_TIMEOUT);
assertNotNull(m2);
@@ -2265,9 +2328,9 @@
tm.rollback();
- //Message should be redelivered
+ // Message should be redelivered
- //New tx
+ // New tx
tm.begin();
tx = tm.getTransaction();
tx.enlistResource(res);
@@ -2308,26 +2371,25 @@
XAConnection conn = null;
Connection conn2 = null;
- //Since both resources have some RM, TM will probably use 1PC optimization
+ // Since both resources have some RM, TM will probably use 1PC optimization
try
{
- //First send 2 messages
+ // First send 2 messages
conn2 = cf.createConnection();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("jellyfish1");
prod.send(m);
m = sessProducer.createTextMessage("jellyfish2");
prod.send(m);
-
conn = cf.createXAConnection();
conn.start();
tm.begin();
- //Create 2 sessions and enlist them
+ // Create 2 sessions and enlist them
XASession sess1 = conn.createXASession();
XAResource res1 = sess1.getXAResource();
XASession sess2 = conn.createXASession();
@@ -2337,7 +2399,7 @@
tx.enlistResource(res1);
tx.enlistResource(res2);
- //Receive the messages, one on each consumer
+ // Receive the messages, one on each consumer
MessageConsumer cons1 = sess1.createConsumer(queue1);
TextMessage r1 = (TextMessage)cons1.receive(MAX_TIMEOUT);
@@ -2355,7 +2417,7 @@
tx.delistResource(res1, XAResource.TMSUCCESS);
tx.delistResource(res2, XAResource.TMSUCCESS);
- //commit
+ // commit
tm.commit();
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -2387,22 +2449,21 @@
try
{
- //First send 2 messages
+ // First send 2 messages
conn2 = cf.createConnection();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("jellyfish1");
prod.send(m);
m = sessProducer.createTextMessage("jellyfish2");
prod.send(m);
-
conn = cf.createXAConnection();
conn.start();
tm.begin();
- //Create 2 sessions and enlist them
+ // Create 2 sessions and enlist them
XASession sess1 = conn.createXASession();
MessagingXAResource res1 = (MessagingXAResource)sess1.getXAResource();
XASession sess2 = conn.createXASession();
@@ -2414,7 +2475,7 @@
tx.enlistResource(res1);
tx.enlistResource(res2);
- //Receive the messages, one on each consumer
+ // Receive the messages, one on each consumer
MessageConsumer cons1 = sess1.createConsumer(queue1);
TextMessage r1 = (TextMessage)cons1.receive(MAX_TIMEOUT);
@@ -2432,7 +2493,7 @@
tx.delistResource(res1, XAResource.TMSUCCESS);
tx.delistResource(res2, XAResource.TMSUCCESS);
- //commit
+ // commit
tm.commit();
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -2457,20 +2518,19 @@
}
-
public void testMultipleSessionsOneTxRollbackAcknowledge1PCOptimization() throws Exception
{
XAConnection conn = null;
Connection conn2 = null;
- //Since both resources have some RM, TM will probably use 1PC optimization
+ // Since both resources have some RM, TM will probably use 1PC optimization
try
{
- //First send 2 messages
+ // First send 2 messages
conn2 = cf.createConnection();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("jellyfish1");
prod.send(m);
m = sessProducer.createTextMessage("jellyfish2");
@@ -2480,13 +2540,12 @@
m = sessProducer.createTextMessage("jellyfish4");
prod.send(m);
-
conn = cf.createXAConnection();
conn.start();
tm.begin();
- //Create 2 sessions and enlist them
+ // Create 2 sessions and enlist them
XASession sess1 = conn.createXASession();
MessagingXAResource res1 = (MessagingXAResource)sess1.getXAResource();
XASession sess2 = conn.createXASession();
@@ -2496,7 +2555,7 @@
tx.enlistResource(res1);
tx.enlistResource(res2);
- //Receive the messages, two on each consumer
+ // Receive the messages, two on each consumer
MessageConsumer cons1 = sess1.createConsumer(queue1);
TextMessage r1 = (TextMessage)cons1.receive(MAX_TIMEOUT);
@@ -2523,18 +2582,18 @@
cons2.close();
- //rollback
+ // rollback
tx.delistResource(res1, XAResource.TMSUCCESS);
tx.delistResource(res2, XAResource.TMSUCCESS);
tm.rollback();
- //Rollback causes cancel which is asynch
+ // Rollback causes cancel which is asynch
Thread.sleep(1000);
- //We cannot assume anything about the order in which the transaction manager rollsback
- //the sessions - this is implementation dependent
+ // We cannot assume anything about the order in which the transaction manager rollsback
+ // the sessions - this is implementation dependent
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer cons = sess.createConsumer(queue1);
@@ -2578,7 +2637,6 @@
assertEquals("jellyfish4", r.getText());
-
}
else
{
@@ -2627,10 +2685,10 @@
try
{
- //First send 2 messages
+ // First send 2 messages
conn2 = cf.createConnection();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("jellyfish1");
prod.send(m);
m = sessProducer.createTextMessage("jellyfish2");
@@ -2640,13 +2698,12 @@
m = sessProducer.createTextMessage("jellyfish4");
prod.send(m);
-
conn = cf.createXAConnection();
conn.start();
tm.begin();
- //Create 2 sessions and enlist them
+ // Create 2 sessions and enlist them
XASession sess1 = conn.createXASession();
MessagingXAResource res1 = (MessagingXAResource)sess1.getXAResource();
XASession sess2 = conn.createXASession();
@@ -2658,7 +2715,7 @@
tx.enlistResource(res1);
tx.enlistResource(res2);
- //Receive the messages, two on each consumer
+ // Receive the messages, two on each consumer
MessageConsumer cons1 = sess1.createConsumer(queue1);
TextMessage r1 = (TextMessage)cons1.receive(MAX_TIMEOUT);
@@ -2672,7 +2729,7 @@
cons1.close();
- //Cancel is asynch
+ // Cancel is asynch
Thread.sleep(500);
MessageConsumer cons2 = sess2.createConsumer(queue1);
@@ -2686,7 +2743,7 @@
assertNotNull(r2);
assertEquals("jellyfish4", r2.getText());
- //rollback
+ // rollback
cons2.close();
@@ -2698,10 +2755,9 @@
// Rollback causes cancel which is asynch
Thread.sleep(1000);
- //We cannot assume anything about the order in which the transaction manager rollsback
- //the sessions - this is implementation dependent
+ // We cannot assume anything about the order in which the transaction manager rollsback
+ // the sessions - this is implementation dependent
-
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer cons = sess.createConsumer(queue1);
conn2.start();
@@ -2744,7 +2800,6 @@
assertEquals("jellyfish4", r.getText());
-
}
else
{
@@ -2791,10 +2846,10 @@
try
{
- //First send 4 messages
+ // First send 4 messages
conn2 = cf.createConnection();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("jellyfish1");
prod.send(m);
@@ -2846,16 +2901,15 @@
cons1.close();
+ // try and commit - and we're going to make the dummyxaresource throw an exception on commit,
+ // which should cause rollback to be called on the other resource
- //try and commit - and we're going to make the dummyxaresource throw an exception on commit,
- //which should cause rollback to be called on the other resource
-
tx.delistResource(res1, XAResource.TMSUCCESS);
tx.delistResource(res2, XAResource.TMSUCCESS);
- //rollback will cause an attemp to deliver messages locally to the original consumers.
- //the original consumer has closed, so it will cancelled to the server
- //the server cancel is asynch, so we need to sleep for a bit to make sure it completes
+ // rollback will cause an attemp to deliver messages locally to the original consumers.
+ // the original consumer has closed, so it will cancelled to the server
+ // the server cancel is asynch, so we need to sleep for a bit to make sure it completes
log.trace("Forcing failure");
try
{
@@ -2864,12 +2918,11 @@
}
catch (Exception e)
{
- //We should expect this
+ // We should expect this
}
Thread.sleep(1000);
-
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer cons = sess.createConsumer(queue1);
conn2.start();
@@ -2918,7 +2971,7 @@
public void testMultipleSessionsOneTxCommitSend1PCOptimization() throws Exception
{
- //Since both resources have some RM, TM will probably use 1PC optimization
+ // Since both resources have some RM, TM will probably use 1PC optimization
XAConnection conn = null;
@@ -2931,7 +2984,7 @@
tm.begin();
- //Create 2 sessions and enlist them
+ // Create 2 sessions and enlist them
XASession sess1 = conn.createXASession();
XAResource res1 = sess1.getXAResource();
XASession sess2 = conn.createXASession();
@@ -2952,10 +3005,10 @@
tx.delistResource(res1, XAResource.TMSUCCESS);
tx.delistResource(res2, XAResource.TMSUCCESS);
- //commit
+ // commit
tm.commit();
- //Messages should be in queue
+ // Messages should be in queue
conn2 = cf.createConnection();
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -2986,7 +3039,7 @@
public void testMultipleSessionsOneTxCommitSend() throws Exception
{
- //Since both resources have some RM, TM will probably use 1PC optimization
+ // Since both resources have some RM, TM will probably use 1PC optimization
XAConnection conn = null;
@@ -3000,7 +3053,7 @@
tm.begin();
- //Create 2 sessions and enlist them
+ // Create 2 sessions and enlist them
XASession sess1 = conn.createXASession();
MessagingXAResource res1 = (MessagingXAResource)sess1.getXAResource();
XASession sess2 = conn.createXASession();
@@ -3023,10 +3076,10 @@
tx.delistResource(res1, XAResource.TMSUCCESS);
tx.delistResource(res2, XAResource.TMSUCCESS);
- //commit
+ // commit
tm.commit();
- //Messages should be in queue
+ // Messages should be in queue
conn2 = cf.createConnection();
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -3057,10 +3110,9 @@
}
-
public void testMultipleSessionsOneTxRollbackSend1PCOptimization() throws Exception
{
- //Since both resources have some RM, TM will probably use 1PC optimization
+ // Since both resources have some RM, TM will probably use 1PC optimization
XAConnection conn = null;
@@ -3073,7 +3125,7 @@
tm.begin();
- //Create 2 sessions and enlist them
+ // Create 2 sessions and enlist them
XASession sess1 = conn.createXASession();
XAResource res1 = sess1.getXAResource();
XASession sess2 = conn.createXASession();
@@ -3094,10 +3146,10 @@
tx.delistResource(res1, XAResource.TMSUCCESS);
tx.delistResource(res2, XAResource.TMSUCCESS);
- //rollback
+ // rollback
tm.rollback();
- //Messages should not be in queue
+ // Messages should not be in queue
conn2 = cf.createConnection();
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -3135,7 +3187,7 @@
tm.begin();
- //Create 2 sessions and enlist them
+ // Create 2 sessions and enlist them
XASession sess1 = conn.createXASession();
MessagingXAResource res1 = (MessagingXAResource)sess1.getXAResource();
XASession sess2 = conn.createXASession();
@@ -3158,10 +3210,10 @@
tx.delistResource(res1, XAResource.TMSUCCESS);
tx.delistResource(res2, XAResource.TMSUCCESS);
- //rollback
+ // rollback
tm.rollback();
- //Messages should not be in queue
+ // Messages should not be in queue
conn2 = cf.createConnection();
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -3184,7 +3236,6 @@
}
}
-
public void testOneSessionTwoTransactionsCommitAcknowledge() throws Exception
{
XAConnection conn = null;
@@ -3193,10 +3244,10 @@
try
{
- //First send 2 messages
+ // First send 2 messages
conn2 = cf.createConnection();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("jellyfish1");
prod.send(m);
m = sessProducer.createTextMessage("jellyfish2");
@@ -3204,7 +3255,7 @@
conn = cf.createXAConnection();
- //Create a session
+ // Create a session
XASession sess1 = conn.createXASession();
XAResource res1 = sess1.getXAResource();
@@ -3216,13 +3267,13 @@
Transaction tx1 = tm.getTransaction();
tx1.enlistResource(res1);
- //Receive one message in one tx
+ // Receive one message in one tx
TextMessage r1 = (TextMessage)cons1.receive(MAX_TIMEOUT);
assertNotNull(r1);
assertEquals("jellyfish1", r1.getText());
- //suspend the tx
+ // suspend the tx
Transaction suspended = tm.suspend();
tm.begin();
@@ -3230,17 +3281,17 @@
Transaction tx2 = tm.getTransaction();
tx2.enlistResource(res1);
- //Receive 2nd message in a different tx
+ // Receive 2nd message in a different tx
TextMessage r2 = (TextMessage)cons1.receive(MAX_TIMEOUT);
assertNotNull(r2);
assertEquals("jellyfish2", r2.getText());
tx2.delistResource(res1, XAResource.TMSUCCESS);
- //commit this transaction
+ // commit this transaction
tm.commit();
- //verify that no messages are available
+ // verify that no messages are available
conn2.close();
conn2 = cf.createConnection();
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -3249,7 +3300,7 @@
TextMessage r3 = (TextMessage)cons.receive(MIN_TIMEOUT);
assertNull(r3);
- //now resume the first tx and then commit it
+ // now resume the first tx and then commit it
tm.resume(suspended);
tx1.delistResource(res1, XAResource.TMSUCCESS);
@@ -3269,7 +3320,6 @@
}
}
-
public void testOneSessionTwoTransactionsRollbackAcknowledge() throws Exception
{
XAConnection conn = null;
@@ -3278,10 +3328,10 @@
try
{
- //First send 2 messages
+ // First send 2 messages
conn2 = cf.createConnection();
Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sessProducer.createProducer(queue1);
+ MessageProducer prod = sessProducer.createProducer(queue1);
Message m = sessProducer.createTextMessage("jellyfish1");
prod.send(m);
m = sessProducer.createTextMessage("jellyfish2");
@@ -3289,7 +3339,7 @@
conn = cf.createXAConnection();
- //Create a session
+ // Create a session
XASession sess1 = conn.createXASession();
XAResource res1 = sess1.getXAResource();
@@ -3301,13 +3351,13 @@
Transaction tx1 = tm.getTransaction();
tx1.enlistResource(res1);
- //Receive one message in one tx
+ // Receive one message in one tx
TextMessage r1 = (TextMessage)cons1.receive(MAX_TIMEOUT);
assertNotNull(r1);
assertEquals("jellyfish1", r1.getText());
- //suspend the tx
+ // suspend the tx
Transaction suspended = tm.suspend();
tm.begin();
@@ -3315,7 +3365,7 @@
Transaction tx2 = tm.getTransaction();
tx2.enlistResource(res1);
- //Receive 2nd message in a different tx
+ // Receive 2nd message in a different tx
TextMessage r2 = (TextMessage)cons1.receive(MAX_TIMEOUT);
assertNotNull(r2);
assertEquals("jellyfish2", r2.getText());
@@ -3324,10 +3374,10 @@
tx1.delistResource(res1, XAResource.TMSUCCESS);
- //rollback this transaction
+ // rollback this transaction
tm.rollback();
- //verify that second message is available
+ // verify that second message is available
conn2.close();
conn2 = cf.createConnection();
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -3341,12 +3391,11 @@
r3 = (TextMessage)cons.receive(MIN_TIMEOUT);
assertNull(r3);
-
- //rollback the other tx
+ // rollback the other tx
tm.resume(suspended);
tm.rollback();
- //Verify the first message is now available
+ // Verify the first message is now available
r3 = (TextMessage)cons.receive(MAX_TIMEOUT);
assertNotNull(r3);
assertEquals("jellyfish1", r3.getText());
@@ -3369,7 +3418,6 @@
}
-
public void testOneSessionTwoTransactionsCommitSend() throws Exception
{
XAConnection conn = null;
@@ -3380,7 +3428,7 @@
{
conn = cf.createXAConnection();
- //Create a session
+ // Create a session
XASession sess1 = conn.createXASession();
XAResource res1 = sess1.getXAResource();
@@ -3391,27 +3439,27 @@
Transaction tx1 = tm.getTransaction();
tx1.enlistResource(res1);
- //Send a message
+ // Send a message
prod1.send(sess1.createTextMessage("kangaroo1"));
- //suspend the tx
+ // suspend the tx
Transaction suspended = tm.suspend();
tm.begin();
- //Send another message in another tx using the same session
+ // Send another message in another tx using the same session
Transaction tx2 = tm.getTransaction();
tx2.enlistResource(res1);
- //Send a message
+ // Send a message
prod1.send(sess1.createTextMessage("kangaroo2"));
tx2.delistResource(res1, XAResource.TMSUCCESS);
- //commit this transaction
+ // commit this transaction
tm.commit();
- //verify only kangaroo2 message is sent
+ // verify only kangaroo2 message is sent
conn2 = cf.createConnection();
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
conn2.start();
@@ -3422,14 +3470,14 @@
TextMessage r2 = (TextMessage)cons.receive(MIN_TIMEOUT);
assertNull(r2);
- //now resume the first tx and then commit it
+ // now resume the first tx and then commit it
tm.resume(suspended);
tx1.delistResource(res1, XAResource.TMSUCCESS);
tm.commit();
- //verify that the first text message is received
+ // verify that the first text message is received
TextMessage r3 = (TextMessage)cons.receive(MAX_TIMEOUT);
assertNotNull(r3);
assertEquals("kangaroo1", r3.getText());
@@ -3450,7 +3498,6 @@
}
-
public void testOneSessionTwoTransactionsRollbackSend() throws Exception
{
XAConnection conn = null;
@@ -3462,7 +3509,7 @@
conn = cf.createXAConnection();
- //Create a session
+ // Create a session
XASession sess1 = conn.createXASession();
XAResource res1 = sess1.getXAResource();
@@ -3473,27 +3520,27 @@
Transaction tx1 = tm.getTransaction();
tx1.enlistResource(res1);
- //Send a message
+ // Send a message
prod1.send(sess1.createTextMessage("kangaroo1"));
- //suspend the tx
+ // suspend the tx
Transaction suspended = tm.suspend();
tm.begin();
- //Send another message in another tx using the same session
+ // Send another message in another tx using the same session
Transaction tx2 = tm.getTransaction();
tx2.enlistResource(res1);
- //Send a message
+ // Send a message
prod1.send(sess1.createTextMessage("kangaroo2"));
tx2.delistResource(res1, XAResource.TMSUCCESS);
- //rollback this transaction
+ // rollback this transaction
tm.rollback();
- //verify no messages are sent
+ // verify no messages are sent
conn2 = cf.createConnection();
Session sess = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
conn2.start();
@@ -3502,15 +3549,14 @@
assertNull(r1);
-
- //now resume the first tx and then commit it
+ // now resume the first tx and then commit it
tm.resume(suspended);
tx1.delistResource(res1, XAResource.TMSUCCESS);
tm.commit();
- //verify that the first text message is received
+ // verify that the first text message is received
TextMessage r3 = (TextMessage)cons.receive(MAX_TIMEOUT);
assertNotNull(r3);
assertEquals("kangaroo1", r3.getText());
@@ -3537,7 +3583,7 @@
// Private -------------------------------------------------------
- private void assertEqualByteArrays(byte[] b1, byte[] b2)
+ private void assertEqualByteArrays(final byte[] b1, final byte[] b2)
{
log.info("b1 length: " + b1.length + " b2 length " + b2.length);
@@ -3557,7 +3603,6 @@
// Inner classes -------------------------------------------------
-
static class DummyListener implements MessageListener
{
@@ -3565,7 +3610,7 @@
public ArrayList messages = new ArrayList();
- public void onMessage(Message message)
+ public void onMessage(final Message message)
{
log.info("Message received on DummyListener " + message);
messages.add(message);
@@ -3574,9 +3619,9 @@
static class MockServerSessionPool implements ServerSessionPool
{
- private ServerSession serverSession;
+ private final ServerSession serverSession;
- MockServerSessionPool(Session sess)
+ MockServerSessionPool(final Session sess)
{
serverSession = new MockServerSession(sess);
}
@@ -3591,12 +3636,11 @@
{
Session session;
- MockServerSession(Session sess)
+ MockServerSession(final Session sess)
{
- this.session = sess;
+ session = sess;
}
-
public Session getSession() throws JMSException
{
return session;
@@ -3609,8 +3653,6 @@
}
-
-
static class DummyXAResource implements XAResource
{
boolean failOnPrepare;
@@ -3619,34 +3661,34 @@
{
}
- DummyXAResource(boolean failOnPrepare)
+ DummyXAResource(final boolean failOnPrepare)
{
this.failOnPrepare = failOnPrepare;
}
- public void commit(Xid arg0, boolean arg1) throws XAException
+ public void commit(final Xid arg0, final boolean arg1) throws XAException
{
}
- public void end(Xid arg0, int arg1) throws XAException
+ public void end(final Xid arg0, final int arg1) throws XAException
{
}
- public void forget(Xid arg0) throws XAException
+ public void forget(final Xid arg0) throws XAException
{
}
public int getTransactionTimeout() throws XAException
{
- return 0;
+ return 0;
}
- public boolean isSameRM(XAResource arg0) throws XAException
+ public boolean isSameRM(final XAResource arg0) throws XAException
{
return false;
}
- public int prepare(Xid arg0) throws XAException
+ public int prepare(final Xid arg0) throws XAException
{
if (failOnPrepare)
{
@@ -3655,21 +3697,21 @@
return XAResource.XA_OK;
}
- public Xid[] recover(int arg0) throws XAException
+ public Xid[] recover(final int arg0) throws XAException
{
return null;
}
- public void rollback(Xid arg0) throws XAException
+ public void rollback(final Xid arg0) throws XAException
{
}
- public boolean setTransactionTimeout(int arg0) throws XAException
+ public boolean setTransactionTimeout(final int arg0) throws XAException
{
return false;
}
- public void start(Xid arg0, int arg1) throws XAException
+ public void start(final Xid arg0, final int arg1) throws XAException
{
}
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeMBeanTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeMBeanTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeMBeanTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -35,6 +35,7 @@
import javax.naming.InitialContext;
import org.jboss.jms.server.bridge.Bridge;
+import org.jboss.jms.server.bridge.BridgeService;
import org.jboss.logging.Logger;
import org.jboss.test.messaging.tools.ServerManagement;
@@ -89,6 +90,83 @@
super.tearDown();
}
+ //destination not available when startup
+ //https://jira.jboss.org/jira/browse/JBMESSAGING-999
+ public void testDestinationNotAvailableWhenBridgeStartup() throws Exception
+ {
+ ObjectName on = null;
+
+ try
+ {
+ //crash the dest server first
+
+ log.info("About to crash server");
+
+ ServerManagement.kill(1);
+
+ on = deployBridge(0, "Bridge3", sourceProviderLoader, targetProviderLoader,
+ "/queue/sourceQueue", "/queue/targetQueue",
+ null, null, null, null,
+ Bridge.QOS_AT_MOST_ONCE, null, 1,
+ -1, null, null, 5000, -1, false);
+ log.info("Deployed bridge");
+
+ ServerManagement.getServer(0).invoke(on, "create", new Object[0], new String[0]);
+
+ log.info("Created bridge");
+
+ log.info("Starting bridge");
+ ServerManagement.getServer(0).invoke(on, "start", new Object[0], new String[0]);
+ log.info("Started bridge");
+
+
+ //Wait a while before starting up to simulate the dest being down for a while
+ log.info("Waiting 3 secs before bringing server back up");
+ Thread.sleep(3000);
+ log.info("Done wait");
+ //Restart the server
+
+ log.info("Restarting server");
+
+ ServerManagement.start(1, "all", false);
+
+ ServerManagement.deployQueue("targetQueue", 1);
+
+ setUpAdministeredObjects();
+
+ //Wait a while before starting up to simulate the dest being down for a while
+ log.info("Waiting 5 secs before bringing server back up");
+ Thread.sleep(5000);
+ log.info("Done wait");
+
+ final int NUM_MESSAGES = 10;
+
+ //Send some messages
+
+ sendMessages(cf0, sourceQueue, 0, NUM_MESSAGES, true);
+
+ log.info("Sent messages");
+
+ checkMessagesReceived(cf1, targetQueue, Bridge.QOS_ONCE_AND_ONLY_ONCE, NUM_MESSAGES, false);
+ }
+ finally
+ {
+ try
+ {
+ if (on != null)
+ {
+ ServerManagement.getServer(0).invoke(on, "stop", new Object[0], new String[0]);
+ ServerManagement.getServer(0).invoke(on, "destroy", new Object[0], new String[0]);
+ }
+ }
+ catch(Exception e)
+ {
+ //Ignore
+ }
+ }
+
+ }
+
public void testStopStartPauseResume() throws Exception
{
Connection connSource = null;
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -366,17 +366,18 @@
try
{
- bridge= new Bridge(null, cff1, sourceQueueFactory, targetQueueFactory,
- sourceUsername, sourcePassword, destUsername, destPassword,
- selector, failureRetryInterval, maxRetries, qosMode,
- batchSize, maxBatchTime,
- subName, clientID, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ sourceUsername, sourcePassword, destUsername, destPassword,
+ selector, failureRetryInterval, maxRetries, qosMode,
+ batchSize, maxBatchTime, subName, clientID, false);
}
catch (IllegalArgumentException e)
{
//Ok
}
-
+
+/*
try
{
bridge= new Bridge(cff0, null, sourceQueueFactory, targetQueueFactory,
@@ -389,7 +390,7 @@
{
//Ok
}
-
+
try
{
bridge= new Bridge(cff0, cff1, null, targetQueueFactory,
@@ -415,14 +416,14 @@
{
//Ok
}
-
+*/
try
{
- bridge= new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- sourceUsername, sourcePassword, destUsername, destPassword,
- selector, -2, maxRetries, qosMode,
- batchSize, maxBatchTime,
- subName, clientID, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ sourceUsername, sourcePassword, destUsername, destPassword,
+ selector, -2, maxRetries, qosMode,
+ batchSize, maxBatchTime, subName, clientID, false);
}
catch (IllegalArgumentException e)
{
@@ -431,24 +432,25 @@
try
{
- bridge= new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- sourceUsername, sourcePassword, destUsername, destPassword,
- selector, -1, 10, qosMode,
- batchSize, maxBatchTime,
- subName, clientID, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ sourceUsername, sourcePassword, destUsername, destPassword,
+ selector, -1, 10, qosMode,
+ batchSize, maxBatchTime, subName, clientID, false);
}
catch (IllegalArgumentException e)
{
//Ok
}
-
+
+
try
{
- bridge= new Bridge(cff0, cff1, sourceQueueFactory, null,
- sourceUsername, sourcePassword, destUsername, destPassword,
- selector, failureRetryInterval, maxRetries, -2,
- batchSize, maxBatchTime,
- subName, clientID, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ sourceUsername, sourcePassword, destUsername, destPassword,
+ selector, failureRetryInterval, maxRetries, -2,
+ batchSize, maxBatchTime, subName, clientID, false);
}
catch (IllegalArgumentException e)
{
@@ -457,11 +459,11 @@
try
{
- bridge= new Bridge(cff0, cff1, sourceQueueFactory, null,
- sourceUsername, sourcePassword, destUsername, destPassword,
- selector, failureRetryInterval, maxRetries, 3,
- batchSize, maxBatchTime,
- subName, clientID, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ sourceUsername, sourcePassword, destUsername, destPassword,
+ selector, failureRetryInterval, maxRetries, 3,
+ batchSize, maxBatchTime, subName, clientID, false);
}
catch (IllegalArgumentException e)
{
@@ -470,11 +472,11 @@
try
{
- bridge= new Bridge(cff0, cff1, sourceQueueFactory, null,
- sourceUsername, sourcePassword, destUsername, destPassword,
- selector, failureRetryInterval, maxRetries, 3,
- 0, maxBatchTime,
- subName, clientID, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ sourceUsername, sourcePassword, destUsername, destPassword,
+ selector, failureRetryInterval, maxRetries, 3,
+ 0, maxBatchTime, subName, clientID, false);
}
catch (IllegalArgumentException e)
{
@@ -483,11 +485,11 @@
try
{
- bridge= new Bridge(cff0, cff1, sourceQueueFactory, null,
- sourceUsername, sourcePassword, destUsername, destPassword,
- selector, failureRetryInterval, maxRetries, 3,
- batchSize, -2,
- subName, clientID, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ sourceUsername, sourcePassword, destUsername, destPassword,
+ selector, failureRetryInterval, maxRetries, 3,
+ batchSize, -2, subName, clientID, false);
}
catch (IllegalArgumentException e)
{
@@ -517,11 +519,11 @@
String selector = "vegetable='radish'";
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- selector, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
- 1, -1,
- null, null, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ selector, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
+ 1, -1, null, null, false);
bridge.start();
@@ -611,11 +613,11 @@
final int NUM_MESSAGES = 10;
- bridge = new Bridge(cff0, cff1, sourceTopicFactory, targetQueueFactory,
- null, null, null, null,
- null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
- 1, -1,
- null, null, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/topic/sourceTopic", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
+ 1, -1, null, null, false);
bridge.start();
@@ -663,11 +665,11 @@
{
final int NUM_MESSAGES = 10;
- bridge = new Bridge(cff0, cff1, sourceTopicFactory, targetQueueFactory,
- null, null, null, null,
- null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
- 1, -1,
- null, null, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/topic/sourceTopic", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
+ 1, -1, null, null, false);
bridge.start();
@@ -692,11 +694,11 @@
{
final int NUM_MESSAGES = 10;
- bridge = new Bridge(cff0, cff1, sourceTopicFactory, targetQueueFactory,
- null, null, null, null,
- null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
- 1, -1,
- "subTest", "clientid123", false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/topic/sourceTopic", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
+ 1, -1, "subTest", "clientid123", false);
bridge.start();
@@ -742,11 +744,11 @@
{
final int NUM_MESSAGES = 10;
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
- 1, -1,
- null, null, on);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
+ 1, -1, null, null, on);
bridge.start();
@@ -913,11 +915,11 @@
{
final int NUM_MESSAGES = 10;
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
- 1, -1,
- null, null, messageIDInHeader);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
+ 1, -1, null, null, messageIDInHeader);
bridge.start();
@@ -1074,11 +1076,11 @@
{
final int NUM_MESSAGES = 10;
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
- 1, -1,
- null, null, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, Bridge.QOS_AT_MOST_ONCE,
+ 1, -1, null, null, false);
bridge.start();
@@ -1161,12 +1163,13 @@
try
{
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 5000, 10, qosMode,
- batchSize, -1,
- null, null, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, qosMode,
+ batchSize, -1, null, null, false);
+
bridge.start();
connSource = cf0.createConnection();
@@ -1234,11 +1237,11 @@
try
{
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 5000, 10, qosMode,
- 2, maxBatchTime,
- null, null, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, qosMode,
+ 2, maxBatchTime, null, null, false);
bridge.start();
@@ -1308,11 +1311,11 @@
try
{
- bridge = new Bridge(cff0, cff0, sourceQueueFactory, localTargetQueueFactory,
- null, null, null, null,
- null, 5000, 10, qosMode,
- batchSize, -1,
- null, null, false);
+ bridge = new Bridge(true, sourceProps, sourceProps, "/queue/sourceQueue", "/queue/localTargetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, qosMode,
+ batchSize, -1, null, null, false);
bridge.start();
@@ -1380,11 +1383,11 @@
{
final int NUM_MESSAGES = 10;
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 5000, 10, qosMode,
- NUM_MESSAGES, -1,
- null, null, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, qosMode,
+ NUM_MESSAGES, -1, null, null, false);
bridge.start();
@@ -1438,11 +1441,11 @@
{
final int NUM_MESSAGES = 10;
- bridge = new Bridge(cff0, cff0, sourceQueueFactory, localTargetQueueFactory,
- null, null, null, null,
- null, 5000, 10, qosMode,
- NUM_MESSAGES, -1,
- null, null, false);
+ bridge = new Bridge(true, sourceProps, sourceProps, "/queue/sourceQueue", "/queue/localTargetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 5000, 10, qosMode,
+ NUM_MESSAGES, -1, null, null, false);
bridge.start();
@@ -1498,11 +1501,11 @@
final int MAX_BATCH_SIZE = 100000; // something big so it won't reach it
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 3000, 10, qosMode,
- MAX_BATCH_SIZE, MAX_BATCH_TIME,
- null, null, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 3000, 10, qosMode,
+ MAX_BATCH_SIZE, MAX_BATCH_TIME, null, null, false);
bridge.start();
@@ -1539,11 +1542,11 @@
final int MAX_BATCH_SIZE = 100000; // something big so it won't reach it
- bridge = new Bridge(cff0, cff0, sourceQueueFactory, localTargetQueueFactory,
- null, null, null, null,
- null, 3000, 10, qosMode,
- MAX_BATCH_SIZE, MAX_BATCH_TIME,
- null, null, false);
+ bridge = new Bridge(true, sourceProps, sourceProps, "/queue/sourceQueue", "/queue/localTargetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 3000, 10, qosMode,
+ MAX_BATCH_SIZE, MAX_BATCH_TIME, null, null, false);
bridge.start();
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTestBase.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTestBase.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/BridgeTestBase.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -21,8 +21,10 @@
*/
package org.jboss.test.messaging.jms.bridge;
+import java.util.Enumeration;
import java.util.HashSet;
import java.util.Hashtable;
+import java.util.Properties;
import java.util.Set;
import javax.jms.Connection;
@@ -52,6 +54,7 @@
* A BridgeTestBase
*
* @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:hgao at redhat.com">Howard Gao</a>
* @version <tt>$Revision: 1.1 $</tt>
*
* $Id$
@@ -75,6 +78,10 @@
protected static boolean firstTime = true;
+ protected static Properties sourceProps;
+
+ protected static Properties targetProps;
+
public BridgeTestBase(String name)
{
super(name);
@@ -135,7 +142,22 @@
{
Hashtable props0 = ServerManagement.getJNDIEnvironment(0);
+ sourceProps = new Properties();
+ Enumeration keys = props0.keys();
+ while (keys.hasMoreElements())
+ {
+ Object key = keys.nextElement();
+ sourceProps.put(key, props0.get(key));
+ }
+
Hashtable props1 = ServerManagement.getJNDIEnvironment(1);
+ targetProps = new Properties();
+ keys = props1.keys();
+ while (keys.hasMoreElements())
+ {
+ Object key = keys.nextElement();
+ targetProps.put(key, props1.get(key));
+ }
cff0 = new JNDIConnectionFactoryFactory(props0, "/ConnectionFactory");
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/ReconnectTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/ReconnectTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/ReconnectTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -22,6 +22,7 @@
package org.jboss.test.messaging.jms.bridge;
import org.jboss.jms.server.bridge.Bridge;
+import org.jboss.jms.server.bridge.BridgeService;
import org.jboss.logging.Logger;
import org.jboss.test.messaging.tools.ServerManagement;
@@ -43,6 +44,69 @@
// Crash and reconnect
+ //destination not available when startup
+ //https://jira.jboss.org/jira/browse/JBMESSAGING-999
+ public void testDestinationNotAvailableWhenBridgeStartup() throws Exception
+ {
+ Bridge bridge = null;
+
+ try
+ {
+ //crash the dest server first
+
+ log.info("About to crash server");
+
+ ServerManagement.kill(1);
+
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory", null, null, null, null,
+ null, 1000, -1, Bridge.QOS_ONCE_AND_ONLY_ONCE, 10, -1, null, null, false);
+
+ bridge.start();
+
+ //Restart the server
+
+ log.info("Restarting server");
+
+ ServerManagement.start(1, "all", false);
+
+ ServerManagement.deployQueue("targetQueue", 1);
+
+ setUpAdministeredObjects();
+
+ //Wait a while before starting up to simulate the dest being down for a while
+ log.info("Waiting 5 secs before bringing server back up");
+ Thread.sleep(5000);
+ log.info("Done wait");
+
+ final int NUM_MESSAGES = 10;
+
+ //Send some messages
+
+ sendMessages(cf0, sourceQueue, 0, NUM_MESSAGES, true);
+
+ log.info("Sent messages");
+
+ checkMessagesReceived(cf1, targetQueue, Bridge.QOS_ONCE_AND_ONLY_ONCE, NUM_MESSAGES, false);
+ }
+ finally
+ {
+
+ if (bridge != null)
+ {
+ try
+ {
+ bridge.stop();
+ }
+ catch (Exception e)
+ {
+ log.error("Failed to stop bridge", e);
+ }
+ }
+ }
+
+ }
+
// Once and only once
public void testCrashAndReconnectDestBasic_OnceAndOnlyOnce_P() throws Exception
@@ -97,12 +161,11 @@
{
ServerManagement.kill(1);
- Bridge bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 1000, -1, Bridge.QOS_DUPLICATES_OK,
- 10, -1,
- null, null, false);
+ Bridge bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory", null, null, null, null,
+ null, 1000, -1, Bridge.QOS_DUPLICATES_OK, 10, -1, null, null, false);
+
try
{
bridge.start();
@@ -144,11 +207,10 @@
try
{
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 1000, -1, qosMode,
- 10, -1,
- null, null, false);
+
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory", null, null, null, null,
+ null, 1000, -1, qosMode, 10, -1, null, null, false);
bridge.start();
@@ -224,11 +286,10 @@
try
{
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 1000, -1, Bridge.QOS_ONCE_AND_ONLY_ONCE,
- 10, 5000,
- null, null, false);
+
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory", null, null, null, null,
+ null, 1000, -1, Bridge.QOS_ONCE_AND_ONLY_ONCE, 10, 5000, null, null, false);
bridge.start();
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/ReconnectWithRecoveryTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/ReconnectWithRecoveryTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/ReconnectWithRecoveryTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -89,11 +89,11 @@
{
final int NUM_MESSAGES = 10;
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 1000, -1, Bridge.QOS_ONCE_AND_ONLY_ONCE,
- NUM_MESSAGES, -1,
- null, null, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 1000, -1, Bridge.QOS_ONCE_AND_ONLY_ONCE,
+ NUM_MESSAGES, -1, null, null, false);
bridge.start();
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/SimpleCrashWithRestartTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/SimpleCrashWithRestartTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/bridge/SimpleCrashWithRestartTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -89,11 +89,11 @@
{
final int NUM_MESSAGES = 10;
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 1000, -1, Bridge.QOS_AT_MOST_ONCE,
- NUM_MESSAGES, -1,
- null, null, false);
+ bridge = new Bridge(false, sourceProps, targetProps, "/queue/sourceQueue", "/queue/targetQueue",
+ "/ConnectionFactory", "/ConnectionFactory",
+ null, null, null, null,
+ null, 1000, -1, Bridge.QOS_AT_MOST_ONCE,
+ NUM_MESSAGES, -1, null, null, false);
bridge.start();
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/clustering/ClusterViewUpdateTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/clustering/ClusterViewUpdateTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/clustering/ClusterViewUpdateTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -34,6 +34,7 @@
/**
* @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ * @author <a href="mailto:hgao at redhat.com">Howard Gao</a>
* @version <tt>$Revision$</tt>
*
* $Id$
@@ -76,7 +77,11 @@
// Kill the same node as the CF is connected to
ServerManagement.kill(1);
- Thread.sleep(5000);
+
+ // the sleep time has to be longer than the sum of validatorPingPeriod and validatorPingTimeout.
+ // see remoting-bisocket-service.xml
+ Thread.sleep(20000);
+
assertEquals(1, clusterDelegate.getDelegates().length);
TopologyResult topology = clusterDelegate.getTopology();
assertEquals(1, topology.getDelegates().length);
@@ -188,7 +193,7 @@
ServerManagement.kill(1);
- Thread.sleep(5000);
+ Thread.sleep(20000);
Connection conn = createConnectionOnServer(cf, 0);
try
@@ -308,8 +313,8 @@
ServerManagement.kill(1);
- log.info("sleeping 5 secs ...");
- Thread.sleep(5000);
+ log.info("sleeping 20 secs ...");
+ Thread.sleep(20000);
// first part of the test, verifies if the CF was updated
assertEquals(1, cfDelegate.getDelegates().length);
@@ -353,15 +358,15 @@
ServerManagement.kill(1);
- log.info("sleeping 5 secs ...");
- Thread.sleep(5000);
+ log.info("sleeping 20 secs ...");
+ Thread.sleep(20000);
// first part of the test, verifies if the CF was updated
assertEquals(1, cfDelegate.getDelegates().length);
conn.close();
log.info("sleeping 5 secs ...");
- Thread.sleep(5000);
+ Thread.sleep(20000);
// Second part, verifies a possible race condition on failoverMap and handleFilover
assertEquals(0, getServerId(conn1));
@@ -369,7 +374,7 @@
//restart
ServerManagement.start(1, "all", false);
- Thread.sleep(5000);
+ Thread.sleep(12000);
assertEquals(2, cfDelegate.getDelegates().length);
@@ -461,7 +466,7 @@
ServerManagement.kill(1);
- Thread.sleep(5000);
+ Thread.sleep(20000);
// This will force Failover from Valve to kick in
conn1.createSession(true, Session.SESSION_TRANSACTED);
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -16,10 +16,12 @@
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
+import javax.jms.Queue;
import javax.jms.QueueBrowser;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.management.ObjectName;
+import javax.naming.InitialContext;
import org.jboss.jms.client.FailoverEvent;
import org.jboss.jms.client.JBossConnection;
@@ -2050,6 +2052,157 @@
}
}
+ /**
+ * deploy a distributed queue on only one node and then perform failover
+ * The failover for other nodes should not be affected.
+ * https://jira.jboss.org/jira/browse/JBMESSAGING-1457
+ */
+ public void testFailoverWithSingleDistributedTargetNoMessage() throws Exception
+ {
+ Connection conn = null;
+
+ try
+ {
+ ServerManagement.deployQueue("singleDeployedDistributedQueue", 1);
+
+ conn = createConnectionOnServer(cf, 1);
+
+ Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageProducer prod = session.createProducer(queue[1]);
+
+ Message m = session.createTextMessage("blimey");
+ prod.send(m);
+
+ // register a failover listener
+ SimpleFailoverListener failoverListener = new SimpleFailoverListener();
+ ((JBossConnection)conn).registerFailoverListener(failoverListener);
+
+ ServerManagement.kill(1);
+
+ // wait for the client-side failover to complete
+
+ while(true)
+ {
+ FailoverEvent event = failoverListener.getEvent(30000);
+ if (event != null && FailoverEvent.FAILOVER_COMPLETED == event.getType())
+ {
+ break;
+ }
+ if (event == null)
+ {
+ fail("Did not get expected FAILOVER_COMPLETED event");
+ }
+ }
+
+ MessageConsumer cons = session.createConsumer(queue[1]);
+
+ // failover complete
+ assertEquals(0, getServerId(conn));
+
+ conn.start();
+
+ TextMessage rm = (TextMessage)cons.receive(2000);
+ assertNotNull(rm);
+ assertEquals("blimey", rm.getText());
+
+ }
+ finally
+ {
+ if (conn != null)
+ {
+ conn.close();
+ }
+ }
+ }
+
+ /**
+ * deploy a distributed queue on only one node and send some messages, then perform failover
+ * The failover for other nodes should not be affected.
+ * https://jira.jboss.org/jira/browse/JBMESSAGING-1457
+ */
+ public void testFailoverWithSingleDistributedTargetWithMessage() throws Exception
+ {
+ Connection conn = null;
+ Connection conn1 = null;
+
+ try
+ {
+ ServerManagement.deployQueue("singleDeployedDistributedQueue", 1);
+ Queue lameClusteredQueue = (Queue)ic[1].lookup("queue/singleDeployedDistributedQueue");
+
+ conn = createConnectionOnServer(cf, 1);
+
+ Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageProducer prod = session.createProducer(queue[1]);
+ MessageProducer prod1 = session.createProducer(lameClusteredQueue);
+
+ Message m = session.createTextMessage("blimey");
+ prod.send(m);
+ Message m1 = session.createTextMessage("message-to-lose");
+ prod1.send(m1);
+
+ // register a failover listener
+ SimpleFailoverListener failoverListener = new SimpleFailoverListener();
+ ((JBossConnection)conn).registerFailoverListener(failoverListener);
+
+ ServerManagement.kill(1);
+
+ // wait for the client-side failover to complete
+
+ while(true)
+ {
+ FailoverEvent event = failoverListener.getEvent(30000);
+ if (event != null && FailoverEvent.FAILOVER_COMPLETED == event.getType())
+ {
+ break;
+ }
+ if (event == null)
+ {
+ fail("Did not get expected FAILOVER_COMPLETED event");
+ }
+ }
+
+ MessageConsumer cons = session.createConsumer(queue[1]);
+
+ // failover complete
+ assertEquals(0, getServerId(conn));
+
+ conn.start();
+
+ TextMessage rm = (TextMessage)cons.receive(2000);
+ assertNotNull(rm);
+ assertEquals("blimey", rm.getText());
+
+ //simulate restarting node 1, do not clean db
+ ServerManagement.start(1, config, overrides, false);
+ ServerManagement.deployQueue("singleDeployedDistributedQueue", 1);
+ conn1 = createConnectionOnServer(cf, 1);
+ ic[1] = new InitialContext(ServerManagement.getJNDIEnvironment(1));
+
+ lameClusteredQueue = (Queue)ic[1].lookup("queue/singleDeployedDistributedQueue");
+
+ Session session1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ conn1.start();
+
+ MessageConsumer cons1 = session1.createConsumer(lameClusteredQueue);
+ TextMessage rm1 = (TextMessage)cons1.receive(2000);
+ assertNotNull(rm1);
+ assertEquals("message-to-lose", rm1.getText());
+
+ }
+ finally
+ {
+ if (conn != null)
+ {
+ conn.close();
+ }
+ if (conn1 != null)
+ {
+ conn1.close();
+ }
+ }
+ }
+
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
Modified: branches/Branch_1416_merge/tests/src/org/jboss/test/thirdparty/remoting/ClientInvokerTimeoutTest.java
===================================================================
--- branches/Branch_1416_merge/tests/src/org/jboss/test/thirdparty/remoting/ClientInvokerTimeoutTest.java 2009-02-02 10:42:54 UTC (rev 5773)
+++ branches/Branch_1416_merge/tests/src/org/jboss/test/thirdparty/remoting/ClientInvokerTimeoutTest.java 2009-02-02 11:06:59 UTC (rev 5774)
@@ -6,6 +6,9 @@
*/
package org.jboss.test.thirdparty.remoting;
+import java.util.HashMap;
+import java.util.Map;
+
import org.jboss.logging.Logger;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
@@ -167,7 +170,46 @@
}
}
}
+
+
+ public void testClientConfigurationOverride() throws Throwable
+ {
+ if (!"bisocket".equals(ServerManagement.getRemotingTransport(0)))
+ {
+ return;
+ }
+
+ Client client = null;
+
+ try
+ {
+ client = new Client(serverLocator, RemotingTestSubsystemService.SUBSYSTEM_LABEL);
+
+ client.connect();
+
+ SimpleConnectionListener connListener = new SimpleConnectionListener();
+
+ Map<String, String> metadata = new HashMap<String, String>();
+
+ metadata.put("validatorPingPeriod", "13000");
+
+ client.addConnectionListener(connListener, metadata);
+
+ long pingPerod = client.getPingPeriod();
+
+ assertEquals(13000, pingPerod);
+
+ }
+ finally
+ {
+ if (client != null)
+ {
+ client.disconnect();
+ }
+ }
+ }
+
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
More information about the jboss-cvs-commits
mailing list