[hornetq-commits] JBoss hornetq SVN: r8031 - in trunk: docs/user-manual/en and 11 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Oct 2 08:06:29 EDT 2009


Author: ataylor
Date: 2009-10-02 08:06:29 -0400 (Fri, 02 Oct 2009)
New Revision: 8031

Modified:
   trunk/docs/user-manual/en/appserver-integration.xml
   trunk/examples/javaee/jca-config/server2/jms-remote-ds.xml
   trunk/examples/javaee/mdb-bmt/src/org/hornetq/javaee/example/server/MDB_BMTExample.java
   trunk/examples/javaee/mdb-cmt-setrollbackonly/src/org/hornetq/javaee/example/server/MDB_CMT_SetRollbackOnlyExample.java
   trunk/examples/javaee/mdb-cmt-tx-local/src/org/hornetq/javaee/example/server/MDB_CMT_TxLocalExample.java
   trunk/examples/javaee/mdb-cmt-tx-not-supported/src/org/hornetq/javaee/example/server/MDB_CMT_TxNotSupported.java
   trunk/examples/javaee/mdb-cmt-tx-required/src/org/hornetq/javaee/example/server/MDB_CMT_TxRequiredExample.java
   trunk/examples/javaee/mdb-message-selector/src/org/hornetq/javaee/example/server/MDBMessageSelectorExample.java
   trunk/examples/javaee/mdb-tx-send/src/org/hornetq/javaee/example/server/MDBMessageSendTxExample.java
   trunk/hornetq.ipr
   trunk/pom.xml
   trunk/src/config/jboss-as/build.xml
   trunk/src/config/jboss-as/clustered/jms-ds.xml
   trunk/src/config/jboss-as/non-clustered/jms-ds.xml
Log:
https://jira.jboss.org/jira/browse/HORNETQ-159 - changed jms-ra.rar to be called hornetq-ra.rar and added dependencies to support ResourceAdapater tag.

Modified: trunk/docs/user-manual/en/appserver-integration.xml
===================================================================
--- trunk/docs/user-manual/en/appserver-integration.xml	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/docs/user-manual/en/appserver-integration.xml	2009-10-02 12:06:29 UTC (rev 8031)
@@ -43,6 +43,7 @@
                         @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
                         @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue")
                      })
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDBExample implements MessageListener
 {
    public void onMessage(Message message)...
@@ -50,6 +51,22 @@
         <para>In this example you can see that the MDB will consume messages from a queue that is
             mapped into JNDI with the binding <literal>queue/testQueue</literal>. This queue must be
             preconfigured in the usual way using the HornetQ configuration files.</para>
+        <para>The <literal>ResourceAdapter</literal> annotation is used to specify which ra adapter
+            should be used. To use this you will need to import <literal
+                >org.jboss.ejb3.annotation.ResourceAdapter</literal> which can be found in the
+                <literal>jboss-ejb3-ext-api.jar</literal> which can be found in the jboss
+            repository. Alternatively you can add use a deployment descriptor and add something like
+            the following to <literal
+            >jboss.xml</literal><programlisting>&lt;message-driven>
+   &lt;ejb-name>ExampleMDB&lt;/ejb-name>
+   &lt;resource-adapter-name>quartz-ra.rar&lt;/resource-adapter-name>
+&lt;/message-driven>
+</programlisting>You
+            can also rename the hornetq-ra.rar directory to jms-ra.rar and neither the annotation or
+            the extra descriptor information will be needed. If you do this you will need to edit
+            the <literal>jms-ds.xml</literal> datasource file and change <literal>rar-name</literal>
+            element.</para>
+        <para>All the examples shipped with the HornetQ distribution use the annotation.</para>
         <section>
             <title>Using Container Managed Transactions</title>
             <para>When an MDB is using Container Managed Transactions (CMT), the delivery of the
@@ -66,6 +83,7 @@
                      })
 @TransactionManagement(value= TransactionManagementType.CONTAINER)
 @TransactionAttribute(value= TransactionAttributeType.REQUIRED)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDB_CMP_TxRequiredExample implements MessageListener
 {
    public void onMessage(Message message)...
@@ -108,6 +126,7 @@
                      })
 @TransactionManagement(value = TransactionManagementType.CONTAINER)
 @TransactionAttribute(value = TransactionAttributeType.NOT_SUPPORTED)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDB_CMP_TxLocalExample implements MessageListener
 {
    public void onMessage(Message message)...
@@ -126,6 +145,7 @@
                         @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Dups-ok-acknowledge")
                      })
 @TransactionManagement(value= TransactionManagementType.BEAN)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDB_BMPExample implements MessageListener
 {
    public void onMessage(Message message)
@@ -177,6 +197,7 @@
                      })
 @TransactionManagement(value= TransactionManagementType.CONTAINER)
 @TransactionAttribute(value= TransactionAttributeType.REQUIRED)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDBMessageSelectorExample implements MessageListener
 {
    public void onMessage(Message message)....
@@ -201,6 +222,7 @@
                      })
 @TransactionManagement(value= TransactionManagementType.CONTAINER)
 @TransactionAttribute(value= TransactionAttributeType.REQUIRED)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDBMessageSendTxExample implements MessageListener
 {
    @Resource(mappedName = "java:JmsXA")
@@ -637,15 +659,14 @@
             as either the source or target server. Or could be on a third, separate JBoss AS
             instance.</para>
         <para>The bridge can also be used to bridge messages from other non HornetQ JMS servers, as
-            long as they are JMS 1.1 compliant.<note>
-                <para>Don't confuse a JMS bridge with a core bridge. A JMS bridge can be used to
-                    bridge any two JMS 1.1 compliant JMS providers and uses the JMS API. A core
-                    bridge (described in <xref linkend="core-bridges"/>) is used to bridge any two
-                    HornetQ instances and uses the core API. Always use a core bridge if you can in
-                    preference to a JMS bridge. The core bridge will typically provide better
-                    performance than a JMS bridge. Also the core bridge can provide <emphasis>once
-                        and only once</emphasis> delivery guarantees without using XA.</para>
-            </note></para>
+            long as they are JMS 1.1 compliant.<note><para>Don't confuse a JMS bridge with a core
+                    bridge. A JMS bridge can be used to bridge any two JMS 1.1 compliant JMS
+                    providers and uses the JMS API. A core bridge (described in <xref
+                        linkend="core-bridges"/>) is used to bridge any two HornetQ instances and
+                    uses the core API. Always use a core bridge if you can in preference to a JMS
+                    bridge. The core bridge will typically provide better performance than a JMS
+                    bridge. Also the core bridge can provide <emphasis>once and only once</emphasis>
+                    delivery guarantees without using XA.</para></note></para>
         <para>The bridge has built-in resilience to failure so if the source or target server
             connection is lost, e.g. due to network failure, the bridge will retry connecting to the
             source and/or target until they come back online. When it comes back online it will

Modified: trunk/examples/javaee/jca-config/server2/jms-remote-ds.xml
===================================================================
--- trunk/examples/javaee/jca-config/server2/jms-remote-ds.xml	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/examples/javaee/jca-config/server2/jms-remote-ds.xml	2009-10-02 12:06:29 UTC (rev 8031)
@@ -12,7 +12,7 @@
    <tx-connection-factory>
       <jndi-name>RemoteJmsXA</jndi-name>
       <xa-transaction/>
-      <rar-name>jms-ra.rar</rar-name>
+      <rar-name>hornetq-ra.rar</rar-name>
       <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
       <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
       <config-property name="ConnectorClassName" type="java.lang.String">org.hornetq.integration.transports.netty.NettyConnectorFactory</config-property>

Modified: trunk/examples/javaee/mdb-bmt/src/org/hornetq/javaee/example/server/MDB_BMTExample.java
===================================================================
--- trunk/examples/javaee/mdb-bmt/src/org/hornetq/javaee/example/server/MDB_BMTExample.java	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/examples/javaee/mdb-bmt/src/org/hornetq/javaee/example/server/MDB_BMTExample.java	2009-10-02 12:06:29 UTC (rev 8031)
@@ -12,6 +12,8 @@
  */
 package org.hornetq.javaee.example.server;
 
+import org.jboss.ejb3.annotation.ResourceAdapter;
+
 import javax.annotation.Resource;
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
@@ -34,6 +36,7 @@
                         @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Dups-ok-acknowledge")
                      })
 @TransactionManagement(value= TransactionManagementType.BEAN)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDB_BMTExample implements MessageListener
 {
    @Resource

Modified: trunk/examples/javaee/mdb-cmt-setrollbackonly/src/org/hornetq/javaee/example/server/MDB_CMT_SetRollbackOnlyExample.java
===================================================================
--- trunk/examples/javaee/mdb-cmt-setrollbackonly/src/org/hornetq/javaee/example/server/MDB_CMT_SetRollbackOnlyExample.java	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/examples/javaee/mdb-cmt-setrollbackonly/src/org/hornetq/javaee/example/server/MDB_CMT_SetRollbackOnlyExample.java	2009-10-02 12:06:29 UTC (rev 8031)
@@ -12,6 +12,8 @@
  */
 package org.hornetq.javaee.example.server;
 
+import org.jboss.ejb3.annotation.ResourceAdapter;
+
 import javax.annotation.Resource;
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
@@ -36,6 +38,7 @@
                      })
 @TransactionManagement(value= TransactionManagementType.CONTAINER)
 @TransactionAttribute(value= TransactionAttributeType.REQUIRED)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDB_CMT_SetRollbackOnlyExample implements MessageListener
 {
    @Resource

Modified: trunk/examples/javaee/mdb-cmt-tx-local/src/org/hornetq/javaee/example/server/MDB_CMT_TxLocalExample.java
===================================================================
--- trunk/examples/javaee/mdb-cmt-tx-local/src/org/hornetq/javaee/example/server/MDB_CMT_TxLocalExample.java	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/examples/javaee/mdb-cmt-tx-local/src/org/hornetq/javaee/example/server/MDB_CMT_TxLocalExample.java	2009-10-02 12:06:29 UTC (rev 8031)
@@ -12,6 +12,8 @@
  */
 package org.hornetq.javaee.example.server;
 
+import org.jboss.ejb3.annotation.ResourceAdapter;
+
 import javax.annotation.Resource;
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
@@ -39,6 +41,7 @@
                      })
 @TransactionManagement(value = TransactionManagementType.CONTAINER)
 @TransactionAttribute(value = TransactionAttributeType.NOT_SUPPORTED)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDB_CMT_TxLocalExample implements MessageListener
 {
    @Resource(mappedName = "java:/TransactionManager")

Modified: trunk/examples/javaee/mdb-cmt-tx-not-supported/src/org/hornetq/javaee/example/server/MDB_CMT_TxNotSupported.java
===================================================================
--- trunk/examples/javaee/mdb-cmt-tx-not-supported/src/org/hornetq/javaee/example/server/MDB_CMT_TxNotSupported.java	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/examples/javaee/mdb-cmt-tx-not-supported/src/org/hornetq/javaee/example/server/MDB_CMT_TxNotSupported.java	2009-10-02 12:06:29 UTC (rev 8031)
@@ -12,6 +12,8 @@
  */
 package org.hornetq.javaee.example.server;
 
+import org.jboss.ejb3.annotation.ResourceAdapter;
+
 import javax.annotation.Resource;
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
@@ -37,6 +39,7 @@
                      })
 @TransactionManagement(value= TransactionManagementType.CONTAINER)
 @TransactionAttribute(value= TransactionAttributeType.NOT_SUPPORTED)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDB_CMT_TxNotSupported implements MessageListener
 {
    @Resource(mappedName = "java:/TransactionManager")

Modified: trunk/examples/javaee/mdb-cmt-tx-required/src/org/hornetq/javaee/example/server/MDB_CMT_TxRequiredExample.java
===================================================================
--- trunk/examples/javaee/mdb-cmt-tx-required/src/org/hornetq/javaee/example/server/MDB_CMT_TxRequiredExample.java	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/examples/javaee/mdb-cmt-tx-required/src/org/hornetq/javaee/example/server/MDB_CMT_TxRequiredExample.java	2009-10-02 12:06:29 UTC (rev 8031)
@@ -12,6 +12,8 @@
  */
 package org.hornetq.javaee.example.server;
 
+import org.jboss.ejb3.annotation.ResourceAdapter;
+
 import javax.annotation.Resource;
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
@@ -38,6 +40,7 @@
                      })
 @TransactionManagement(value= TransactionManagementType.CONTAINER)
 @TransactionAttribute(value= TransactionAttributeType.REQUIRED)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDB_CMT_TxRequiredExample implements MessageListener
 {
    @Resource(mappedName = "java:/TransactionManager")

Modified: trunk/examples/javaee/mdb-message-selector/src/org/hornetq/javaee/example/server/MDBMessageSelectorExample.java
===================================================================
--- trunk/examples/javaee/mdb-message-selector/src/org/hornetq/javaee/example/server/MDBMessageSelectorExample.java	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/examples/javaee/mdb-message-selector/src/org/hornetq/javaee/example/server/MDBMessageSelectorExample.java	2009-10-02 12:06:29 UTC (rev 8031)
@@ -12,6 +12,8 @@
  */
 package org.hornetq.javaee.example.server;
 
+import org.jboss.ejb3.annotation.ResourceAdapter;
+
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
 import javax.ejb.TransactionAttribute;
@@ -34,6 +36,7 @@
                      })
 @TransactionManagement(value= TransactionManagementType.CONTAINER)
 @TransactionAttribute(value= TransactionAttributeType.REQUIRED)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDBMessageSelectorExample implements MessageListener
 {
    public void onMessage(Message message)

Modified: trunk/examples/javaee/mdb-tx-send/src/org/hornetq/javaee/example/server/MDBMessageSendTxExample.java
===================================================================
--- trunk/examples/javaee/mdb-tx-send/src/org/hornetq/javaee/example/server/MDBMessageSendTxExample.java	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/examples/javaee/mdb-tx-send/src/org/hornetq/javaee/example/server/MDBMessageSendTxExample.java	2009-10-02 12:06:29 UTC (rev 8031)
@@ -12,6 +12,8 @@
  */
 package org.hornetq.javaee.example.server;
 
+import org.jboss.ejb3.annotation.ResourceAdapter;
+
 import javax.annotation.Resource;
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
@@ -40,6 +42,7 @@
                      })
 @TransactionManagement(value= TransactionManagementType.CONTAINER)
 @TransactionAttribute(value= TransactionAttributeType.REQUIRED)
+ at ResourceAdapter("hornetq-ra.rar")
 public class MDBMessageSendTxExample implements MessageListener
 {
    @Resource(mappedName = "java:JmsXA")

Modified: trunk/hornetq.ipr
===================================================================
--- trunk/hornetq.ipr	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/hornetq.ipr	2009-10-02 12:06:29 UTC (rev 8031)
@@ -693,6 +693,7 @@
         <root url="jar://$PROJECT_DIR$/thirdparty/org/jboss/javaee/lib/jboss-jaspi-api.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jbossts/lib/jbossts-common.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/apache-logging/lib/commons-logging.jar!/" />
+        <root url="jar://$PROJECT_DIR$/thirdparty/org/jboss/ejb3/lib/jboss-ejb3-ext-api.jar!/" />
       </CLASSES>
       <JAVADOC />
       <SOURCES>

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/pom.xml	2009-10-02 12:06:29 UTC (rev 8031)
@@ -264,6 +264,13 @@
         <artifactId>commons-logging</artifactId>
         <version>1.1.0.jboss</version>
       </dependency>
+      
+      <!-- needed for javaee examples-->
+      <dependency>
+        <groupId>org.jboss.ejb3</groupId>
+        <artifactId>jboss-ejb3-ext-api</artifactId>
+        <version>1.0.0</version>
+      </dependency>
    </dependencies>
 
 

Modified: trunk/src/config/jboss-as/build.xml
===================================================================
--- trunk/src/config/jboss-as/build.xml	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/src/config/jboss-as/build.xml	2009-10-02 12:06:29 UTC (rev 8031)
@@ -53,7 +53,7 @@
          <fileset dir="${src.dir}">
             <exclude name="**/messaging/**"/>
             <exclude name="conf/login-config.xml"/>
-             <exclude name="**/jms-ra.rar"/>
+             <!--<exclude name="**/jms-ra.rar"/>-->
          </fileset>
       </copy>
       <copy todir="${dest.dir}/conf">
@@ -78,7 +78,7 @@
       <copy todir="${hornetq.sar.dir}">
         <fileset dir="${hornetq.config.dir}" includes="*"/>
       </copy>
-   	  <unzip src="${lib.dir}/hornetq-ra.rar" dest="${dest.dir}/deploy/jms-ra.rar"/>
+   	  <unzip src="${lib.dir}/hornetq-ra.rar" dest="${dest.dir}/deploy/hornetq-ra.rar"/>
    </target>
 
    <!-- The JBOSS_HOME environment variable and the directory must exist, we also check we are running

Modified: trunk/src/config/jboss-as/clustered/jms-ds.xml
===================================================================
--- trunk/src/config/jboss-as/clustered/jms-ds.xml	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/src/config/jboss-as/clustered/jms-ds.xml	2009-10-02 12:06:29 UTC (rev 8031)
@@ -16,7 +16,7 @@
    <tx-connection-factory>
       <jndi-name>JmsXA</jndi-name>
       <xa-transaction/>
-      <rar-name>jms-ra.rar</rar-name>
+      <rar-name>hornetq-ra.rar</rar-name>
       <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
       <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
       <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>

Modified: trunk/src/config/jboss-as/non-clustered/jms-ds.xml
===================================================================
--- trunk/src/config/jboss-as/non-clustered/jms-ds.xml	2009-10-02 03:39:15 UTC (rev 8030)
+++ trunk/src/config/jboss-as/non-clustered/jms-ds.xml	2009-10-02 12:06:29 UTC (rev 8031)
@@ -16,7 +16,7 @@
    <tx-connection-factory>
       <jndi-name>JmsXA</jndi-name>
       <xa-transaction/>
-      <rar-name>jms-ra.rar</rar-name>
+      <rar-name>hornetq-ra.rar</rar-name>
       <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
       <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
       <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>



More information about the hornetq-commits mailing list