From 05bc25cb8750ae9e116a8b3d95d0b6060e7909b5 Mon Sep 17 00:00:00 2001 From: gtully Date: Thu, 10 Oct 2013 12:09:47 +0100 Subject: [PATCH] revert addition on forked hornetq javeee examples - some of the nested driver files have the LGPL license --- NOTICE | 4 - activemq-arquillian/ee-install/pom.xml | 166 ------ activemq-arquillian/javaee/jca-config/pom.xml | 64 --- .../server/hornetq-configuration.xml | 54 -- .../javaee/jca-config/server/hornetq-jms.xml | 20 - .../application-roles.properties | 22 - .../application-users.properties | 24 - .../configuration/logging.properties | 54 -- .../configuration/mgmt-users.properties | 24 - .../configuration/standalone-example.xml | 445 ---------------- .../configuration/standalone-example2.xml | 455 ----------------- .../example/MDBRemoteClientExample.java | 74 --- .../javaee/example/server/MDBQueueA.java | 52 -- .../javaee/example/server2/MDBQueueB.java | 55 -- .../example/server2/StatelessSender.java | 90 ---- .../server2/StatelessSenderService.java | 29 -- .../example/server/ExampleRunner2Test.java | 128 ----- .../src/test/resources/arquillian.xml | 55 -- activemq-arquillian/javaee/jca-remote/pom.xml | 77 --- .../application-roles.properties | 22 - .../application-users.properties | 24 - .../configuration/logging.properties | 52 -- .../configuration/mgmt-users.properties | 24 - .../configuration/standalone-example.xml | 459 ----------------- .../configuration/standalone-live.xml | 479 ------------------ .../example/MDBRemoteServerClientExample.java | 106 ---- .../javaee/example/server/MDBQueue.java | 90 ---- .../javaee/examples/JCARemoteRunnerTest.java | 128 ----- .../src/test/resources/arquillian.xml | 55 -- activemq-arquillian/javaee/mdb-bmt/pom.xml | 14 - .../application-roles.properties | 22 - .../application-users.properties | 24 - .../configuration/logging.properties | 52 -- .../configuration/mgmt-users.properties | 24 - .../configuration/standalone-example.xml | 445 ---------------- .../javaee/example/MDB_BMTClientExample.java | 86 ---- .../javaee/example/server/MDB_BMTExample.java | 71 --- .../example/server/ExampleRunnerTest.java | 75 --- .../mdb-bmt/src/test/resources/arquillian.xml | 43 -- .../javaee/mdb-cmt-setrollbackonly/pom.xml | 14 - .../application-roles.properties | 22 - .../application-users.properties | 24 - .../configuration/logging.properties | 52 -- .../configuration/mgmt-users.properties | 24 - .../configuration/standalone-example.xml | 445 ---------------- .../MDB_CMT_SetRollbackOnlyClientExample.java | 87 ---- .../MDB_CMT_SetRollbackOnlyExample.java | 71 --- .../MDBCMTSetRollbackOnlyRunnerTest.java | 61 --- .../src/test/resources/arquillian.xml | 43 -- .../javaee/mdb-cmt-tx-local/pom.xml | 14 - .../application-roles.properties | 22 - .../application-users.properties | 24 - .../configuration/logging.properties | 52 -- .../configuration/mgmt-users.properties | 24 - .../configuration/standalone-example.xml | 445 ---------------- .../example/MDB_CMT_TxLocalClientExample.java | 87 ---- .../server/MDB_CMT_TxLocalExample.java | 90 ---- .../example/MDBCMTSetLocalTXRunnerTest.java | 61 --- .../src/test/resources/arquillian.xml | 43 -- .../javaee/mdb-cmt-tx-not-supported/pom.xml | 14 - .../application-roles.properties | 22 - .../application-users.properties | 24 - .../configuration/logging.properties | 52 -- .../configuration/mgmt-users.properties | 24 - .../configuration/standalone-example.xml | 445 ---------------- .../MDB_CMT_TxNotSupportedClientExample.java | 87 ---- .../server/MDB_CMT_TxNotSupported.java | 73 --- .../MDBCMTSetTXNotSupportedRunnerTest.java | 61 --- .../src/test/resources/arquillian.xml | 43 -- .../javaee/mdb-cmt-tx-required/pom.xml | 14 - .../application-roles.properties | 22 - .../application-users.properties | 24 - .../configuration/logging.properties | 52 -- .../configuration/mgmt-users.properties | 24 - .../configuration/standalone-example.xml | 446 ---------------- .../MDB_CMT_TxRequiredClientExample.java | 92 ---- .../server/MDB_CMT_TxRequiredExample.java | 65 --- .../MDBCMTSetTXRequiredRunnerTest.java | 62 --- .../src/test/resources/arquillian.xml | 43 -- .../javaee/mdb-message-selector/pom.xml | 14 - .../application-roles.properties | 22 - .../application-users.properties | 24 - .../configuration/logging.properties | 52 -- .../configuration/mgmt-users.properties | 24 - .../configuration/standalone-example.xml | 446 ---------------- .../MDBMessageSelectorClientExample.java | 98 ---- .../server/MDBMessageSelectorExample.java | 63 --- .../MDBCMTSetMessageSelectorRunnerTest.java | 62 --- .../src/test/resources/arquillian.xml | 43 -- .../javaee/mdb-tx-send/pom.xml | 14 - .../server/hornetq-configuration.xml | 71 --- .../javaee/mdb-tx-send/server/hornetq-jms.xml | 23 - .../application-roles.properties | 22 - .../application-users.properties | 24 - .../configuration/logging.properties | 52 -- .../configuration/mgmt-users.properties | 24 - .../configuration/standalone-example.xml | 466 ----------------- .../MDBMessageSendTxClientExample.java | 102 ---- .../server/MDBMessageSendTxExample.java | 99 ---- .../examples/MDBCMTTxSendRunnerTest.java | 76 --- .../src/test/resources/arquillian.xml | 43 -- activemq-arquillian/javaee/pom.xml | 155 ------ activemq-arquillian/pom.xml | 110 ---- .../src/main/resources/log4j.properties | 43 -- 104 files changed, 9753 deletions(-) delete mode 100644 activemq-arquillian/ee-install/pom.xml delete mode 100644 activemq-arquillian/javaee/jca-config/pom.xml delete mode 100644 activemq-arquillian/javaee/jca-config/server/hornetq-configuration.xml delete mode 100644 activemq-arquillian/javaee/jca-config/server/hornetq-jms.xml delete mode 100644 activemq-arquillian/javaee/jca-config/server/standalone/configuration/application-roles.properties delete mode 100644 activemq-arquillian/javaee/jca-config/server/standalone/configuration/application-users.properties delete mode 100644 activemq-arquillian/javaee/jca-config/server/standalone/configuration/logging.properties delete mode 100644 activemq-arquillian/javaee/jca-config/server/standalone/configuration/mgmt-users.properties delete mode 100644 activemq-arquillian/javaee/jca-config/server/standalone/configuration/standalone-example.xml delete mode 100644 activemq-arquillian/javaee/jca-config/server/standalone/configuration/standalone-example2.xml delete mode 100644 activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/MDBRemoteClientExample.java delete mode 100644 activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server/MDBQueueA.java delete mode 100644 activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/MDBQueueB.java delete mode 100644 activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/StatelessSender.java delete mode 100644 activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/StatelessSenderService.java delete mode 100644 activemq-arquillian/javaee/jca-config/src/test/java/org/hornetq/javaee/example/server/ExampleRunner2Test.java delete mode 100644 activemq-arquillian/javaee/jca-config/src/test/resources/arquillian.xml delete mode 100644 activemq-arquillian/javaee/jca-remote/pom.xml delete mode 100644 activemq-arquillian/javaee/jca-remote/server/standalone/configuration/application-roles.properties delete mode 100644 activemq-arquillian/javaee/jca-remote/server/standalone/configuration/application-users.properties delete mode 100644 activemq-arquillian/javaee/jca-remote/server/standalone/configuration/logging.properties delete mode 100644 activemq-arquillian/javaee/jca-remote/server/standalone/configuration/mgmt-users.properties delete mode 100644 activemq-arquillian/javaee/jca-remote/server/standalone/configuration/standalone-example.xml delete mode 100644 activemq-arquillian/javaee/jca-remote/server/standalone/configuration/standalone-live.xml delete mode 100644 activemq-arquillian/javaee/jca-remote/src/main/java/org/hornetq/javaee/example/MDBRemoteServerClientExample.java delete mode 100644 activemq-arquillian/javaee/jca-remote/src/main/java/org/hornetq/javaee/example/server/MDBQueue.java delete mode 100644 activemq-arquillian/javaee/jca-remote/src/test/java/org/hornetq/javaee/examples/JCARemoteRunnerTest.java delete mode 100644 activemq-arquillian/javaee/jca-remote/src/test/resources/arquillian.xml delete mode 100644 activemq-arquillian/javaee/mdb-bmt/pom.xml delete mode 100644 activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/application-roles.properties delete mode 100644 activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/application-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/logging.properties delete mode 100644 activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/mgmt-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/standalone-example.xml delete mode 100644 activemq-arquillian/javaee/mdb-bmt/src/main/java/org/hornetq/javaee/example/MDB_BMTClientExample.java delete mode 100644 activemq-arquillian/javaee/mdb-bmt/src/main/java/org/hornetq/javaee/example/server/MDB_BMTExample.java delete mode 100644 activemq-arquillian/javaee/mdb-bmt/src/test/java/org/hornetq/javaee/example/server/ExampleRunnerTest.java delete mode 100644 activemq-arquillian/javaee/mdb-bmt/src/test/resources/arquillian.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-setrollbackonly/pom.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/application-roles.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/application-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/logging.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/mgmt-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/standalone-example.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/main/java/org/hornetq/javaee/example/MDB_CMT_SetRollbackOnlyClientExample.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_SetRollbackOnlyExample.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/test/java/org/hornetq/javaee/example/MDBCMTSetRollbackOnlyRunnerTest.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/test/resources/arquillian.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-local/pom.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/application-roles.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/application-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/logging.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/mgmt-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/standalone-example.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-local/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxLocalClientExample.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-local/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxLocalExample.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-local/src/test/java/org/hornetq/javaee/example/MDBCMTSetLocalTXRunnerTest.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-local/src/test/resources/arquillian.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-not-supported/pom.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/application-roles.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/application-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/logging.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/mgmt-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/standalone-example.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxNotSupportedClientExample.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxNotSupported.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/test/java/org/hornetq/javaee/example/MDBCMTSetTXNotSupportedRunnerTest.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/test/resources/arquillian.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-required/pom.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/application-roles.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/application-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/logging.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/mgmt-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/standalone-example.xml delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-required/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxRequiredClientExample.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-required/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxRequiredExample.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-required/src/test/java/org/hornetq/javaee/examples/MDBCMTSetTXRequiredRunnerTest.java delete mode 100644 activemq-arquillian/javaee/mdb-cmt-tx-required/src/test/resources/arquillian.xml delete mode 100644 activemq-arquillian/javaee/mdb-message-selector/pom.xml delete mode 100644 activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/application-roles.properties delete mode 100644 activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/application-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/logging.properties delete mode 100644 activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/mgmt-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/standalone-example.xml delete mode 100644 activemq-arquillian/javaee/mdb-message-selector/src/main/java/org/hornetq/javaee/example/MDBMessageSelectorClientExample.java delete mode 100644 activemq-arquillian/javaee/mdb-message-selector/src/main/java/org/hornetq/javaee/example/server/MDBMessageSelectorExample.java delete mode 100644 activemq-arquillian/javaee/mdb-message-selector/src/test/java/org/hornetq/javaee/examples/MDBCMTSetMessageSelectorRunnerTest.java delete mode 100644 activemq-arquillian/javaee/mdb-message-selector/src/test/resources/arquillian.xml delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/pom.xml delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/server/hornetq-configuration.xml delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/server/hornetq-jms.xml delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/application-roles.properties delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/application-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/logging.properties delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/mgmt-users.properties delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/standalone-example.xml delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/src/main/java/org/hornetq/javaee/example/MDBMessageSendTxClientExample.java delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/src/main/java/org/hornetq/javaee/example/server/MDBMessageSendTxExample.java delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/src/test/java/org/hornetq/javaee/examples/MDBCMTTxSendRunnerTest.java delete mode 100644 activemq-arquillian/javaee/mdb-tx-send/src/test/resources/arquillian.xml delete mode 100644 activemq-arquillian/javaee/pom.xml delete mode 100644 activemq-arquillian/pom.xml delete mode 100755 activemq-arquillian/src/main/resources/log4j.properties diff --git a/NOTICE b/NOTICE index 2b82424ef0..365902d74d 100644 --- a/NOTICE +++ b/NOTICE @@ -45,7 +45,3 @@ This product includes software developed by Yahoo! Inc. (www.yahoo.com) Copyright (c) 2010 Yahoo! Inc. All rights reserved. -The activemq-arquillian module is a fork of HornetQ javaee examples -licesed by Red Hat, Inc. -https://github.com/hornetq/hornetq/blob/master/examples/javaee - diff --git a/activemq-arquillian/ee-install/pom.xml b/activemq-arquillian/ee-install/pom.xml deleted file mode 100644 index 5eba4fbe37..0000000000 --- a/activemq-arquillian/ee-install/pom.xml +++ /dev/null @@ -1,166 +0,0 @@ - - - - - 4.0.0 - - - org.apache.activemq - activemq-arquillian - 5.9-SNAPSHOT - - - ee-install - pom - ActiveMQ :: ee container - ee container install - - - - - - org.apache.maven.plugins - maven-dependency-plugin - ${maven-dependency-plugin-version} - - - unpack-rar - process-test-classes - - copy - - - - - org.apache.activemq - activemq-rar - ${project.version} - rar - false - - ${project.build.directory}${file.separator}${container-version}${file.separator}standalone${file.separator}deployments - - - - true - - - - - unpack-rar-remote - process-test-classes - - copy - - - - - org.apache.activemq - activemq-rar - ${project.version} - rar - false - - ${project.build.directory}${file.separator}${container-version}${file.separator}standalone${file.separator}deployments - - activemq-remote.rar - - - true - - - - - - - - - - - eap - - - - wildfly - - - - - org.apache.maven.plugins - maven-dependency-plugin - ${maven-dependency-plugin-version} - - - unpack-wildfly - process-test-classes - - unpack - - - - - org.wildfly - wildfly-dist - ${container-version} - zip - false - ${project.build.directory} - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/jca-config/pom.xml b/activemq-arquillian/javaee/jca-config/pom.xml deleted file mode 100644 index 0d611700a2..0000000000 --- a/activemq-arquillian/javaee/jca-config/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - 4.0.0 - - - org.apache.activemq - javaee - 5.9-SNAPSHOT - - - jee-jca-config-example - jar - JEE JCA Config Example - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - - as-node1 - true - generate-test-resources - - copy-resources - - - ${basedir}/target/jbossas-node1 - true - - - ${ee.install.home} - - standalone/data - standalone/log - standalone/tmp - - - - ${basedir}/server - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - -Dlogging.configuration=file:///${user.dir}/test/config/logging.properties - - - clustering-all - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/jca-config/server/hornetq-configuration.xml b/activemq-arquillian/javaee/jca-config/server/hornetq-configuration.xml deleted file mode 100644 index 9a17dc975c..0000000000 --- a/activemq-arquillian/javaee/jca-config/server/hornetq-configuration.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - HornetQ.main.config - - - ${jboss.server.data.dir}/messaging/bindings - - ${jboss.server.data.dir}/messaging/journal - - ${jboss.server.data.dir}/messaging/largemessages - - ${jboss.server.data.dir}/messaging/paging - - - - - org.hornetq.core.remoting.impl.netty.NettyConnectorFactory - - - - org.hornetq.core.remoting.impl.invm.InVMConnectorFactory - - - - - - - - - org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory - - - - - - org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/jca-config/server/hornetq-jms.xml b/activemq-arquillian/javaee/jca-config/server/hornetq-jms.xml deleted file mode 100644 index 409eeaff95..0000000000 --- a/activemq-arquillian/javaee/jca-config/server/hornetq-jms.xml +++ /dev/null @@ -1,20 +0,0 @@ - \ No newline at end of file diff --git a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/application-roles.properties b/activemq-arquillian/javaee/jca-config/server/standalone/configuration/application-roles.properties deleted file mode 100644 index 0ade8fb88e..0000000000 --- a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/application-roles.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Properties declaration of users roles for the realm 'ApplicationRealm'. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, -guest=guest diff --git a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/application-users.properties b/activemq-arquillian/javaee/jca-config/server/standalone/configuration/application-users.properties deleted file mode 100644 index c52e923158..0000000000 --- a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/application-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm -# for application services on a new AS 7.1 installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this realm is as follows: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -guest=3437456520927d113b17d471d630e0d6 diff --git a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/logging.properties b/activemq-arquillian/javaee/jca-config/server/standalone/configuration/logging.properties deleted file mode 100644 index 8d6254a4f4..0000000000 --- a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/logging.properties +++ /dev/null @@ -1,54 +0,0 @@ -# -# JBoss, Home of Professional Open Source. -# Copyright 2010, Red Hat, Inc., and individual contributors -# as indicated by the @author tags. See the copyright.txt file 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. -# - -# Additional logger names to configure (root logger is always configured) -loggers=org.jboss.as.config - -# Dump system environment at boot by default -logger.org.jboss.as.config.level=DEBUG - -logger.org.jboss.level=DEBUG - -# Root logger level -logger.level=${jboss.boot.server.log.level:DEBUG} -# Root logger handlers -logger.handlers=FILE,CONSOLE - -# Console handler configuration -handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler -handler.CONSOLE.properties=autoFlush -handler.CONSOLE.level=${jboss.boot.server.log.console.level:DEBUG} -handler.CONSOLE.autoFlush=true -handler.CONSOLE.formatter=PATTERN - -# File handler configuration -handler.FILE=org.jboss.logmanager.handlers.FileHandler -handler.FILE.level=DEBUG -handler.FILE.properties=autoFlush,fileName -handler.FILE.autoFlush=true -handler.FILE.fileName=${org.jboss.boot.log.file:boot.log} -handler.FILE.formatter=PATTERN - -# Formatter pattern configuration -formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter -formatter.PATTERN.properties=pattern -formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n diff --git a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/mgmt-users.properties b/activemq-arquillian/javaee/jca-config/server/standalone/configuration/mgmt-users.properties deleted file mode 100644 index 349b00434e..0000000000 --- a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/mgmt-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ManagementRealm' which is the default realm -# for new AS 7.1 installations. Further authentication mechanism can be configured -# as part of the in standalone.xml. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# By default the properties realm expects the entries to be in the format: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat - -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -admin=9d71b431e53d99563aa0dfca628c970b -andy=dfb16391f1be1c454b5bce9822bd9df3 diff --git a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/standalone-example.xml b/activemq-arquillian/javaee/jca-config/server/standalone/configuration/standalone-example.xml deleted file mode 100644 index 3f85a5179d..0000000000 --- a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/standalone-example.xml +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-rar.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - vm://localhost?brokerConfig=xbean:broker-config.xml - - - - - 1 - 20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/standalone-example2.xml b/activemq-arquillian/javaee/jca-config/server/standalone/configuration/standalone-example2.xml deleted file mode 100644 index 006248156f..0000000000 --- a/activemq-arquillian/javaee/jca-config/server/standalone/configuration/standalone-example2.xml +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-remote.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - tcp://localhost:61616 - - - - - 1 - 20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/MDBRemoteClientExample.java b/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/MDBRemoteClientExample.java deleted file mode 100644 index 6c4dec28dc..0000000000 --- a/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/MDBRemoteClientExample.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example; - -import org.hornetq.javaee.example.server2.StatelessSenderService; - -import javax.jms.Connection; -import javax.naming.Context; -import javax.naming.InitialContext; -import java.util.Properties; - -/** - * - * MDB Remote & JCA Configuration Example. - * - * @author Clebert Suconic - */ -public class MDBRemoteClientExample -{ - public static void main(String[] args) throws Exception - { - Connection connection = null; - InitialContext initialContext = null; - try - { - final Properties env = new Properties(); - - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); - - env.put(Context.PROVIDER_URL, "remote://localhost:4547"); - - env.put(Context.SECURITY_PRINCIPAL, "guest"); - - env.put(Context.SECURITY_CREDENTIALS, "password"); - env.put("jboss.naming.client.ejb.context", true); - -env.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false"); - //Step 1. Create an initial context to perform the JNDI lookup. - initialContext = new InitialContext(env); - - //Step 2. Getting a reference to the Stateless Bean - StatelessSenderService sender = (StatelessSenderService)initialContext.lookup("mdb2/StatelessSender!org.hornetq.javaee.example.server2.StatelessSenderService"); - - //Step 3. Calling a Stateless Session Bean. You will have more steps on the SessionBean - sender.sendHello("Hello there MDB!"); - - System.out.println("Step 3: Invoking the Stateless Bean"); - - initialContext.close(); - } - finally - { - //Step 11. Be sure to close our JMS resources! - if (initialContext != null) - { - initialContext.close(); - } - if(connection != null) - { - connection.close(); - } - } - } -} diff --git a/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server/MDBQueueA.java b/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server/MDBQueueA.java deleted file mode 100644 index ced6af30c4..0000000000 --- a/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server/MDBQueueA.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example.server; - -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; - -/** - * MDB that is connected to the remote queue. - * @author Clebert Suconic - */ - -//Step 9. The message is received on the MDB, using a local queue. -@MessageDriven(name = "MDB_QueueA", - activationConfig = - { - @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/A"), - @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") - }) -public class MDBQueueA implements MessageListener -{ - public void onMessage(Message message) - { - try - { - TextMessage tm = (TextMessage)message; - - String text = tm.getText(); - - System.out.println("Step 10: (MDBQueueA.java) Message received using the default adapter. Message = \"" + text + "\"" ); - - } - catch (Exception e) - { - e.printStackTrace(); - } - } -} diff --git a/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/MDBQueueB.java b/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/MDBQueueB.java deleted file mode 100644 index 644883d726..0000000000 --- a/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/MDBQueueB.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example.server2; - -import org.jboss.ejb3.annotation.ResourceAdapter; - -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; - -/** - * MDB that is connected to the remote queue. - * @author Clebert Suconic - */ - -//Step 10. The message is received on the MDB, using a remote queue. -@MessageDriven(name = "MDB_QueueB", - activationConfig = - { - @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/B"), - @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") - }) -@ResourceAdapter("activemq-remote.rar") -public class MDBQueueB implements MessageListener -{ - public void onMessage(Message message) - { - try - { - TextMessage tm = (TextMessage)message; - - String text = tm.getText(); - - System.out.println("Step 11: (MDBQueueB.java) Message received using the remote adapter. Message = \"" + text + "\"" ); - - } - catch (Exception e) - { - e.printStackTrace(); - } - } -} diff --git a/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/StatelessSender.java b/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/StatelessSender.java deleted file mode 100644 index 90fbfc16d3..0000000000 --- a/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/StatelessSender.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - - -package org.hornetq.javaee.example.server2; - - -import javax.annotation.Resource; -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.jms.*; - -/** - * A Stateless Bean that will connect to a remote JBM. - * - * @author Clebert Suconic - * - * - */ -@Remote(StatelessSenderService.class) -@Stateless -public class StatelessSender implements StatelessSenderService -{ - - /** - * Resource to be deployed by jms-remote-ds.xml - * */ - @Resource(mappedName="java:/RemoteJmsXA") - private ConnectionFactory connectionFactory; - - - /* (non-Javadoc) - * @see org.jboss.javaee.example.server.StatelessSenderService#sendHello(java.lang.String) - */ - public void sendHello(String message) throws Exception - { - // Step 4. Define the destinations that will receive the message (instead of using JNDI to the remote server) - //Queue destQueueA = HornetQJMSClient.createQueue("A"); - //Queue destQueueB = HornetQJMSClient.createQueue("B"); - // Step 5. Create a connection to a remote server using a connection-factory (look at the deployed file jms-remote-ds.xml) - Connection conn = connectionFactory.createConnection("guest", "password"); - - // Step 6. Send a message to a QueueA on the remote server, which will be received by MDBQueueA - Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer prodA = sess.createProducer(sess.createQueue("A")); - prodA.send(sess.createTextMessage(message)); - - System.out.println("Step 7 (StatelessSender.java): Sent message \"" + message + "\" to QueueA"); - - // Step 6. Send a message to a QueueB on the remote server, which will be received by MDBQueueA - MessageProducer prodB = sess.createProducer(sess.createQueue("B")); - prodB.send(sess.createTextMessage(message)); - - System.out.println("Step 8 (StatelessSender.java): Sent message \"" + message + "\" to QueueB"); - - // Step 7. Close the connection. (Since this is a JCA connection, this will just place the connection back to a connection pool) - conn.close(); - System.out.println("Step 9 (StatelessSender.java): Closed Connection (sending it back to pool)"); - - } - - // Constants ----------------------------------------------------- - - // Attributes ---------------------------------------------------- - - // Static -------------------------------------------------------- - - // Constructors -------------------------------------------------- - - // Public -------------------------------------------------------- - - // Package protected --------------------------------------------- - - // Protected ----------------------------------------------------- - - // Private ------------------------------------------------------- - - // Inner classes ------------------------------------------------- - -} diff --git a/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/StatelessSenderService.java b/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/StatelessSenderService.java deleted file mode 100644 index 5d50cd5547..0000000000 --- a/activemq-arquillian/javaee/jca-config/src/main/java/org/hornetq/javaee/example/server2/StatelessSenderService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - - -package org.hornetq.javaee.example.server2; - -/** - * A StatelessSenderService - * - * @author Clebert Suconic - * - * - */ -public interface StatelessSenderService -{ - - public void sendHello(String message) throws Exception; - -} diff --git a/activemq-arquillian/javaee/jca-config/src/test/java/org/hornetq/javaee/example/server/ExampleRunner2Test.java b/activemq-arquillian/javaee/jca-config/src/test/java/org/hornetq/javaee/example/server/ExampleRunner2Test.java deleted file mode 100644 index a8ad9b0ff3..0000000000 --- a/activemq-arquillian/javaee/jca-config/src/test/java/org/hornetq/javaee/example/server/ExampleRunner2Test.java +++ /dev/null @@ -1,128 +0,0 @@ -/* -* JBoss, Home of Professional Open Source. -* Copyright 2010, Red Hat, Inc., and individual contributors -* as indicated by the @author tags. See the copyright.txt file 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.hornetq.javaee.example.server; - -import org.hornetq.javaee.example.MDBRemoteClientExample; -import org.hornetq.javaee.example.server2.MDBQueueB; -import org.hornetq.javaee.example.server2.StatelessSender; -import org.hornetq.javaee.example.server2.StatelessSenderService; -import org.jboss.arquillian.container.test.api.ContainerController; -import org.jboss.arquillian.container.test.api.Deployer; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.arquillian.junit.InSequence; -import org.jboss.arquillian.test.api.ArquillianResource; -//import org.jboss.osgi.testing.ManifestBuilder; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.Asset; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.Test; -import org.junit.runner.RunWith; - -import java.io.InputStream; - -/** - * @author Andy Taylor - * 5/21/12 - */ -@RunAsClient -@RunWith(Arquillian.class) -//@ServerSetup({ExampleRunner2Test.JmsQueueSetup.class}) -public class ExampleRunner2Test -{ - @ArquillianResource - private ContainerController controller; - @ArquillianResource - private Deployer deployer; - - @Deployment(name = "deploy-0", managed = false) - @TargetsContainer("node-0") - public static Archive getDeployment() - { - - final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar"); - ejbJar.addClass(MDBQueueA.class); - System.out.println(ejbJar.toString(true)); - return ejbJar; - } - - @Deployment(name = "deploy-1", managed = false) - @TargetsContainer("node-1") - public static Archive getDeployment2() - { - - final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb2.jar"); - ejbJar.addClass(MDBQueueB.class); - ejbJar.addClass(StatelessSenderService.class); - ejbJar.addClass(StatelessSender.class); - // Generate the manifest with it's dependencies -// ejbJar.setManifest(new Asset() -// { -// public InputStream openStream() -// { -// ManifestBuilder builder = ManifestBuilder.newInstance(); -// StringBuffer dependencies = new StringBuffer(); -// dependencies.append("org.hornetq"); -// builder.addManifestHeader("Dependencies", dependencies.toString()); -// return builder.openStream(); -// } -// }); - System.out.println(ejbJar.toString(true)); - return ejbJar; - } - - - @Test - public void runExample() throws Exception - { - MDBRemoteClientExample.main(null); - } - - @Test - @InSequence(-1) - public void startServer() - { - System.out.println("*****************************************************************************************************************************************************************"); - controller.start("node-0"); - System.out.println("*****************************************************************************************************************************************************************"); - deployer.deploy("deploy-0"); - System.out.println("*****************************************************************************************************************************************************************"); - controller.start("node-1"); - System.out.println("*****************************************************************************************************************************************************************"); - deployer.deploy("deploy-1"); - System.out.println("*****************************************************************************************************************************************************************"); - } - - @Test - @InSequence(1) - public void stopServer() - { - deployer.undeploy("deploy-1"); - controller.stop("node-1"); - deployer.undeploy("deploy-0"); - controller.stop("node-0"); - } - -} diff --git a/activemq-arquillian/javaee/jca-config/src/test/resources/arquillian.xml b/activemq-arquillian/javaee/jca-config/src/test/resources/arquillian.xml deleted file mode 100644 index 517f0059be..0000000000 --- a/activemq-arquillian/javaee/jca-config/src/test/resources/arquillian.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - ${basedir}/target/jbossas-node0 - -Djboss.node.name=node-0 - standalone-example.xml - - true - ${node0:127.0.0.1} - ${as.managementPort:9999} - - - ${as.debug.port:8787} ${as.managementPort:9999} - 8 - - - - - ${basedir}/target/jbossas-node1 - -Djboss.node.name=node-1 -Djboss.socket.binding.port-offset=100 - standalone-example2.xml - true - ${node0:127.0.0.1} - ${as.managementPort:10099} - - ${as.debug.port:8787} ${as.managementPort:10099} - 8 - - - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/jca-remote/pom.xml b/activemq-arquillian/javaee/jca-remote/pom.xml deleted file mode 100644 index 042ea33d25..0000000000 --- a/activemq-arquillian/javaee/jca-remote/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - 4.0.0 - - - org.apache.activemq - javaee - 5.9-SNAPSHOT - - - jca-remote-example - jar - JEE JCA Remote Example - - - - - org.apache.activemq - activemq-broker - ${project.version} - - - org.apache.activemq - activemq-client - ${project.version} - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - - as-node1 - true - generate-test-resources - - copy-resources - - - ${basedir}/target/jbossas-node1 - true - - - ${ee.install.home} - - standalone/data - standalone/log - standalone/tmp - - - - ${basedir}/server - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - -Dlogging.configuration=file:///${user.dir}/test/config/logging.properties - - - clustering-all - - - - - - diff --git a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/application-roles.properties b/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/application-roles.properties deleted file mode 100644 index 0ade8fb88e..0000000000 --- a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/application-roles.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Properties declaration of users roles for the realm 'ApplicationRealm'. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, -guest=guest diff --git a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/application-users.properties b/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/application-users.properties deleted file mode 100644 index c52e923158..0000000000 --- a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/application-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm -# for application services on a new AS 7.1 installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this realm is as follows: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -guest=3437456520927d113b17d471d630e0d6 diff --git a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/logging.properties b/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/logging.properties deleted file mode 100644 index c5d4022e65..0000000000 --- a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/logging.properties +++ /dev/null @@ -1,52 +0,0 @@ -# -# JBoss, Home of Professional Open Source. -# Copyright 2010, Red Hat, Inc., and individual contributors -# as indicated by the @author tags. See the copyright.txt file 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. -# - -# Additional logger names to configure (root logger is always configured) -loggers=org.jboss.as.config - -# Dump system environment at boot by default -logger.org.jboss=DEBUG - -# Root logger level -logger.level=${jboss.boot.server.log.level:INFO} -# Root logger handlers -logger.handlers=FILE,CONSOLE - -# Console handler configuration -handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler -handler.CONSOLE.properties=autoFlush -handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO} -handler.CONSOLE.autoFlush=true -handler.CONSOLE.formatter=PATTERN - -# File handler configuration -handler.FILE=org.jboss.logmanager.handlers.FileHandler -handler.FILE.level=DEBUG -handler.FILE.properties=autoFlush,fileName -handler.FILE.autoFlush=true -handler.FILE.fileName=${org.jboss.boot.log.file:boot.log} -handler.FILE.formatter=PATTERN - -# Formatter pattern configuration -formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter -formatter.PATTERN.properties=pattern -formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n diff --git a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/mgmt-users.properties b/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/mgmt-users.properties deleted file mode 100644 index 309305ab16..0000000000 --- a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/mgmt-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ManagementRealm' which is the default realm -# for new AS 7.1 installations. Further authentication mechanism can be configured -# as part of the in standalone.xml. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# By default the properties realm expects the entries to be in the format: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat - -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -admin=ffd6e94a09c5a9ea5e216737dd45b99d -andy=dfb16391f1be1c454b5bce9822bd9df3 diff --git a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/standalone-example.xml b/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/standalone-example.xml deleted file mode 100644 index 44be31467e..0000000000 --- a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/standalone-example.xml +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-remote.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - tcp://localhost:61616 - - - - - 1 - 20 - - - - - - - mdbQueue - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/standalone-live.xml b/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/standalone-live.xml deleted file mode 100644 index 743cb87c8c..0000000000 --- a/activemq-arquillian/javaee/jca-remote/server/standalone/configuration/standalone-live.xml +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-remote.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - tcp://localhost:61616 - - - - mdbQueue - - - mdbReplyQueue - - - tcp://localhost:61616 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/jca-remote/src/main/java/org/hornetq/javaee/example/MDBRemoteServerClientExample.java b/activemq-arquillian/javaee/jca-remote/src/main/java/org/hornetq/javaee/example/MDBRemoteServerClientExample.java deleted file mode 100644 index 5eb0d3994b..0000000000 --- a/activemq-arquillian/javaee/jca-remote/src/main/java/org/hornetq/javaee/example/MDBRemoteServerClientExample.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -package org.hornetq.javaee.example; - - - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.MessageConsumer; -import javax.jms.MessageProducer; -import javax.jms.Queue; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.Context; -import javax.naming.InitialContext; -import java.util.Properties; - -/** - * - * MDB Remote & JCA Configuration Example. - * - * @author Clebert Suconic - */ -public class MDBRemoteServerClientExample -{ - public static void main(String[] args) throws Exception - { - InitialContext initialContext = null; - Connection connection = null; - try - { - //Step 1. Create an initial context to perform the JNDI lookup. - final Properties env = new Properties(); - - env.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); - - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); - - env.put(Context.PROVIDER_URL, "remote://localhost:4547"); - - env.put(Context.SECURITY_PRINCIPAL, "guest"); - - env.put(Context.SECURITY_CREDENTIALS, "password"); - - initialContext = new InitialContext(env); - - // Step 2. Look up the MDB's queue - Queue queue = (Queue) initialContext.lookup("/queues/mdbQueue"); - - // Step 3. Look up a Connection Factory - ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("jms/RemoteConnectionFactory"); - - //Step 4. Create a connection - connection = cf.createConnection("guest", "password"); - - System.out.println("new connection: " + connection); - - //Step 5. Create a Session - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // Step 6. Create a message producer to send the message - MessageProducer producer = session.createProducer(queue); - - // Step 7. Create and send a message - producer.send(session.createTextMessage("a message")); - - // Step 15. Look up the reply queue - Queue replyQueue = (Queue) initialContext.lookup("/queues/mdbReplyQueue"); - - // Step 16. Create a message consumer to receive the message - MessageConsumer consumer = session.createConsumer(replyQueue); - - // Step 17. Start the connection so delivery starts - connection.start(); - - // Step 18. Receive the text message - TextMessage textMessage = (TextMessage) consumer.receive(5000); - - System.out.println("Message received from reply queue. Message = \"" + textMessage.getText() + "\"" ); - - } - finally - { - // Step 19. Be sure to close our JMS resources! - if (initialContext != null) - { - initialContext.close(); - } - if (connection != null) - { - connection.close(); - } - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/jca-remote/src/main/java/org/hornetq/javaee/example/server/MDBQueue.java b/activemq-arquillian/javaee/jca-remote/src/main/java/org/hornetq/javaee/example/server/MDBQueue.java deleted file mode 100644 index d121234df6..0000000000 --- a/activemq-arquillian/javaee/jca-remote/src/main/java/org/hornetq/javaee/example/server/MDBQueue.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example.server; - -import org.jboss.ejb3.annotation.ResourceAdapter; - -import javax.annotation.Resource; -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.jms.*; - -/** - * @author Andy Taylor - * Created May 24, 2010 - */ - -/** - * MDB that is connected to the remote queue. - * @author Clebert Suconic - */ - -//Step 10. The message is received on the MDB, using a remote queue. -@MessageDriven(name = "MDB_Queue", - activationConfig = - { - @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @ActivationConfigProperty(propertyName = "destination", propertyValue = "queues/mdbQueue"), - @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"), - // amq defaults to not look in jndi - @ActivationConfigProperty(propertyName = "useJndi", propertyValue = "true") - }) -@ResourceAdapter("activemq-remote.rar") -public class MDBQueue implements MessageListener -{ - /** - * Resource to be deployed by jms-remote-ds.xml - * */ - @Resource(mappedName="java:/RemoteJmsXA") - private ConnectionFactory connectionFactory; - - public void onMessage(Message message) - { - try - { - // Step 8. Receive the text message - TextMessage tm = (TextMessage)message; - - String text = tm.getText(); - - System.out.println("Step 11: (MDBQueue.java) Message received using the remote adapter. Message = \"" + text + "\"" ); - - // Step 9. look up the reply queue - //Queue destQueue = HornetQJMSClient.createQueue("mdbReplyQueue"); - - // Step 10. Create a connection - Connection connection = connectionFactory.createConnection(); - - // Step 11. Create a session - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - Queue destQueue = session.createQueue("mdbReplyQueue"); - - // Step 12. Create a message producer to send the message - MessageProducer producer = session.createProducer(destQueue); - - System.out.println("sending a reply message"); - - // Step 13. Create and send a reply text message - producer.send(session.createTextMessage("A reply message")); - - // Step 14. Return the connection back to the pool - connection.close(); - - } - catch (Exception e) - { - e.printStackTrace(); - } - } -} diff --git a/activemq-arquillian/javaee/jca-remote/src/test/java/org/hornetq/javaee/examples/JCARemoteRunnerTest.java b/activemq-arquillian/javaee/jca-remote/src/test/java/org/hornetq/javaee/examples/JCARemoteRunnerTest.java deleted file mode 100644 index 42b9115464..0000000000 --- a/activemq-arquillian/javaee/jca-remote/src/test/java/org/hornetq/javaee/examples/JCARemoteRunnerTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* -* JBoss, Home of Professional Open Source. -* Copyright 2010, Red Hat, Inc., and individual contributors -* as indicated by the @author tags. See the copyright.txt file 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.hornetq.javaee.examples; - -import org.apache.activemq.broker.BrokerService; -import org.hornetq.javaee.example.MDBRemoteServerClientExample; -import org.hornetq.javaee.example.server.MDBQueue; -import org.jboss.arquillian.container.test.api.ContainerController; -import org.jboss.arquillian.container.test.api.Deployer; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.arquillian.junit.InSequence; -import org.jboss.arquillian.test.api.ArquillianResource; -//import org.jboss.osgi.testing.ManifestBuilder; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.Asset; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.Test; -import org.junit.runner.RunWith; - -import java.io.InputStream; - -/** - * @author Andy Taylor - * 5/21/12 - */ -@RunAsClient -@RunWith(Arquillian.class) -//@ServerSetup({ExampleRunner2Test.JmsQueueSetup.class}) -public class JCARemoteRunnerTest -{ - BrokerService brokerService = null; - @ArquillianResource - private ContainerController controller; - @ArquillianResource - private Deployer deployer; - - @Deployment(name = "deploy-0", managed = false) - @TargetsContainer("node-0") - public static Archive getDeployment() - { - - final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar"); - ejbJar.addClass(MDBQueue.class); -// ejbJar.setManifest(new Asset() -// { -// public InputStream openStream() -// { -// ManifestBuilder builder = ManifestBuilder.newInstance(); -// StringBuffer dependencies = new StringBuffer(); -// dependencies.append("org.hornetq"); -// builder.addManifestHeader("Dependencies", dependencies.toString()); -// return builder.openStream(); -// } -// }); - System.out.println(ejbJar.toString(true)); - return ejbJar; - } - - @Test - public void runExample() throws Exception - { - MDBRemoteServerClientExample.main(null); - } - - @Test - @InSequence(-1) - public void startServer() - { - startAmq(); - System.out.println("*****************************************************************************************************************************************************************"); - controller.start("node-1"); - System.out.println("*****************************************************************************************************************************************************************"); - controller.start("node-0"); - System.out.println("*****************************************************************************************************************************************************************"); - deployer.deploy("deploy-0"); - } - - // let the remote instance be one we start here - private void startAmq() { - brokerService = new BrokerService(); - brokerService.setPersistent(false); - brokerService.setUseJmx(false); - try { - brokerService.addConnector("tcp://0.0.0.0:61616"); - brokerService.start(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - @InSequence(1) - public void stopServer() - { - deployer.undeploy("deploy-0"); - controller.stop("node-0"); - controller.stop("node-1"); - try { - brokerService.stop(); - } catch (Exception e) { - e.printStackTrace(); - } - } - -} diff --git a/activemq-arquillian/javaee/jca-remote/src/test/resources/arquillian.xml b/activemq-arquillian/javaee/jca-remote/src/test/resources/arquillian.xml deleted file mode 100644 index f379fdf2ca..0000000000 --- a/activemq-arquillian/javaee/jca-remote/src/test/resources/arquillian.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - ${basedir}/target/jbossas-node0 - -Djboss.node.name=node-0 - standalone-example.xml - - true - ${node0:127.0.0.1} - ${as.managementPort:9999} - - - ${as.debug.port:8787} ${as.managementPort:9999} - 8 - - - - - ${basedir}/target/jbossas-node1 - -Djboss.node.name=node-1 -Djboss.socket.binding.port-offset=100 - standalone-live.xml - true - ${node0:127.0.0.1} - ${as.managementPort:10099} - - ${as.debug.port:8787} ${as.managementPort:10099} - 8 - - - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-bmt/pom.xml b/activemq-arquillian/javaee/mdb-bmt/pom.xml deleted file mode 100644 index e5dcfc6ca5..0000000000 --- a/activemq-arquillian/javaee/mdb-bmt/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - 4.0.0 - - - org.apache.activemq - javaee - 5.9-SNAPSHOT - - - mdb-bmt-example - jar - JEE MDB Example - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/application-roles.properties b/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/application-roles.properties deleted file mode 100644 index 0ade8fb88e..0000000000 --- a/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/application-roles.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Properties declaration of users roles for the realm 'ApplicationRealm'. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, -guest=guest diff --git a/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/application-users.properties b/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/application-users.properties deleted file mode 100644 index c52e923158..0000000000 --- a/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/application-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm -# for application services on a new AS 7.1 installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this realm is as follows: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -guest=3437456520927d113b17d471d630e0d6 diff --git a/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/logging.properties b/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/logging.properties deleted file mode 100644 index 8a011f0861..0000000000 --- a/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/logging.properties +++ /dev/null @@ -1,52 +0,0 @@ -# -# JBoss, Home of Professional Open Source. -# Copyright 2010, Red Hat, Inc., and individual contributors -# as indicated by the @author tags. See the copyright.txt file 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. -# - -# Additional logger names to configure (root logger is always configured) -loggers=org.jboss.as.config - -# Dump system environment at boot by default -logger.org.jboss.as.config.level=DEBUG - -# Root logger level -logger.level=${jboss.boot.server.log.level:INFO} -# Root logger handlers -logger.handlers=FILE,CONSOLE - -# Console handler configuration -handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler -handler.CONSOLE.properties=autoFlush -handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO} -handler.CONSOLE.autoFlush=true -handler.CONSOLE.formatter=PATTERN - -# File handler configuration -handler.FILE=org.jboss.logmanager.handlers.FileHandler -handler.FILE.level=DEBUG -handler.FILE.properties=autoFlush,fileName -handler.FILE.autoFlush=true -handler.FILE.fileName=${org.jboss.boot.log.file:boot.log} -handler.FILE.formatter=PATTERN - -# Formatter pattern configuration -formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter -formatter.PATTERN.properties=pattern -formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n diff --git a/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/mgmt-users.properties b/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/mgmt-users.properties deleted file mode 100644 index 349b00434e..0000000000 --- a/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/mgmt-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ManagementRealm' which is the default realm -# for new AS 7.1 installations. Further authentication mechanism can be configured -# as part of the in standalone.xml. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# By default the properties realm expects the entries to be in the format: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat - -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -admin=9d71b431e53d99563aa0dfca628c970b -andy=dfb16391f1be1c454b5bce9822bd9df3 diff --git a/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/standalone-example.xml b/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/standalone-example.xml deleted file mode 100644 index 3d71cafa92..0000000000 --- a/activemq-arquillian/javaee/mdb-bmt/server/standalone/configuration/standalone-example.xml +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-rar.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - - vm://localhost?brokerConfig=xbean:broker-config.xml - - - - testQueue - - - - testQueue - - - failover:(tcp://localhost:61616) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/mdb-bmt/src/main/java/org/hornetq/javaee/example/MDB_BMTClientExample.java b/activemq-arquillian/javaee/mdb-bmt/src/main/java/org/hornetq/javaee/example/MDB_BMTClientExample.java deleted file mode 100644 index 97a9d470bf..0000000000 --- a/activemq-arquillian/javaee/mdb-bmt/src/main/java/org/hornetq/javaee/example/MDB_BMTClientExample.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.MessageProducer; -import javax.jms.Queue; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.Context; -import javax.naming.InitialContext; -import java.util.Properties; - -/** - * @author Andy Taylor - */ -public class MDB_BMTClientExample -{ - public static void main(final String[] args) throws Exception - { - Connection connection = null; - InitialContext initialContext = null; - try - { - final Properties env = new Properties(); - - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); - - env.put(Context.PROVIDER_URL, "remote://localhost:4447"); - - env.put(Context.SECURITY_PRINCIPAL, "guest"); - - env.put(Context.SECURITY_CREDENTIALS, "password"); - - initialContext = new InitialContext(env); - - // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("jms/queues/testQueue"); - - // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/jms/RemoteConnectionFactory"); - - // Step 4.Create a JMS Connection - connection = cf.createConnection("guest", "password"); - - // Step 5. Create a JMS Session - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // Step 6. Create a JMS Message Producer - MessageProducer producer = session.createProducer(queue); - - // Step 7. Create a Text Message - TextMessage message = session.createTextMessage("This is a text message"); - - System.out.println("Sent message: " + message.getText()); - - // Step 8. Send the Message - producer.send(message); - - // Step 9, 10 and 11 in MDB_BMPExample - } - finally - { - // Step 12. Be sure to close our JMS resources! - if (initialContext != null) - { - initialContext.close(); - } - if (connection != null) - { - connection.close(); - } - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-bmt/src/main/java/org/hornetq/javaee/example/server/MDB_BMTExample.java b/activemq-arquillian/javaee/mdb-bmt/src/main/java/org/hornetq/javaee/example/server/MDB_BMTExample.java deleted file mode 100644 index 1e40833c64..0000000000 --- a/activemq-arquillian/javaee/mdb-bmt/src/main/java/org/hornetq/javaee/example/server/MDB_BMTExample.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example.server; - -import javax.annotation.Resource; -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.ejb.MessageDrivenContext; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; -import javax.transaction.UserTransaction; - -/** - * @author Andy Taylor - */ -@MessageDriven(name = "MDB_BMTExample", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"), - // amq defaults to not look in jndi - @ActivationConfigProperty(propertyName = "useJndi", propertyValue = "true"), - @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Dups-ok-acknowledge") }) -@TransactionManagement(value = TransactionManagementType.BEAN) -public class MDB_BMTExample implements MessageListener -{ - @Resource - MessageDrivenContext ctx; - - public void onMessage(final Message message) - { - try - { - // Step 9. We know the client is sending a text message so we cast - TextMessage textMessage = (TextMessage)message; - - // Step 10. get the text from the message. - String text = textMessage.getText(); - - System.out.println("message " + text + " received"); - - // Step 11. lets look at the user transaction to make sure there isn't one. - UserTransaction tx = ctx.getUserTransaction(); - - if (tx != null) - { - tx.begin(); - System.out.println("we're in the middle of a transaction: " + tx); - tx.commit(); - } - else - { - System.out.println("something is wrong, I was expecting a transaction"); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-bmt/src/test/java/org/hornetq/javaee/example/server/ExampleRunnerTest.java b/activemq-arquillian/javaee/mdb-bmt/src/test/java/org/hornetq/javaee/example/server/ExampleRunnerTest.java deleted file mode 100644 index 2c90865c61..0000000000 --- a/activemq-arquillian/javaee/mdb-bmt/src/test/java/org/hornetq/javaee/example/server/ExampleRunnerTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* -* JBoss, Home of Professional Open Source. -* Copyright 2010, Red Hat, Inc., and individual contributors -* as indicated by the @author tags. See the copyright.txt file 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.hornetq.javaee.example.server; - -import org.hornetq.javaee.example.MDB_BMTClientExample; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.junit.Arquillian; -//import org.jboss.as.arquillian.api.ServerSetup; -//import org.jboss.as.arquillian.api.ServerSetupTask; -//import org.jboss.as.arquillian.container.ManagementClient; -import org.jboss.as.controller.client.ModelControllerClient; -import org.jboss.as.controller.client.helpers.ClientConstants; -import org.jboss.dmr.ModelNode; -//import org.jboss.naming.remote.client.cache.ConnectionCache; -import org.jboss.remoting3.security.RemotingPermission; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.xnio.Option; -import org.xnio.Options; -import org.xnio.sasl.SaslQop; - -import java.io.File; - -/** - * @author Andy Taylor - * 5/21/12 - */ -@RunAsClient -@RunWith(Arquillian.class) -public class ExampleRunnerTest -{ - @Deployment - public static Archive getDeployment() - { - - final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar"); - ejbJar.addClass(MDB_BMTExample.class); - System.out.println(ejbJar.toString(true)); - return ejbJar; - } - - @Test - public void runExample() throws Exception - { - MDB_BMTClientExample.main(null); - //give the example time to run - Thread.sleep(1000); - } - - -} diff --git a/activemq-arquillian/javaee/mdb-bmt/src/test/resources/arquillian.xml b/activemq-arquillian/javaee/mdb-bmt/src/test/resources/arquillian.xml deleted file mode 100644 index ae8a732b7d..0000000000 --- a/activemq-arquillian/javaee/mdb-bmt/src/test/resources/arquillian.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ${basedir}/target/jbossas-node0 - -Djboss.inst=${basedir}/target/jbossas-node0 - standalone-example.xml - - true - ${node0:127.0.0.1} - ${as.managementPort:9999} - - - ${as.debug.port:8787} ${as.managementPort:9999} - 8 - - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/pom.xml b/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/pom.xml deleted file mode 100644 index eadd0e9e34..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - 4.0.0 - - - org.apache.activemq - javaee - 5.9-SNAPSHOT - - - mdb-cmt-setrollbackonly-example - jar - JEE MDB CMT set rollback only Example - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/application-roles.properties b/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/application-roles.properties deleted file mode 100644 index 0ade8fb88e..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/application-roles.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Properties declaration of users roles for the realm 'ApplicationRealm'. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, -guest=guest diff --git a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/application-users.properties b/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/application-users.properties deleted file mode 100644 index c52e923158..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/application-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm -# for application services on a new AS 7.1 installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this realm is as follows: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -guest=3437456520927d113b17d471d630e0d6 diff --git a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/logging.properties b/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/logging.properties deleted file mode 100644 index 8a011f0861..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/logging.properties +++ /dev/null @@ -1,52 +0,0 @@ -# -# JBoss, Home of Professional Open Source. -# Copyright 2010, Red Hat, Inc., and individual contributors -# as indicated by the @author tags. See the copyright.txt file 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. -# - -# Additional logger names to configure (root logger is always configured) -loggers=org.jboss.as.config - -# Dump system environment at boot by default -logger.org.jboss.as.config.level=DEBUG - -# Root logger level -logger.level=${jboss.boot.server.log.level:INFO} -# Root logger handlers -logger.handlers=FILE,CONSOLE - -# Console handler configuration -handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler -handler.CONSOLE.properties=autoFlush -handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO} -handler.CONSOLE.autoFlush=true -handler.CONSOLE.formatter=PATTERN - -# File handler configuration -handler.FILE=org.jboss.logmanager.handlers.FileHandler -handler.FILE.level=DEBUG -handler.FILE.properties=autoFlush,fileName -handler.FILE.autoFlush=true -handler.FILE.fileName=${org.jboss.boot.log.file:boot.log} -handler.FILE.formatter=PATTERN - -# Formatter pattern configuration -formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter -formatter.PATTERN.properties=pattern -formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n diff --git a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/mgmt-users.properties b/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/mgmt-users.properties deleted file mode 100644 index 349b00434e..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/mgmt-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ManagementRealm' which is the default realm -# for new AS 7.1 installations. Further authentication mechanism can be configured -# as part of the in standalone.xml. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# By default the properties realm expects the entries to be in the format: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat - -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -admin=9d71b431e53d99563aa0dfca628c970b -andy=dfb16391f1be1c454b5bce9822bd9df3 diff --git a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/standalone-example.xml b/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/standalone-example.xml deleted file mode 100644 index d83dab9681..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/server/standalone/configuration/standalone-example.xml +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-rar.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - vm://localhost?brokerConfig=xbean:broker-config.xml - - - - testQueue - - - - testQueue - - - failover:(tcp://localhost:61616) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/main/java/org/hornetq/javaee/example/MDB_CMT_SetRollbackOnlyClientExample.java b/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/main/java/org/hornetq/javaee/example/MDB_CMT_SetRollbackOnlyClientExample.java deleted file mode 100644 index 741cd9cc74..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/main/java/org/hornetq/javaee/example/MDB_CMT_SetRollbackOnlyClientExample.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.MessageProducer; -import javax.jms.Queue; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.Context; -import javax.naming.InitialContext; -import java.util.Properties; - -/** - * @author Andy Taylor - */ -public class MDB_CMT_SetRollbackOnlyClientExample -{ - public static void main(final String[] args) throws Exception - { - Connection connection = null; - InitialContext initialContext = null; - try - { - // Step 1. Create an initial context to perform the JNDI lookup. - final Properties env = new Properties(); - - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); - - env.put(Context.PROVIDER_URL, "remote://localhost:4447"); - - env.put(Context.SECURITY_PRINCIPAL, "guest"); - - env.put(Context.SECURITY_CREDENTIALS, "password"); - - initialContext = new InitialContext(env); - - // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("jms/queues/testQueue"); - - // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/jms/RemoteConnectionFactory"); - - // Step 4.Create a JMS Connection - connection = cf.createConnection("guest", "password"); - - // Step 5. Create a JMS Session - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // Step 6. Create a JMS Message Producer - MessageProducer producer = session.createProducer(queue); - - // Step 7. Create a Text Message - TextMessage message = session.createTextMessage("This is a text message"); - - System.out.println("Sent message: " + message.getText()); - - // Step 8. Send the Message - producer.send(message); - - // Step 9, 10, 11 and 12 in MDB_CMP_SetRollbackOnlyExample - } - finally - { - // Step 13. Be sure to close our JMS resources! - if (initialContext != null) - { - initialContext.close(); - } - if (connection != null) - { - connection.close(); - } - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_SetRollbackOnlyExample.java b/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_SetRollbackOnlyExample.java deleted file mode 100644 index 880f099b2a..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_SetRollbackOnlyExample.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example.server; - -import javax.annotation.Resource; -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.ejb.MessageDrivenContext; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; - -import org.jboss.ejb3.annotation.ResourceAdapter; - -/** - * @author Andy Taylor - */ -@MessageDriven(name = "MDB_CMT_SetRollbackOnlyExample", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue") }) -@TransactionManagement(value = TransactionManagementType.CONTAINER) -@TransactionAttribute(value = TransactionAttributeType.REQUIRED) -@ResourceAdapter("activemq-rar.rar") -public class MDB_CMT_SetRollbackOnlyExample implements MessageListener -{ - @Resource - MessageDrivenContext ctx; - - public void onMessage(final Message message) - { - try - { - // Step 9. We know the client is sending a text message so we cast - TextMessage textMessage = (TextMessage)message; - - // Step 10. get the text from the message. - String text = textMessage.getText(); - - if (!textMessage.getJMSRedelivered()) - { - // Step 11. rollback delivery of message if the first time - System.out.println("message " + text + " received for the first time"); - ctx.setRollbackOnly(); - } - else - { - // Step 12. read the message - System.out.println("message " + text + " received for the second time"); - } - - } - catch (JMSException e) - { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/test/java/org/hornetq/javaee/example/MDBCMTSetRollbackOnlyRunnerTest.java b/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/test/java/org/hornetq/javaee/example/MDBCMTSetRollbackOnlyRunnerTest.java deleted file mode 100644 index f10ec08c7d..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/test/java/org/hornetq/javaee/example/MDBCMTSetRollbackOnlyRunnerTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* -* JBoss, Home of Professional Open Source. -* Copyright 2010, Red Hat, Inc., and individual contributors -* as indicated by the @author tags. See the copyright.txt file 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.hornetq.javaee.example; - -import org.hornetq.javaee.example.server.MDB_CMT_SetRollbackOnlyExample; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * @author Andy Taylor - * 5/21/12 - */ -@RunAsClient -@RunWith(Arquillian.class) -public class MDBCMTSetRollbackOnlyRunnerTest -{ - @Deployment - public static Archive getDeployment() - { - - final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar"); - ejbJar.addClass(MDB_CMT_SetRollbackOnlyExample.class); - System.out.println(ejbJar.toString(true)); - return ejbJar; - } - - @Test - public void runExample() throws Exception - { - MDB_CMT_SetRollbackOnlyClientExample.main(null); - //give the example time to run - Thread.sleep(1000); - } - - -} diff --git a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/test/resources/arquillian.xml b/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/test/resources/arquillian.xml deleted file mode 100644 index ae8a732b7d..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-setrollbackonly/src/test/resources/arquillian.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ${basedir}/target/jbossas-node0 - -Djboss.inst=${basedir}/target/jbossas-node0 - standalone-example.xml - - true - ${node0:127.0.0.1} - ${as.managementPort:9999} - - - ${as.debug.port:8787} ${as.managementPort:9999} - 8 - - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-local/pom.xml b/activemq-arquillian/javaee/mdb-cmt-tx-local/pom.xml deleted file mode 100644 index 81bd3f5943..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-local/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - 4.0.0 - - - org.apache.activemq - javaee - 5.9-SNAPSHOT - - - mdb-cmt-tx-local-example - jar - JEE MDB CMT Local Transaction Example - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/application-roles.properties b/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/application-roles.properties deleted file mode 100644 index 0ade8fb88e..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/application-roles.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Properties declaration of users roles for the realm 'ApplicationRealm'. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, -guest=guest diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/application-users.properties b/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/application-users.properties deleted file mode 100644 index c52e923158..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/application-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm -# for application services on a new AS 7.1 installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this realm is as follows: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -guest=3437456520927d113b17d471d630e0d6 diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/logging.properties b/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/logging.properties deleted file mode 100644 index 8a011f0861..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/logging.properties +++ /dev/null @@ -1,52 +0,0 @@ -# -# JBoss, Home of Professional Open Source. -# Copyright 2010, Red Hat, Inc., and individual contributors -# as indicated by the @author tags. See the copyright.txt file 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. -# - -# Additional logger names to configure (root logger is always configured) -loggers=org.jboss.as.config - -# Dump system environment at boot by default -logger.org.jboss.as.config.level=DEBUG - -# Root logger level -logger.level=${jboss.boot.server.log.level:INFO} -# Root logger handlers -logger.handlers=FILE,CONSOLE - -# Console handler configuration -handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler -handler.CONSOLE.properties=autoFlush -handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO} -handler.CONSOLE.autoFlush=true -handler.CONSOLE.formatter=PATTERN - -# File handler configuration -handler.FILE=org.jboss.logmanager.handlers.FileHandler -handler.FILE.level=DEBUG -handler.FILE.properties=autoFlush,fileName -handler.FILE.autoFlush=true -handler.FILE.fileName=${org.jboss.boot.log.file:boot.log} -handler.FILE.formatter=PATTERN - -# Formatter pattern configuration -formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter -formatter.PATTERN.properties=pattern -formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/mgmt-users.properties b/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/mgmt-users.properties deleted file mode 100644 index 349b00434e..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/mgmt-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ManagementRealm' which is the default realm -# for new AS 7.1 installations. Further authentication mechanism can be configured -# as part of the in standalone.xml. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# By default the properties realm expects the entries to be in the format: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat - -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -admin=9d71b431e53d99563aa0dfca628c970b -andy=dfb16391f1be1c454b5bce9822bd9df3 diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/standalone-example.xml b/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/standalone-example.xml deleted file mode 100644 index 2081331d28..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-local/server/standalone/configuration/standalone-example.xml +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-rar.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - vm://localhost?brokerConfig=xbean:broker-config.xml - - - - testQueue - - - - testQueue - - - failover:(tcp://localhost:61616) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-local/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxLocalClientExample.java b/activemq-arquillian/javaee/mdb-cmt-tx-local/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxLocalClientExample.java deleted file mode 100644 index 0c9791f78a..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-local/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxLocalClientExample.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.MessageProducer; -import javax.jms.Queue; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.Context; -import javax.naming.InitialContext; -import java.util.Properties; - -/** - * @author Andy Taylor - */ -public class MDB_CMT_TxLocalClientExample -{ - public static void main(final String[] args) throws Exception - { - Connection connection = null; - InitialContext initialContext = null; - try - { - // Step 1. Create an initial context to perform the JNDI lookup. - final Properties env = new Properties(); - - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); - - env.put(Context.PROVIDER_URL, "remote://localhost:4447"); - - env.put(Context.SECURITY_PRINCIPAL, "guest"); - - env.put(Context.SECURITY_CREDENTIALS, "password"); - - initialContext = new InitialContext(env); - - // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("jms/queues/testQueue"); - - // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/jms/RemoteConnectionFactory"); - - // Step 4.Create a JMS Connection - connection = cf.createConnection("guest", "password"); - - // Step 5. Create a JMS Session - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // Step 6. Create a JMS Message Producer - MessageProducer producer = session.createProducer(queue); - - // Step 7. Create a Text Message - TextMessage message = session.createTextMessage("This is a text message"); - - System.out.println("Sent message: " + message.getText()); - - // Step 8. Send the Message - producer.send(message); - - // Step 9,,10, 11 and 12 in MDB_CMP_TxLocalExample - } - finally - { - // Step 13. Be sure to close our JMS resources! - if (initialContext != null) - { - initialContext.close(); - } - if (connection != null) - { - connection.close(); - } - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-local/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxLocalExample.java b/activemq-arquillian/javaee/mdb-cmt-tx-local/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxLocalExample.java deleted file mode 100644 index e61d70c5ee..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-local/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxLocalExample.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example.server; - -import javax.annotation.Resource; -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; -import javax.transaction.SystemException; -import javax.transaction.Transaction; -import javax.transaction.TransactionManager; - -import org.jboss.ejb3.annotation.ResourceAdapter; - -/** - * @author Andy Taylor - */ -@MessageDriven(name = "MDB_CMT_TxLocalExample", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"), - @ActivationConfigProperty(propertyName = "useLocalTx", propertyValue = "true") }) -@TransactionManagement(value = TransactionManagementType.CONTAINER) -@TransactionAttribute(value = TransactionAttributeType.NOT_SUPPORTED) -@ResourceAdapter("activemq-rar.rar") -public class MDB_CMT_TxLocalExample implements MessageListener -{ - @Resource(mappedName = "java:/TransactionManager") - private TransactionManager tm; - - public void onMessage(final Message message) - { - try - { - // Step 9. We know the client is sending a text message so we cast - TextMessage textMessage = (TextMessage)message; - - // Step 10. get the text from the message. - String text = textMessage.getText(); - - System.out.println("message " + text + " received"); - - if (!textMessage.getJMSRedelivered()) - { - // Step 11. On first delivery get the transaction, take a look, and throw an exception - Transaction tx = tm.getTransaction(); - - if (tx != null) - { - System.out.println("something is wrong, there should be no global transaction: " + tx); - } - else - { - System.out.println("there is no global transaction, altho the messge delivery is using a local transaction"); - System.out.println("lets throw an exception and see what happens"); - throw new RuntimeException("DOH!"); - } - } - else - { - // Step 12. Print the message - System.out.println("The message was redelivered since the message delivery used a local transaction"); - } - - } - catch (JMSException e) - { - e.printStackTrace(); - } - catch (SystemException e) - { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-local/src/test/java/org/hornetq/javaee/example/MDBCMTSetLocalTXRunnerTest.java b/activemq-arquillian/javaee/mdb-cmt-tx-local/src/test/java/org/hornetq/javaee/example/MDBCMTSetLocalTXRunnerTest.java deleted file mode 100644 index 7b2b4fc8c3..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-local/src/test/java/org/hornetq/javaee/example/MDBCMTSetLocalTXRunnerTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* -* JBoss, Home of Professional Open Source. -* Copyright 2010, Red Hat, Inc., and individual contributors -* as indicated by the @author tags. See the copyright.txt file 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.hornetq.javaee.example; - -import org.hornetq.javaee.example.server.MDB_CMT_TxLocalExample; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * @author Andy Taylor - * 5/21/12 - */ -@RunAsClient -@RunWith(Arquillian.class) -public class MDBCMTSetLocalTXRunnerTest -{ - @Deployment - public static Archive getDeployment() - { - - final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar"); - ejbJar.addClass(MDB_CMT_TxLocalExample.class); - System.out.println(ejbJar.toString(true)); - return ejbJar; - } - - @Test - public void runExample() throws Exception - { - MDB_CMT_TxLocalClientExample.main(null); - //give the example time to run - Thread.sleep(1000); - } - - -} diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-local/src/test/resources/arquillian.xml b/activemq-arquillian/javaee/mdb-cmt-tx-local/src/test/resources/arquillian.xml deleted file mode 100644 index ae8a732b7d..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-local/src/test/resources/arquillian.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ${basedir}/target/jbossas-node0 - -Djboss.inst=${basedir}/target/jbossas-node0 - standalone-example.xml - - true - ${node0:127.0.0.1} - ${as.managementPort:9999} - - - ${as.debug.port:8787} ${as.managementPort:9999} - 8 - - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/pom.xml b/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/pom.xml deleted file mode 100644 index 87380b5a17..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - 4.0.0 - - - org.apache.activemq - javaee - 5.9-SNAPSHOT - - - mdb-cmt-no-tx-example - jar - JEE MDB CMT Transaction Not Supported Example - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/application-roles.properties b/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/application-roles.properties deleted file mode 100644 index 0ade8fb88e..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/application-roles.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Properties declaration of users roles for the realm 'ApplicationRealm'. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, -guest=guest diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/application-users.properties b/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/application-users.properties deleted file mode 100644 index c52e923158..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/application-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm -# for application services on a new AS 7.1 installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this realm is as follows: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -guest=3437456520927d113b17d471d630e0d6 diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/logging.properties b/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/logging.properties deleted file mode 100644 index 8a011f0861..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/logging.properties +++ /dev/null @@ -1,52 +0,0 @@ -# -# JBoss, Home of Professional Open Source. -# Copyright 2010, Red Hat, Inc., and individual contributors -# as indicated by the @author tags. See the copyright.txt file 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. -# - -# Additional logger names to configure (root logger is always configured) -loggers=org.jboss.as.config - -# Dump system environment at boot by default -logger.org.jboss.as.config.level=DEBUG - -# Root logger level -logger.level=${jboss.boot.server.log.level:INFO} -# Root logger handlers -logger.handlers=FILE,CONSOLE - -# Console handler configuration -handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler -handler.CONSOLE.properties=autoFlush -handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO} -handler.CONSOLE.autoFlush=true -handler.CONSOLE.formatter=PATTERN - -# File handler configuration -handler.FILE=org.jboss.logmanager.handlers.FileHandler -handler.FILE.level=DEBUG -handler.FILE.properties=autoFlush,fileName -handler.FILE.autoFlush=true -handler.FILE.fileName=${org.jboss.boot.log.file:boot.log} -handler.FILE.formatter=PATTERN - -# Formatter pattern configuration -formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter -formatter.PATTERN.properties=pattern -formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/mgmt-users.properties b/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/mgmt-users.properties deleted file mode 100644 index 349b00434e..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/mgmt-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ManagementRealm' which is the default realm -# for new AS 7.1 installations. Further authentication mechanism can be configured -# as part of the in standalone.xml. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# By default the properties realm expects the entries to be in the format: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat - -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -admin=9d71b431e53d99563aa0dfca628c970b -andy=dfb16391f1be1c454b5bce9822bd9df3 diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/standalone-example.xml b/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/standalone-example.xml deleted file mode 100644 index ab8db8e6e0..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/server/standalone/configuration/standalone-example.xml +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-rar.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - vm://localhost?brokerConfig=xbean:broker-config.xml - - - - testQueue - - - - testQueue - - - failover:(tcp://localhost:61616) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxNotSupportedClientExample.java b/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxNotSupportedClientExample.java deleted file mode 100644 index 9f0201f443..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxNotSupportedClientExample.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.MessageProducer; -import javax.jms.Queue; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.Context; -import javax.naming.InitialContext; -import java.util.Properties; - -/** - * @author Andy Taylor - */ -public class MDB_CMT_TxNotSupportedClientExample -{ - public static void main(final String[] args) throws Exception - { - Connection connection = null; - InitialContext initialContext = null; - try - { - // Step 1. Create an initial context to perform the JNDI lookup. - final Properties env = new Properties(); - - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); - - env.put(Context.PROVIDER_URL, "remote://localhost:4447"); - - env.put(Context.SECURITY_PRINCIPAL, "guest"); - - env.put(Context.SECURITY_CREDENTIALS, "password"); - - initialContext = new InitialContext(env); - - // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("jms/queues/testQueue"); - - // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("jms/RemoteConnectionFactory"); - - // Step 4.Create a JMS Connection - connection = cf.createConnection("guest", "password"); - - // Step 5. Create a JMS Session - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // Step 6. Create a JMS Message Producer - MessageProducer producer = session.createProducer(queue); - - // Step 7. Create a Text Message - TextMessage message = session.createTextMessage("This is a text message"); - - System.out.println("Sent message: " + message.getText()); - - // Step 8. Send the Message - producer.send(message); - - // Step 9,10 and 11 in MDB_CMP_TxNotSupported - } - finally - { - // Step 12. Be sure to close our JMS resources! - if (initialContext != null) - { - initialContext.close(); - } - if (connection != null) - { - connection.close(); - } - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxNotSupported.java b/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxNotSupported.java deleted file mode 100644 index 8561d65415..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxNotSupported.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example.server; - -import javax.annotation.Resource; -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; -import javax.transaction.Transaction; -import javax.transaction.TransactionManager; - -import org.jboss.ejb3.annotation.ResourceAdapter; - -/** - * @author Andy Taylor - */ -@MessageDriven(name = "MDB_CMT_TxNotSupported", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"), - @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") }) -@TransactionManagement(value = TransactionManagementType.CONTAINER) -@TransactionAttribute(value = TransactionAttributeType.NOT_SUPPORTED) -@ResourceAdapter("activemq-rar.rar") -public class MDB_CMT_TxNotSupported implements MessageListener -{ - @Resource(mappedName = "java:/TransactionManager") - private TransactionManager tm; - - public void onMessage(final Message message) - { - try - { - // Step 9. We know the client is sending a text message so we cast - TextMessage textMessage = (TextMessage)message; - - // Step 10. get the text from the message. - String text = textMessage.getText(); - - System.out.println("message " + text + " received"); - - // Step 11. lets look at the transaction to make sure there isn't one. - Transaction tx = tm.getTransaction(); - - if (tx == null) - { - System.out.println("tx is null, just as expected"); - } - else - { - System.out.println("something is wrong, I wasn't expecting a transaction"); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/test/java/org/hornetq/javaee/example/MDBCMTSetTXNotSupportedRunnerTest.java b/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/test/java/org/hornetq/javaee/example/MDBCMTSetTXNotSupportedRunnerTest.java deleted file mode 100644 index 92399ea813..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/test/java/org/hornetq/javaee/example/MDBCMTSetTXNotSupportedRunnerTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* -* JBoss, Home of Professional Open Source. -* Copyright 2010, Red Hat, Inc., and individual contributors -* as indicated by the @author tags. See the copyright.txt file 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.hornetq.javaee.example; - -import org.hornetq.javaee.example.server.MDB_CMT_TxNotSupported; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * @author Andy Taylor - * 5/21/12 - */ -@RunAsClient -@RunWith(Arquillian.class) -public class MDBCMTSetTXNotSupportedRunnerTest -{ - @Deployment - public static Archive getDeployment() - { - - final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar"); - ejbJar.addClass(MDB_CMT_TxNotSupported.class); - System.out.println(ejbJar.toString(true)); - return ejbJar; - } - - @Test - public void runExample() throws Exception - { - MDB_CMT_TxNotSupportedClientExample.main(null); - //give the example time to run - Thread.sleep(1000); - } - - -} diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/test/resources/arquillian.xml b/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/test/resources/arquillian.xml deleted file mode 100644 index ae8a732b7d..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-not-supported/src/test/resources/arquillian.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ${basedir}/target/jbossas-node0 - -Djboss.inst=${basedir}/target/jbossas-node0 - standalone-example.xml - - true - ${node0:127.0.0.1} - ${as.managementPort:9999} - - - ${as.debug.port:8787} ${as.managementPort:9999} - 8 - - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-required/pom.xml b/activemq-arquillian/javaee/mdb-cmt-tx-required/pom.xml deleted file mode 100644 index a3942f806c..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-required/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - 4.0.0 - - - org.apache.activemq - javaee - 5.9-SNAPSHOT - - - jee-mdb-cmt-tx-example - jar - JEE MDB CMT Transaction Example - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/application-roles.properties b/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/application-roles.properties deleted file mode 100644 index 0ade8fb88e..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/application-roles.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Properties declaration of users roles for the realm 'ApplicationRealm'. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, -guest=guest diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/application-users.properties b/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/application-users.properties deleted file mode 100644 index c52e923158..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/application-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm -# for application services on a new AS 7.1 installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this realm is as follows: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -guest=3437456520927d113b17d471d630e0d6 diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/logging.properties b/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/logging.properties deleted file mode 100644 index 8a011f0861..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/logging.properties +++ /dev/null @@ -1,52 +0,0 @@ -# -# JBoss, Home of Professional Open Source. -# Copyright 2010, Red Hat, Inc., and individual contributors -# as indicated by the @author tags. See the copyright.txt file 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. -# - -# Additional logger names to configure (root logger is always configured) -loggers=org.jboss.as.config - -# Dump system environment at boot by default -logger.org.jboss.as.config.level=DEBUG - -# Root logger level -logger.level=${jboss.boot.server.log.level:INFO} -# Root logger handlers -logger.handlers=FILE,CONSOLE - -# Console handler configuration -handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler -handler.CONSOLE.properties=autoFlush -handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO} -handler.CONSOLE.autoFlush=true -handler.CONSOLE.formatter=PATTERN - -# File handler configuration -handler.FILE=org.jboss.logmanager.handlers.FileHandler -handler.FILE.level=DEBUG -handler.FILE.properties=autoFlush,fileName -handler.FILE.autoFlush=true -handler.FILE.fileName=${org.jboss.boot.log.file:boot.log} -handler.FILE.formatter=PATTERN - -# Formatter pattern configuration -formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter -formatter.PATTERN.properties=pattern -formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/mgmt-users.properties b/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/mgmt-users.properties deleted file mode 100644 index 349b00434e..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/mgmt-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ManagementRealm' which is the default realm -# for new AS 7.1 installations. Further authentication mechanism can be configured -# as part of the in standalone.xml. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# By default the properties realm expects the entries to be in the format: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat - -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -admin=9d71b431e53d99563aa0dfca628c970b -andy=dfb16391f1be1c454b5bce9822bd9df3 diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/standalone-example.xml b/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/standalone-example.xml deleted file mode 100644 index d61dfe645e..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-required/server/standalone/configuration/standalone-example.xml +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-rar.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - vm://localhost?brokerConfig=xbean:broker-config.xml - - - - testQueue - - - - testQueue - - - failover:(tcp://localhost:61616) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-required/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxRequiredClientExample.java b/activemq-arquillian/javaee/mdb-cmt-tx-required/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxRequiredClientExample.java deleted file mode 100644 index 2bcf08fc1c..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-required/src/main/java/org/hornetq/javaee/example/MDB_CMT_TxRequiredClientExample.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.MessageProducer; -import javax.jms.Queue; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.Context; -import javax.naming.InitialContext; -import java.util.Properties; - -/** - * @author Andy Taylor - */ -public class MDB_CMT_TxRequiredClientExample -{ - public static void main(final String[] args) throws Exception - { - Thread.sleep(5000); - Connection connection = null; - InitialContext initialContext = null; - try - { - // Step 1. Create an initial context to perform the JNDI lookup. - final Properties env = new Properties(); - - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); - - env.put(Context.PROVIDER_URL, "remote://localhost:4447"); - - env.put(Context.SECURITY_PRINCIPAL, "guest"); - - env.put(Context.SECURITY_CREDENTIALS, "password"); - - initialContext = new InitialContext(env); - - // Step 2. Perfom a lookup on the queue - Queue queue = (Queue)initialContext.lookup("jms/queues/testQueue"); - - // Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("jms/RemoteConnectionFactory"); - - // Step 4.Create a JMS Connection - connection = cf.createConnection("guest", "password"); - - // Step 5. Create a JMS Session - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // Step 6. Create a JMS Message Producer - MessageProducer producer = session.createProducer(queue); - TextMessage message = null; - - for (int i = 0; i < 100; i++) - { - // Step 7. Create a Text Message - message = session.createTextMessage("This is a text message"); - - System.out.println("Sent message: " + message.getText()); - // Step 8. Send the Message - producer.send(message); - } - - - // Step 9,10 and 11 in MDBExample - } - finally - { - // Step 12. Be sure to close our JMS resources! - if (initialContext != null) - { - initialContext.close(); - } - if (connection != null) - { - connection.close(); - } - } - } -} diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-required/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxRequiredExample.java b/activemq-arquillian/javaee/mdb-cmt-tx-required/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxRequiredExample.java deleted file mode 100644 index d802014242..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-required/src/main/java/org/hornetq/javaee/example/server/MDB_CMT_TxRequiredExample.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example.server; - -import javax.annotation.Resource; -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; -import javax.transaction.SystemException; -import javax.transaction.Transaction; -import javax.transaction.TransactionManager; - -import org.jboss.ejb3.annotation.ResourceAdapter; - -import java.util.Calendar; - -/** - * @author Andy Taylor - */ -@MessageDriven(name = "MDB_CMT_TxRequiredExample", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"), - @ActivationConfigProperty(propertyName = "consumerMaxRate", propertyValue = "1")}) -@TransactionManagement(value = TransactionManagementType.CONTAINER) -@TransactionAttribute(value = TransactionAttributeType.REQUIRED) -public class MDB_CMT_TxRequiredExample implements MessageListener -{ - - public void onMessage(final Message message) - { - try - { - // Step 9. We know the client is sending a text message so we cast - TextMessage textMessage = (TextMessage)message; - - // Step 10. get the text from the message. - String text = textMessage.getText(); - - Calendar c =Calendar.getInstance(); - - System.out.println("message " + text + " received at " + c.getTime()); - - } - catch (JMSException e) - { - e.printStackTrace(); - } - } -} diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-required/src/test/java/org/hornetq/javaee/examples/MDBCMTSetTXRequiredRunnerTest.java b/activemq-arquillian/javaee/mdb-cmt-tx-required/src/test/java/org/hornetq/javaee/examples/MDBCMTSetTXRequiredRunnerTest.java deleted file mode 100644 index 9b27d47fbd..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-required/src/test/java/org/hornetq/javaee/examples/MDBCMTSetTXRequiredRunnerTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* -* JBoss, Home of Professional Open Source. -* Copyright 2010, Red Hat, Inc., and individual contributors -* as indicated by the @author tags. See the copyright.txt file 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.hornetq.javaee.examples; - -import org.hornetq.javaee.example.MDB_CMT_TxRequiredClientExample; -import org.hornetq.javaee.example.server.MDB_CMT_TxRequiredExample; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * @author Andy Taylor - * 5/21/12 - */ -@RunAsClient -@RunWith(Arquillian.class) -public class MDBCMTSetTXRequiredRunnerTest -{ - @Deployment - public static Archive getDeployment() - { - - final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar"); - ejbJar.addClass(MDB_CMT_TxRequiredExample.class); - System.out.println(ejbJar.toString(true)); - return ejbJar; - } - - @Test - public void runExample() throws Exception - { - MDB_CMT_TxRequiredClientExample.main(null); - //give the example time to run - Thread.sleep(10000); - } - - -} diff --git a/activemq-arquillian/javaee/mdb-cmt-tx-required/src/test/resources/arquillian.xml b/activemq-arquillian/javaee/mdb-cmt-tx-required/src/test/resources/arquillian.xml deleted file mode 100644 index ae8a732b7d..0000000000 --- a/activemq-arquillian/javaee/mdb-cmt-tx-required/src/test/resources/arquillian.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ${basedir}/target/jbossas-node0 - -Djboss.inst=${basedir}/target/jbossas-node0 - standalone-example.xml - - true - ${node0:127.0.0.1} - ${as.managementPort:9999} - - - ${as.debug.port:8787} ${as.managementPort:9999} - 8 - - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-message-selector/pom.xml b/activemq-arquillian/javaee/mdb-message-selector/pom.xml deleted file mode 100644 index 6d2b273830..0000000000 --- a/activemq-arquillian/javaee/mdb-message-selector/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - 4.0.0 - - - org.apache.activemq - javaee - 5.9-SNAPSHOT - - - mdb-message-selector-example - jar - JEE MDB Message Selector Example - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/application-roles.properties b/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/application-roles.properties deleted file mode 100644 index 0ade8fb88e..0000000000 --- a/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/application-roles.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Properties declaration of users roles for the realm 'ApplicationRealm'. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, -guest=guest diff --git a/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/application-users.properties b/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/application-users.properties deleted file mode 100644 index c52e923158..0000000000 --- a/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/application-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm -# for application services on a new AS 7.1 installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this realm is as follows: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -guest=3437456520927d113b17d471d630e0d6 diff --git a/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/logging.properties b/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/logging.properties deleted file mode 100644 index 8a011f0861..0000000000 --- a/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/logging.properties +++ /dev/null @@ -1,52 +0,0 @@ -# -# JBoss, Home of Professional Open Source. -# Copyright 2010, Red Hat, Inc., and individual contributors -# as indicated by the @author tags. See the copyright.txt file 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. -# - -# Additional logger names to configure (root logger is always configured) -loggers=org.jboss.as.config - -# Dump system environment at boot by default -logger.org.jboss.as.config.level=DEBUG - -# Root logger level -logger.level=${jboss.boot.server.log.level:INFO} -# Root logger handlers -logger.handlers=FILE,CONSOLE - -# Console handler configuration -handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler -handler.CONSOLE.properties=autoFlush -handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO} -handler.CONSOLE.autoFlush=true -handler.CONSOLE.formatter=PATTERN - -# File handler configuration -handler.FILE=org.jboss.logmanager.handlers.FileHandler -handler.FILE.level=DEBUG -handler.FILE.properties=autoFlush,fileName -handler.FILE.autoFlush=true -handler.FILE.fileName=${org.jboss.boot.log.file:boot.log} -handler.FILE.formatter=PATTERN - -# Formatter pattern configuration -formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter -formatter.PATTERN.properties=pattern -formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n diff --git a/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/mgmt-users.properties b/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/mgmt-users.properties deleted file mode 100644 index 349b00434e..0000000000 --- a/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/mgmt-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ManagementRealm' which is the default realm -# for new AS 7.1 installations. Further authentication mechanism can be configured -# as part of the in standalone.xml. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# By default the properties realm expects the entries to be in the format: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat - -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -admin=9d71b431e53d99563aa0dfca628c970b -andy=dfb16391f1be1c454b5bce9822bd9df3 diff --git a/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/standalone-example.xml b/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/standalone-example.xml deleted file mode 100644 index d61dfe645e..0000000000 --- a/activemq-arquillian/javaee/mdb-message-selector/server/standalone/configuration/standalone-example.xml +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-rar.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - vm://localhost?brokerConfig=xbean:broker-config.xml - - - - testQueue - - - - testQueue - - - failover:(tcp://localhost:61616) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/mdb-message-selector/src/main/java/org/hornetq/javaee/example/MDBMessageSelectorClientExample.java b/activemq-arquillian/javaee/mdb-message-selector/src/main/java/org/hornetq/javaee/example/MDBMessageSelectorClientExample.java deleted file mode 100644 index 9469fbd9d5..0000000000 --- a/activemq-arquillian/javaee/mdb-message-selector/src/main/java/org/hornetq/javaee/example/MDBMessageSelectorClientExample.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.MessageProducer; -import javax.jms.Queue; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.Context; -import javax.naming.InitialContext; -import java.util.Properties; - -/** - * @author Andy Taylor - */ -public class MDBMessageSelectorClientExample -{ - public static void main(String[] args) throws Exception - { - Connection connection = null; - InitialContext initialContext = null; - try - { - //Step 1. Create an initial context to perform the JNDI lookup. - final Properties env = new Properties(); - - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); - - env.put(Context.PROVIDER_URL, "remote://localhost:4447"); - - env.put(Context.SECURITY_PRINCIPAL, "guest"); - - env.put(Context.SECURITY_CREDENTIALS, "password"); - - initialContext = new InitialContext(env); - - //Step 2. Perfom a lookup on the queue - Queue queue = (Queue) initialContext.lookup("jms/queues/testQueue"); - - //Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("jms/RemoteConnectionFactory"); - - //Step 4.Create a JMS Connection - connection = cf.createConnection("guest", "password"); - - //Step 5. Create a JMS Session - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - //Step 6. Create a JMS Message Producer - MessageProducer producer = session.createProducer(queue); - - //Step 7. Create a Text Message and set the color property to blue - TextMessage blueMessage = session.createTextMessage("This is a text message"); - - blueMessage.setStringProperty("color", "BLUE"); - - System.out.println("Sent message: " + blueMessage.getText() + " color=BLUE"); - - //Step 8. Send the Message - producer.send(blueMessage); - - //Step 9. create another message and set the color property to red - TextMessage redMessage = session.createTextMessage("This is a text message"); - - redMessage.setStringProperty("color", "RED"); - - System.out.println("Sent message: " + redMessage.getText() + " color=RED"); - - //Step 10. Send the Message - producer.send(redMessage); - //Step 10,11 and 12 in MDBMessageSelectorExample - } - finally - { - //Step 13. Be sure to close our JMS resources! - if (initialContext != null) - { - initialContext.close(); - } - if(connection != null) - { - connection.close(); - } - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-message-selector/src/main/java/org/hornetq/javaee/example/server/MDBMessageSelectorExample.java b/activemq-arquillian/javaee/mdb-message-selector/src/main/java/org/hornetq/javaee/example/server/MDBMessageSelectorExample.java deleted file mode 100644 index 871e89c5f9..0000000000 --- a/activemq-arquillian/javaee/mdb-message-selector/src/main/java/org/hornetq/javaee/example/server/MDBMessageSelectorExample.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example.server; - -import org.jboss.ejb3.annotation.ResourceAdapter; - -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; - -/** - * @author Andy Taylor - */ -@MessageDriven(name = "MDBMessageSelectorExample", - activationConfig = - { - @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"), - @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "color = 'RED'") - }) -@TransactionManagement(value= TransactionManagementType.CONTAINER) -@TransactionAttribute(value= TransactionAttributeType.REQUIRED) -@ResourceAdapter("activemq-rar.rar") -public class MDBMessageSelectorExample implements MessageListener -{ - public void onMessage(Message message) - { - try - { - //Step 11. We know the client is sending a text message so we cast - TextMessage textMessage = (TextMessage)message; - - //Step 12. get the text from the message. - String text = textMessage.getText(); - - //Step 13. We check we received the right color of message - String color = textMessage.getStringProperty("color"); - - System.out.println("message " + text + " received color=" + color); - - } - catch (Exception e) - { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-message-selector/src/test/java/org/hornetq/javaee/examples/MDBCMTSetMessageSelectorRunnerTest.java b/activemq-arquillian/javaee/mdb-message-selector/src/test/java/org/hornetq/javaee/examples/MDBCMTSetMessageSelectorRunnerTest.java deleted file mode 100644 index 5d24816f21..0000000000 --- a/activemq-arquillian/javaee/mdb-message-selector/src/test/java/org/hornetq/javaee/examples/MDBCMTSetMessageSelectorRunnerTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* -* JBoss, Home of Professional Open Source. -* Copyright 2010, Red Hat, Inc., and individual contributors -* as indicated by the @author tags. See the copyright.txt file 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.hornetq.javaee.examples; - -import org.hornetq.javaee.example.MDBMessageSelectorClientExample; -import org.hornetq.javaee.example.server.MDBMessageSelectorExample; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * @author Andy Taylor - * 5/21/12 - */ -@RunAsClient -@RunWith(Arquillian.class) -public class MDBCMTSetMessageSelectorRunnerTest -{ - @Deployment - public static Archive getDeployment() - { - - final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar"); - ejbJar.addClass(MDBMessageSelectorExample.class); - System.out.println(ejbJar.toString(true)); - return ejbJar; - } - - @Test - public void runExample() throws Exception - { - MDBMessageSelectorClientExample.main(null); - //give the example time to run - Thread.sleep(1000); - } - - -} diff --git a/activemq-arquillian/javaee/mdb-message-selector/src/test/resources/arquillian.xml b/activemq-arquillian/javaee/mdb-message-selector/src/test/resources/arquillian.xml deleted file mode 100644 index ae8a732b7d..0000000000 --- a/activemq-arquillian/javaee/mdb-message-selector/src/test/resources/arquillian.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ${basedir}/target/jbossas-node0 - -Djboss.inst=${basedir}/target/jbossas-node0 - standalone-example.xml - - true - ${node0:127.0.0.1} - ${as.managementPort:9999} - - - ${as.debug.port:8787} ${as.managementPort:9999} - 8 - - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-tx-send/pom.xml b/activemq-arquillian/javaee/mdb-tx-send/pom.xml deleted file mode 100644 index a081101697..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - 4.0.0 - - - org.apache.activemq - javaee - 5.9-SNAPSHOT - - - mdb-tx-send-example - jar - JEE MDB Transactional Send Example - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-tx-send/server/hornetq-configuration.xml b/activemq-arquillian/javaee/mdb-tx-send/server/hornetq-configuration.xml deleted file mode 100644 index 567c63a96e..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/server/hornetq-configuration.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - HornetQ.main.config - - - ${jboss.server.data.dir}/messaging/bindings - - ${jboss.server.data.dir}/messaging/journal - - ${jboss.server.data.dir}/messaging/largemessages - - ${jboss.server.data.dir}/messaging/paging - - - - - org.hornetq.core.remoting.impl.netty.NettyConnectorFactory - - - - - - org.hornetq.core.remoting.impl.invm.InVMConnectorFactory - - - - - - - - - org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory - - - - - - org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory - - - - - - - - - - - - - - - - - - jms.queue.DLQ - jms.queue.ExpiryQueue - 0 - -1 - 10485760 - 10 - - - - - diff --git a/activemq-arquillian/javaee/mdb-tx-send/server/hornetq-jms.xml b/activemq-arquillian/javaee/mdb-tx-send/server/hornetq-jms.xml deleted file mode 100644 index 5bf7e4a183..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/server/hornetq-jms.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/application-roles.properties b/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/application-roles.properties deleted file mode 100644 index 0ade8fb88e..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/application-roles.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Properties declaration of users roles for the realm 'ApplicationRealm'. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this file is as follows: - -# username=role1,role2,role3 -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined. -# -#admin=PowerUser,BillingAdmin, -guest=guest diff --git a/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/application-users.properties b/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/application-users.properties deleted file mode 100644 index c52e923158..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/application-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm -# for application services on a new AS 7.1 installation. -# -# This includes the following protocols: remote ejb, remote jndi, web, remote jms -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# The format of this realm is as follows: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat -# -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -guest=3437456520927d113b17d471d630e0d6 diff --git a/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/logging.properties b/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/logging.properties deleted file mode 100644 index 8a011f0861..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/logging.properties +++ /dev/null @@ -1,52 +0,0 @@ -# -# JBoss, Home of Professional Open Source. -# Copyright 2010, Red Hat, Inc., and individual contributors -# as indicated by the @author tags. See the copyright.txt file 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. -# - -# Additional logger names to configure (root logger is always configured) -loggers=org.jboss.as.config - -# Dump system environment at boot by default -logger.org.jboss.as.config.level=DEBUG - -# Root logger level -logger.level=${jboss.boot.server.log.level:INFO} -# Root logger handlers -logger.handlers=FILE,CONSOLE - -# Console handler configuration -handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler -handler.CONSOLE.properties=autoFlush -handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO} -handler.CONSOLE.autoFlush=true -handler.CONSOLE.formatter=PATTERN - -# File handler configuration -handler.FILE=org.jboss.logmanager.handlers.FileHandler -handler.FILE.level=DEBUG -handler.FILE.properties=autoFlush,fileName -handler.FILE.autoFlush=true -handler.FILE.fileName=${org.jboss.boot.log.file:boot.log} -handler.FILE.formatter=PATTERN - -# Formatter pattern configuration -formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter -formatter.PATTERN.properties=pattern -formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n diff --git a/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/mgmt-users.properties b/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/mgmt-users.properties deleted file mode 100644 index 349b00434e..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/mgmt-users.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Properties declaration of users for the realm 'ManagementRealm' which is the default realm -# for new AS 7.1 installations. Further authentication mechanism can be configured -# as part of the in standalone.xml. -# -# Users can be added to this properties file at any time, updates after the server has started -# will be automatically detected. -# -# By default the properties realm expects the entries to be in the format: - -# username=HEX( MD5( username ':' realm ':' password)) -# -# A utility script is provided which can be executed from the bin folder to add the users: - -# - Linux -# bin/add-user.sh -# -# - Windows -# bin\add-user.bat - -# The following illustrates how an admin user could be defined, this -# is for illustration only and does not correspond to a usable password. -# -#admin=2a0923285184943425d1f53ddd58ec7a -admin=9d71b431e53d99563aa0dfca628c970b -andy=dfb16391f1be1c454b5bce9822bd9df3 diff --git a/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/standalone-example.xml b/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/standalone-example.xml deleted file mode 100644 index 1cedad8395..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/server/standalone/configuration/standalone-example.xml +++ /dev/null @@ -1,466 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - activemq-rar.rar - - XATransaction - - false - - - defaultPassword - - - defaultUser - - - vm://localhost?brokerConfig=xbean:broker-config.xml - - - - - 1 - 20 - - - - - - - testQueue - - - replyQueue - - - - testQueue - - - replyQueue - - - failover:(tcp://localhost:61616) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/activemq-arquillian/javaee/mdb-tx-send/src/main/java/org/hornetq/javaee/example/MDBMessageSendTxClientExample.java b/activemq-arquillian/javaee/mdb-tx-send/src/main/java/org/hornetq/javaee/example/MDBMessageSendTxClientExample.java deleted file mode 100644 index 35441f9d01..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/src/main/java/org/hornetq/javaee/example/MDBMessageSendTxClientExample.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.MessageConsumer; -import javax.jms.MessageProducer; -import javax.jms.Queue; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.Context; -import javax.naming.InitialContext; -import java.util.Properties; - -/** - * @author Andy Taylor - */ -public class MDBMessageSendTxClientExample -{ - public static void main(String[] args) throws Exception - { - Connection connection = null; - InitialContext initialContext = null; - try - { - //Step 1. Create an initial context to perform the JNDI lookup. - final Properties env = new Properties(); - - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); - - env.put(Context.PROVIDER_URL, "remote://localhost:4447"); - - env.put(Context.SECURITY_PRINCIPAL, "guest"); - - env.put(Context.SECURITY_CREDENTIALS, "password"); - - initialContext = new InitialContext(env); - - - //Step 2. Perfom a lookup on the queue - Queue queue = (Queue) initialContext.lookup("jms/queues/testQueue"); - - //Step 3. Perform a lookup on the Connection Factory - ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("jms/RemoteConnectionFactory"); - - //Step 4.Create a JMS Connection - connection = cf.createConnection("guest", "password"); - - //Step 5. Create a JMS Session - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - //Step 6. Create a JMS Message Producer - MessageProducer producer = session.createProducer(queue); - - //Step 7. Create a Text Message - TextMessage message = session.createTextMessage("This is a text message"); - - System.out.println("Sent message: " + message.getText()); - - //Step 8. Send the Message - producer.send(message); - - //Step 15. We lookup the reply queue - queue = (Queue) initialContext.lookup("jms/queues/replyQueue"); - - //Step 16. We create a JMS message consumer - MessageConsumer messageConsumer = session.createConsumer(queue); - - //Step 17. We start the connedction so we can receive messages - connection.start(); - - //Step 18. We receive the message and print it out - message = (TextMessage) messageConsumer.receive(5000); - - System.out.println("message.getText() = " + message.getText()); - - } - finally - { - //Step 19. Be sure to close our JMS resources! - if (initialContext != null) - { - initialContext.close(); - } - if(connection != null) - { - connection.close(); - } - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-tx-send/src/main/java/org/hornetq/javaee/example/server/MDBMessageSendTxExample.java b/activemq-arquillian/javaee/mdb-tx-send/src/main/java/org/hornetq/javaee/example/server/MDBMessageSendTxExample.java deleted file mode 100644 index b5a0fc6903..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/src/main/java/org/hornetq/javaee/example/server/MDBMessageSendTxExample.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2009 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.javaee.example.server; - -import org.jboss.ejb3.annotation.ResourceAdapter; - -import javax.annotation.Resource; -import javax.ejb.ActivationConfigProperty; -import javax.ejb.MessageDriven; -import javax.ejb.TransactionAttribute; -import javax.ejb.TransactionAttributeType; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.MessageProducer; -import javax.jms.Queue; -import javax.jms.Session; -import javax.jms.TextMessage; - -/** - * @author Andy Taylor - */ -@MessageDriven(name = "MDBMessageSendTxExample", - activationConfig = - { - @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @ActivationConfigProperty(propertyName = "useJndi", propertyValue = "true"), - @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue") - }) -@TransactionManagement(value= TransactionManagementType.CONTAINER) -@TransactionAttribute(value= TransactionAttributeType.REQUIRED) -@ResourceAdapter("activemq-rar.rar") -public class MDBMessageSendTxExample implements MessageListener -{ - @Resource(mappedName = "java:/JmsXA") - ConnectionFactory connectionFactory; - - @Resource(mappedName = "java:/queue/replyQueue") - Queue replyQueue; - - public void onMessage(Message message) - { - Connection conn = null; - try - { - //Step 9. We know the client is sending a text message so we cast - TextMessage textMessage = (TextMessage)message; - - //Step 10. get the text from the message. - String text = textMessage.getText(); - - System.out.println("message " + text); - - //Step 11. we create a JMS connection - conn = connectionFactory.createConnection(); - - //Step 12. We create a JMS session - Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - - //Step 13. we create a producer for the reply queue - MessageProducer producer = sess.createProducer(replyQueue); - - //Step 14. we create a message and send it - producer.send(sess.createTextMessage("this is a reply")); - - } - catch (Exception e) - { - e.printStackTrace(); - } - finally - { - if(conn != null) - { - try - { - conn.close(); - } - catch (JMSException e) - { - } - } - } - } -} \ No newline at end of file diff --git a/activemq-arquillian/javaee/mdb-tx-send/src/test/java/org/hornetq/javaee/examples/MDBCMTTxSendRunnerTest.java b/activemq-arquillian/javaee/mdb-tx-send/src/test/java/org/hornetq/javaee/examples/MDBCMTTxSendRunnerTest.java deleted file mode 100644 index 4ad9a14592..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/src/test/java/org/hornetq/javaee/examples/MDBCMTTxSendRunnerTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* -* JBoss, Home of Professional Open Source. -* Copyright 2010, Red Hat, Inc., and individual contributors -* as indicated by the @author tags. See the copyright.txt file 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.hornetq.javaee.examples; - -import org.hornetq.javaee.example.MDBMessageSendTxClientExample; -import org.hornetq.javaee.example.server.MDBMessageSendTxExample; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.junit.Arquillian; -//import org.jboss.osgi.testing.ManifestBuilder; -import org.jboss.osgi.metadata.ManifestBuilder; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.Asset; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.Test; -import org.junit.runner.RunWith; - -import java.io.InputStream; - -/** - * @author Andy Taylor - * 5/21/12 - */ -@RunAsClient -@RunWith(Arquillian.class) -public class MDBCMTTxSendRunnerTest -{ - @Deployment - public static Archive getDeployment() - { - - final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar"); - ejbJar.addClass(MDBMessageSendTxExample.class); // Generate the manifest with it's dependencies - ejbJar.setManifest(new Asset() - { - public InputStream openStream() - { - ManifestBuilder builder = ManifestBuilder.newInstance(); - StringBuffer dependencies = new StringBuffer(); - dependencies.append("org.jboss.as.naming"); - builder.addManifestHeader("Dependencies", dependencies.toString()); - return builder.openStream(); - } - }); - System.out.println(ejbJar.toString(true)); - return ejbJar; - } - - @Test - public void runExample() throws Exception - { - MDBMessageSendTxClientExample.main(null); - } - - -} diff --git a/activemq-arquillian/javaee/mdb-tx-send/src/test/resources/arquillian.xml b/activemq-arquillian/javaee/mdb-tx-send/src/test/resources/arquillian.xml deleted file mode 100644 index ae8a732b7d..0000000000 --- a/activemq-arquillian/javaee/mdb-tx-send/src/test/resources/arquillian.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ${basedir}/target/jbossas-node0 - -Djboss.inst=${basedir}/target/jbossas-node0 - standalone-example.xml - - true - ${node0:127.0.0.1} - ${as.managementPort:9999} - - - ${as.debug.port:8787} ${as.managementPort:9999} - 8 - - - - - - - \ No newline at end of file diff --git a/activemq-arquillian/javaee/pom.xml b/activemq-arquillian/javaee/pom.xml deleted file mode 100644 index 5827ceffc8..0000000000 --- a/activemq-arquillian/javaee/pom.xml +++ /dev/null @@ -1,155 +0,0 @@ - - 4.0.0 - - - org.apache.activemq - activemq-arquillian - 5.9-SNAPSHOT - - - org.apache.activemq - javaee - pom - JEE Examples - - - UTF-8 - - ${pom.basedir}${file.separator}..${file.separator}..${file.separator}ee-install${file.separator}target${file.separator}${container-version} - - - - - jca-config - jca-remote - mdb-bmt - mdb-cmt-setrollbackonly - mdb-cmt-tx-local - mdb-cmt-tx-not-supported - mdb-cmt-tx-required - mdb-message-selector - mdb-tx-send - - - - - - org.jboss.arquillian - arquillian-bom - 1.0.0.Final - import - pom - - - - - - org.jboss.arquillian.junit - arquillian-junit-container - - - org.jboss.spec - jboss-javaee-6.0 - 1.0.0.Final - pom - provided - - - junit - junit - 4.8.1 - test - - - org.apache.activemq - activemq-client - ${project.version} - - - org.apache.activemq - activemq-rar - ${project.version} - rar - - - org.jboss.ejb3 - jboss-ejb3-ext-api - 2.0.0-beta-2 - - - - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - - as-node-0 - true - generate-test-resources - - copy-resources - - - ${basedir}/target/jbossas-node0 - true - - - ${ee.install.home} - - standalone/data - standalone/log - standalone/tmp - - - - ${basedir}/server - - - - - - - - - - - - eap - - - org.jboss.as - jboss-as-arquillian-container-managed - ${arquillian-version} - test - - - - - wildfly - - - - org.wildfly - wildfly-arquillian-container-managed - ${container-version} - test - - - - - - diff --git a/activemq-arquillian/pom.xml b/activemq-arquillian/pom.xml deleted file mode 100644 index 5bad8548db..0000000000 --- a/activemq-arquillian/pom.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - 4.0.0 - - - org.apache.activemq - activemq-parent - 5.9-SNAPSHOT - - - activemq-arquillian - pom - ActiveMQ :: Arquillian - Container unit tests - - - - - - 7.2.0.Final - - - - ee-install - javaee - - - - - - org.apache.activemq.tooling - activemq-maven-plugin - ${project.version} - - false - - - org.apache.activemq.default.directory.prefix - ./target/ - - - log4j.configuration - file:///${project.basedir}/src/main/resources/log4j.properties - - - - - - - - - - - - eap - - jboss-eap-6.1 - - - - wildfly - - - 8.0.0.Alpha1 - - - - - - - jboss-eap-repository - JBoss EAP Maven Repository - https://repository.jboss.org/nexus/content/groups/public/ - default - - true - never - - - false - never - - - - - diff --git a/activemq-arquillian/src/main/resources/log4j.properties b/activemq-arquillian/src/main/resources/log4j.properties deleted file mode 100755 index ac16f96b15..0000000000 --- a/activemq-arquillian/src/main/resources/log4j.properties +++ /dev/null @@ -1,43 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# -# The logging properties used during tests.. -# -log4j.rootLogger=TRACE, out, stdout - -#log4j.logger.org.apache.activemq.broker.scheduler=DEBUG -#log4j.logger.org.apache.activemq.network.DemandForwardingBridgeSupport=DEBUG -#log4j.logger.org.apache.activemq.transport.failover=TRACE -#log4j.logger.org.apache.activemq.store.jdbc=TRACE -#log4j.logger.org.apache.activemq.store.kahadb=TRACE -#log4j.logger.org.apache.activemq.broker.region.cursors.AbstractStoreCursor=DEBUG -#log4j.logger.org.apache.activemq.store.jdbc.JDBCMessageStore=DEBUG - -# CONSOLE appender not used by default -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n -#log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %-10.10X{activemq.broker} %-20.20X{activemq.connector} %-10.10X{activemq.destination} - %m%n - -# File appender -log4j.appender.out=org.apache.log4j.FileAppender -log4j.appender.out.layout=org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n -#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %-10.10X{activemq.broker} %-20.20X{activemq.connector} %-10.10X{activemq.destination} - %m%n -log4j.appender.out.file=target/activemq-test.log -log4j.appender.out.append=true