You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by wp...@apache.org on 2012/04/17 23:38:30 UTC

svn commit: r1327294 - in /qpid/trunk/qpid/java/jca: example/ example/conf/ example/src/main/java/org/apache/qpid/jca/example/client/ example/src/main/java/org/apache/qpid/jca/example/ejb/ example/src/main/java/org/apache/qpid/jca/example/web/ src/main...

Author: wprice
Date: Tue Apr 17 21:38:29 2012
New Revision: 1327294

URL: http://svn.apache.org/viewvc?rev=1327294&view=rev
Log:
QPID-3701
    -Add support for Glassfish 3.1.1 AS
    -Add necessary configuration files for Glassfish support
    -Reworked JNDI naming conventions to be consistent across all
    supported app servers
    -Fixed NPE in QpidConnectionFactoryProxy
    -Added necessary documentation files for Glassfish support

Added:
    qpid/trunk/qpid/java/jca/example/build-glassfish-properties.xml
    qpid/trunk/qpid/java/jca/example/conf/glassfish-ejb-jar.xml
    qpid/trunk/qpid/java/jca/example/conf/glassfish-resources.xml
    qpid/trunk/qpid/java/jca/example/conf/glassfish-web.xml
    qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/GlassfishTransactionManagerLocator.java
Modified:
    qpid/trunk/qpid/java/jca/example/README.txt
    qpid/trunk/qpid/java/jca/example/build-geronimo-properties.xml
    qpid/trunk/qpid/java/jca/example/build-jboss-properties.xml
    qpid/trunk/qpid/java/jca/example/build.xml
    qpid/trunk/qpid/java/jca/example/conf/geronimo-application.xml
    qpid/trunk/qpid/java/jca/example/conf/geronimo-ra.xml
    qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/client/QpidRequestResponseClient.java
    qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidGoodByeListenerBean.java
    qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidGoodByeSubscriberBean.java
    qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidHelloListenerBean.java
    qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidHelloSubscriberBean.java
    qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidJMSResponderBean.java
    qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidTestBean.java
    qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/web/QpidRequestResponseServlet.java
    qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/admin/QpidConnectionFactoryProxy.java

Modified: qpid/trunk/qpid/java/jca/example/README.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/README.txt?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/README.txt (original)
+++ qpid/trunk/qpid/java/jca/example/README.txt Tue Apr 17 21:38:29 2012
@@ -6,8 +6,8 @@ The Qpid JCA example provides a sample J
 configure, install and run applications using the Qpid JCA adapter for EE
 connectivity and the Apache Qpid C++ Broker. This example code can be used as a
 convenient starting point for your own development and deployment
-efforts. Currently the example is supported on JBoss EAP 5.x, JBoss 6.x and
-Apache Geronimo 2.x.
+efforts. Currently the example is supported on JBoss EAP 5.x, JBoss 6.x,
+Apache Geronimo 2.x and Glassfish 3.1.1.
 
 Example Components
 ===================
@@ -42,11 +42,12 @@ they should be used. These concepts will
 
 The deployment configuration for destinations, and ConnectionFactories varies by platform.
 In JBossEAP, the configuration mechanism is a *-ds.xml file. Geronimo 2.2.x has the notion
-of a deployment plan in the form of a geronimo-ra.xml file.
+of a deployment plan in the form of a geronimo-ra.xml file. Similarly, Glassfish 3.1.1 uses
+the glassfish-resources.xml file.
 
-The Qpid JCA Example provides both a qpid-jca-ds.xml file as well as a geronimo-ra.xml deployment
-plan. Both mechanisms provide a reasonable set of defaults to allow you to deploy the Qpid JCA
-adapter in either environment and get up and running quickly.
+The Qpid JCA Example provides a sample qpid-jca-ds.xml, geronimo-ra.xml and glassfish-resources.xml file.
+Each file provides reasonable set of defaults to allow you to deploy the Qpid JCA
+adapter in the supported environments and get up and running quickly.
 
 EJB 3.x
 
@@ -70,7 +71,7 @@ EE EAR archive
     An EAR wrapper for the ejb and web components.
 
 
-    An RMI client used to excercise the EJB 3.x component.
+An RMI client used to excercise the EJB 3.x component.
 
 Sample *-ds.xml file
     A sample *-ds.xml file is provided to create destinations and ManagedConnectionFactories
@@ -80,6 +81,10 @@ Sample geronimo-ra.xml
     A sample geronimo-ra.xml file is provided to create destinations and ManagedConnectionFactories
     in the Geronimo environment. This file is semantically equivalent to the JBoss *-ds.xml artifact.
 
+Sample glassfish-resources.xml
+    A sample glassfish-resources.xml file is provided to create JMS destinations and
+    ManagedConnectionFactories in the Glassfish environemnt.
+
 A build.xml file
     An ant build.xml file to configure, install and deploy the aforementioned components.
 
@@ -107,14 +112,11 @@ Quickstart
 ==========
 After satifsying the above requirements you are ready to deploy and run the example application.
 The steps to deploy and run in the supported application servers are largely the same, however,
-if you are targeting JBoss you will either need to modify the property in the example build.xml file
-
-
-    <property name="target.platform" value="geronimo"/>
-
-to be jboss
+you need to specify the target platform environment to which you are attempting to deploy.
 
     <property name="target.platform" value="jboss"/>
+    <property name="target.platform" value="geronimo"/>
+    <property name="target.platform" value="glassfish"/>
 
 or set this property via the command line.
 
@@ -202,6 +204,16 @@ Geronimo
        adapter is now deployed and ready for use in Geronimo.
 
 
+Glassfish
+    As previously mentioned, the Glassfish environment uses the glassfish-resources.xml file to configure AdminObjects and ManagedConnectionFactories.
+    A sample file is provided. To deploy the file simply execute:
+
+    ant deploy-rar
+
+    If building from the Qpid source tree, this will package and deploy the qpid-ra-<version>.rar file as well as configure the adapter. If you are
+    not building from source, the adapter will be configured correctly via the glassfish-resources.xml file.
+
+
 Step 2 -- Deploy the application component(s).
 
 As previously mentioned, the adapter comes with a variety of EE components for use in your respective application server. You can choose to deploy
@@ -246,6 +258,25 @@ This is the JNDI name of the SLSB compon
 
 You can set this property if you want to modify the message contents being routed through the system.
 
+JMS
+If you do not want to use EJB and prefer to test the Qpid JCA adapter using the standard JMS API's, simply set the following property
+
+    <property name="client.use.ejb" value="true"/> <!-- uses JNDI/JMS or JNDI/RMI -->
+
+as
+
+    <property name="client.use.ejb" value="false"/> <!-- uses JNDI/JMS or JNDI/RMI -->
+
+
+Request/Reply
+
+The EJB/JMS client simply sends a message to a destination and does not receive a response. The Qpid JCA examples includes a request-reply
+example to allow you to receive a response. The following command:
+
+ant run-reqresp
+
+will execute this example. A variety of configuration options for both the EJB/JMS and Request/Reply are provided. Please see the build.xml file for more details.
+
 Web
 The Qpid JCA Example comes with a web application. To access the web component, simply use a browser of your choice and navigate to
 
@@ -267,6 +298,14 @@ instead of posting to a queue, the web a
 RMI client.
 
 
+Similar to the Request/Reply example, a Request/Reploy Servlet is provided as well. To access this servlet navigate to the above URL:
+
+
+http://<server-host-name>:<server-port>/qpid-jca-web/qpid-reqresp
+
+A reasonable set of defaults is provided which can be further tuned and configured to suit your development needs.
+
+
 Summary
 =======
 While conceptually simple, the Qpid JCA example provides a majority of the component types and messaging patterns you are most likely to use your development efforts.

Modified: qpid/trunk/qpid/java/jca/example/build-geronimo-properties.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/build-geronimo-properties.xml?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/build-geronimo-properties.xml (original)
+++ qpid/trunk/qpid/java/jca/example/build-geronimo-properties.xml Tue Apr 17 21:38:29 2012
@@ -22,10 +22,19 @@
 
     <property name="jndi.scheme" value="name"/>
 
-    <!--
-    <property name="qpid.xacf.jndi.name" value="jca:/qpid.jca/QpidJCAAdapter/JCAManagedConnectionFactory/QpidJMSXA"/>
-    -->
     <property name="qpid.xacf.jndi.name" value="QpidJMSXA"/>
+
+    <property name="jndi.prefix" value="jca:/qpid.jca/QpidJCAAdapter/JCAAdminObject/"/>
+
+
+    <property name="qpid.hello.queue.jndi.name" value="HelloQueue"/>
+    <property name="qpid.goodbye.queue.jndi.name" value="GoodByeQueue"/>
+    <property name="qpid.hello.topic.jndi.name" value="HelloTopic"/>
+    <property name="qpid.goodbye.topic.jndi.name" value="GoodByeTopic"/>
+    <property name="qpid.request.queue.jndi.name" value="RequestQueue"/>
+    <property name="qpid.response.queue.jndi.name" value="ResponseQueue"/>
+
+    <!--
     <property name="qpid.cf.jndi.name" value="jca:/qpid.jca/QpidJCAAdapter/JCAAdminObject/QpidConnectionFactory"/>
     <property name="qpid.hello.queue.jndi.name" value="jca:/qpid.jca/QpidJCAAdapter/JCAAdminObject/HelloQueue"/>
     <property name="qpid.goodbye.queue.jndi.name" value="jca:/qpid.jca/QpidJCAAdapter/JCAAdminObject/GoodByeQueue"/>
@@ -33,9 +42,11 @@
     <property name="qpid.goodbye.topic.jndi.name" value="jca:/qpid.jca/QpidJCAAdapter/JCAAdminObject/GoodByeTopic"/>
     <property name="qpid.request.queue.jndi.name" value="jca:/qpid.jca/QpidJCAAdapter/JCAAdminObject/RequestQueue"/>
     <property name="qpid.response.queue.jndi.name" value="jca:/qpid.jca/QpidJCAAdapter/JCAAdminObject/ResponseQueue"/>
-
+    -->
     <property name="qpid.ejb.jndi.name" value="name=&quot;QpidTestEJB&quot;"/>
     <property name="qpid.ejb.name" value="QpidTestBeanRemote"/>
+    <property name="qpid.client.cf.jndi.name" value="${jndi.prefix}/QpidConnectionFactory"/>
+    <property name="qpid.client.dest.jndi.name" value="${jndi.prefix}/${qpid.hello.queue.jndi.name}"/>
 
     <property name="jndi.context" value="org.openejb.client.RemoteInitialContextFactory"/>
     <property name="server.host" value="ejbd://localhost:4201"/>

Added: qpid/trunk/qpid/java/jca/example/build-glassfish-properties.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/build-glassfish-properties.xml?rev=1327294&view=auto
==============================================================================
--- qpid/trunk/qpid/java/jca/example/build-glassfish-properties.xml (added)
+++ qpid/trunk/qpid/java/jca/example/build-glassfish-properties.xml Tue Apr 17 21:38:29 2012
@@ -0,0 +1,135 @@
+<!--
+ -
+ - 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.
+ -
+-->
+<project name="qpid-jca-example-glassfish-properties" basedir="." default="">
+
+    <property name="jndi.scheme" value="name"/>
+    <property name="jndi.prefix" value=""/>
+
+    <property name="qpid.xacf.jndi.name" value="QpidJMSXA"/>
+    <property name="qpid.hello.topic.jndi.name" value="HelloTopic"/>
+    <property name="qpid.goodbye.topic.jndi.name" value="GoodByeTopic"/>
+    <property name="qpid.hello.queue.jndi.name" value="HelloQueue"/>
+    <property name="qpid.goodbye.queue.jndi.name" value="GoodByeQueue"/>
+    <property name="qpid.request.queue.jndi.name" value="QpidRequestQueue"/>
+    <property name="qpid.response.queue.jndi.name" value="QpidResponseQueue"/>
+    <property name="qpid.ejb.jndi.name" value="mappedName=&quot;QpidTestEJB&quot;"/>
+    <property name="qpid.ejb.ref.name" value="QpidTestBean/local"/>
+    <property name="qpid.ejb.name" value="QpidTestBean#org.apache.qpid.jca.example.ejb.QpidTestRemote"/>
+    <property name="qpid.client.cf.jndi.name" value="QpidConnectionFactory"/>
+    <property name="qpid.client.dest.jndi.name" value="${qpid.hello.queue.jndi.name}"/>
+
+    <property name="jndi.context" value="com.sun.enterprise.naming.SerialInitContextFactory"/>
+    <property name="server.host" value="iiop://localhost:3700"/>
+    <property name="glassfish.home" value="${env.GLASSFISH_HOME}"/>
+    <property name="glassfish.domain" value="domain1"/>
+    <property name="glassfish.user" value=""/>
+    <property name="glassfish.password" value=""/>
+
+    <path id="compile.classpath">
+        <fileset dir="${glassfish.home}/glassfish/modules">
+            <include name="javax.ejb.jar"/>
+            <include name="javax.transaction.jar"/>
+            <include name="javax.jms.jar"/>
+            <include name="javax.resource.jar"/>
+            <include name="javax.servlet.jar"/>
+        </fileset>
+
+        <fileset dir="${glassfish.home}/glassfish/domains/${glassfish.domain}/lib/ext">
+            <include name="slf4j-api-*.jar"/>
+        </fileset>
+    </path>
+
+    <path id="run.classpath">
+        <fileset dir="${lib.dir}">
+            <include name="qpid-ra-*.jar"/>
+            <include name="qpid-client-*.jar"/>
+            <include name="qpid-common-*.jar"/>
+        </fileset>
+
+        <fileset dir="${glassfish.home}/glassfish/lib/">
+            <include name="gf-client.jar"/>
+        </fileset>
+
+        <fileset dir="${glassfish.home}/glassfish/modules">
+            <include name="javax.ejb.jar"/>
+            <include name="javax.transaction.jar"/>
+            <include name="javax.jms.jar"/>
+            <include name="javax.resource.jar"/>
+            <include name="javax.servlet.jar"/>
+        </fileset>
+        <fileset dir="${glassfish.home}/glassfish/domains/${glassfish.domain}/lib/ext">
+            <include name="slf4j-api-*.jar"/>
+        </fileset>
+    </path>
+
+    <filterset id="extra.filterset">
+        <filter token="rar.ver" value="${qpid.ver}"/>
+    </filterset>
+
+    <macrodef name="glassfish">
+        <attribute name="user" default="${glassfish.user}"/>
+        <attribute name="password" default="${glassfish.password}"/>
+        <attribute name="action" default="list-applications"/>
+        <attribute name="module"/>
+        <attribute name="plan" default=""/>
+        <sequential>
+            <exec executable="${glassfish.home}/bin/asadmin">
+                <arg line="@{action} @{module} @{plan}"/>
+            </exec>
+        </sequential>
+    </macrodef>
+
+    <target name="package-rar" depends="compile">
+        <jar destfile="${build.dir}/${rar.name}"/>
+    </target>
+
+    <target name="deploy-rar" depends="package-rar" description="Deploy the RAR file.">
+        <glassfish action="deploy" module="${qpid.jca.dir}/${rar.name}"/>
+        <glassfish action="add-resources" module="${gen.dir}/glassfish-resources.xml"/>
+    </target>
+
+
+    <target name="undeploy-resources">
+        <glassfish action="delete-admin-object" module="${qpid.hello.topic.jndi.name}"/>
+        <glassfish action="delete-admin-object" module="${qpid.goodbye.topic.jndi.name}"/>
+        <glassfish action="delete-admin-object" module="${qpid.hello.queue.jndi.name}"/>
+        <glassfish action="delete-admin-object" module="${qpid.goodbye.queue.jndi.name}"/>
+        <glassfish action="delete-admin-object" module="${qpid.request.queue.jndi.name}"/>
+        <glassfish action="delete-admin-object" module="${qpid.response.queue.jndi.name}"/>
+        <glassfish action="delete-connector-connection-pool" module="--cascade true QpidJMSXAPool"/>
+        <glassfish action="delete-connector-connection-pool" module="--cascade true QpidJMSPool"/>
+        <glassfish action="delete-resource-adapter-config" module="QpidResourceAdapter"/>
+    </target>
+
+    <target name="undeploy-rar" description="Deploy the RAR file.">
+        <glassfish action="undeploy" module="--cascade true qpid-ra-${qpid.ver}"/>
+    </target>
+
+    <target name="deploy-ear" description="Deploy the EAR file." depends="package-ear">
+        <glassfish action="deploy" module="${build.dir}/${ear.name}"/>
+    </target>
+
+    <target name="undeploy-ear" description="Undeploy the EAR file.">
+        <glassfish action="undeploy" module="qpid-jcaex"/>
+    </target>
+</project>
+
+

Modified: qpid/trunk/qpid/java/jca/example/build-jboss-properties.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/build-jboss-properties.xml?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/build-jboss-properties.xml (original)
+++ qpid/trunk/qpid/java/jca/example/build-jboss-properties.xml Tue Apr 17 21:38:29 2012
@@ -21,6 +21,7 @@
 <project name="qpid-jca-example-jboss-properties" basedir="." default="">
 
     <property name="jndi.scheme" value="mappedName"/>
+    <property name="jndi.prefix" value=""/>
 
     <property name="qpid.xacf.jndi.name" value="java:QpidJMSXA"/>
     <property name="qpid.cf.jndi.name" value="QpidConnectionFactory"/>
@@ -29,9 +30,12 @@
     <property name="qpid.hello.queue.jndi.name" value="HelloQueue"/>
     <property name="qpid.goodbye.queue.jndi.name" value="GoodByeQueue"/>
     <property name="qpid.request.queue.jndi.name" value="QpidRequestQueue"/>
+    <property name="qpid.response.queue.jndi.name" value="QpidResponseQueue"/>
     <property name="qpid.ejb.jndi.name" value="mappedName=&quot;QpidTestEJB&quot;"/>
     <property name="qpid.ejb.ref.name" value="QpidTestBean/local"/>
     <property name="qpid.ejb.name" value="qpid-jcaex/QpidTestBean/remote"/>
+    <property name="qpid.client.cf.jndi.name" value="${jndi.prefix}/QpidConnectionFactory"/>
+    <property name="qpid.client.dest.jndi.name" value="${jndi.prefix}/${qpid.hello.queue.jndi.name}"/>
 
     <property name="jndi.context" value="org.jnp.interfaces.NamingContextFactory"/>
     <property name="server.host" value="jnp://localhost:1099"/>

Modified: qpid/trunk/qpid/java/jca/example/build.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/build.xml?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/build.xml (original)
+++ qpid/trunk/qpid/java/jca/example/build.xml Tue Apr 17 21:38:29 2012
@@ -27,7 +27,7 @@
     <property name="qpid.dest_syntax" value="ADDR"/>
 
     <!-- Properties controlling running sample standalone client -->
-    <property name="client.use.ejb" value="true"/> <!-- uses JNDI/JMS or JNDI/RMI -->
+    <property name="client.use.ejb" value="false"/> <!-- uses JNDI/JMS or JNDI/RMI -->
     <property name="client.message" value="Hello Qpid World"/>
     <property name="client.message.count" value="1"/>
     <property name="client.use.topic" value="false"/> <!-- Use topic/queue -->
@@ -72,7 +72,6 @@
                 <filter token="rar.name" value="${rar.name}"/>
                 <filter token="ejb.name" value="${ejb.name}"/>
                 <filter token="war.name" value="${war.name}"/>
-
                 <filter token="broker.url" value="${broker.url}"/>
 
                 <filter token="qpid.hello.topic.dest.address" value="${qpid.hello.topic.dest.address}"/>
@@ -92,12 +91,14 @@
                 <filter token="rar.name" value="${rar.name}"/>
                 <filter token="broker.url" value="${broker.url}"/>
                 <filter token="jndi.scheme" value="${jndi.scheme}"/>
+                <filter token="jndi.prefix" value="${jndi.prefix}"/>
                 <filter token="qpid.xacf.jndi.name" value="${qpid.xacf.jndi.name}"/>
                 <filter token="qpid.hello.topic.jndi.name" value="${qpid.hello.topic.jndi.name}"/>
                 <filter token="qpid.goodbye.topic.jndi.name" value="${qpid.goodbye.topic.jndi.name}"/>
                 <filter token="qpid.hello.queue.jndi.name" value="${qpid.hello.queue.jndi.name}"/>
                 <filter token="qpid.goodbye.queue.jndi.name" value="${qpid.goodbye.queue.jndi.name}"/>
                 <filter token="qpid.request.queue.jndi.name" value="${qpid.request.queue.jndi.name}"/>
+                <filter token="qpid.response.queue.jndi.name" value="${qpid.response.queue.jndi.name}"/>
                 <filter token="qpid.ejb.jndi.name" value="${qpid.ejb.jndi.name}"/>
             </filterset>
         </copy>
@@ -112,6 +113,9 @@
             <classes dir="${build.classes.dir}">
                 <include name="org/apache/qpid/jca/example/web/**"/>
             </classes>
+            <metainf dir="${gen.dir}">
+                <include name="glassfish-web.xml"/>
+            </metainf>
         </war>
     </target>
 
@@ -120,6 +124,7 @@
             <include name="org/apache/qpid/jca/example/ejb/**/*.class"/>
             <metainf dir="${gen.dir}">
                 <include name="jboss.xml"/>
+                <include name="glassfish-ejb-jar.xml"/>
             </metainf>
         </jar>
     </target>
@@ -143,9 +148,9 @@
             <sysproperty key="java.naming.factory.initial" value="${jndi.context}"/>
             <sysproperty key="java.naming.provider.url" value="${server.host}"/>
             <sysproperty key="qpid.ejb.name" value="${qpid.ejb.name}"/>
-            <sysproperty key="qpid.cf.name" value="${qpid.cf.jndi.name}"/>
+            <sysproperty key="qpid.cf.name" value="${qpid.client.cf.jndi.name}"/>
+            <sysproperty key="qpid.dest.name" value="${qpid.client.dest.jndi.name}"/>
             <sysproperty key="qpid.dest_syntax" value="${qpid.dest_syntax}"/>
-            <sysproperty key="qpid.dest.name" value="${qpid.hello.queue.jndi.name}"/>
             <sysproperty key="log4j.configuration" value="file://${conf.dir}/log4j.properties"/>
 
             <sysproperty key="qpid.message" value="${client.message}"/>
@@ -167,8 +172,8 @@
             <sysproperty key="qpid.message" value="Hello, World"/>
             <sysproperty key="message.count" value="1"/>
             <sysproperty key="thread.count" value="5"/>
-            <sysproperty key="qpid.cf.name" value="${qpid.cf.jndi.name}"/>
-            <sysproperty key="qpid.dest.name" value="${qpid.responder.queue.jndi.name}"/>
+            <sysproperty key="qpid.cf.name" value="${qpid.client.cf.jndi.name}"/>
+            <sysproperty key="qpid.dest.name" value="${qpid.client.dest.jndi.name}"/>
             <sysproperty key="log4j.configuration" value="file://${conf.dir}/log4j.properties"/>
             <sysproperty key="qpid.dest_syntax" value="${qpid.dest_syntax}"/>
         </java>

Modified: qpid/trunk/qpid/java/jca/example/conf/geronimo-application.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/conf/geronimo-application.xml?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/conf/geronimo-application.xml (original)
+++ qpid/trunk/qpid/java/jca/example/conf/geronimo-application.xml Tue Apr 17 21:38:29 2012
@@ -21,7 +21,7 @@
  -->
 <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
     xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"
-    xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
+    xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"
     application-name="QpidJCAExampleApplication">
 
     <sys:environment>

Modified: qpid/trunk/qpid/java/jca/example/conf/geronimo-ra.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/conf/geronimo-ra.xml?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/conf/geronimo-ra.xml (original)
+++ qpid/trunk/qpid/java/jca/example/conf/geronimo-ra.xml Tue Apr 17 21:38:29 2012
@@ -74,7 +74,7 @@
       <adminobject-interface>org.apache.qpid.ra.admin.QpidTopic</adminobject-interface>
       <adminobject-class>org.apache.qpid.ra.admin.QpidTopicImpl</adminobject-class>
       <adminobject-instance>
-         <message-destination-name>HelloTopic</message-destination-name>
+          <message-destination-name>HelloTopic</message-destination-name>
          <config-property-setting name="DestinationAddress">@qpid.hello.topic.dest.address@</config-property-setting>
       </adminobject-instance>
     </adminobject>
@@ -82,23 +82,25 @@
       <adminobject-interface>org.apache.qpid.ra.admin.QpidTopic</adminobject-interface>
       <adminobject-class>org.apache.qpid.ra.admin.QpidTopicImpl</adminobject-class>
       <adminobject-instance>
-         <message-destination-name>GoodByeTopic</message-destination-name>
+          <message-destination-name>GoodByeTopic</message-destination-name>
          <config-property-setting name="DestinationAddress">@qpid.goodbye.topic.dest.address@</config-property-setting>
       </adminobject-instance>
     </adminobject>
+    <!--
     <adminobject>
       <adminobject-interface>org.apache.qpid.ra.admin.QpidTopic</adminobject-interface>
       <adminobject-class>org.apache.qpid.ra.admin.QpidTopicImpl</adminobject-class>
       <adminobject-instance>
-         <message-destination-name>HelloGoodByeTopic</message-destination-name>
+          <message-destination-name>jms/HelloGoodByeTopic</message-destination-name>
          <config-property-setting name="DestinationAddress">@qpid.hellogoodbye.topic.dest.address@</config-property-setting>
       </adminobject-instance>
     </adminobject>
+    -->
     <adminobject>
       <adminobject-interface>org.apache.qpid.ra.admin.QpidQueue</adminobject-interface>
       <adminobject-class>org.apache.qpid.ra.admin.QpidQueueImpl</adminobject-class>
       <adminobject-instance>
-         <message-destination-name>HelloQueue</message-destination-name>
+          <message-destination-name>HelloQueue</message-destination-name>
          <config-property-setting name="DestinationAddress">@qpid.hello.queue.dest.address@</config-property-setting>
       </adminobject-instance>
     </adminobject>
@@ -106,7 +108,7 @@
       <adminobject-interface>org.apache.qpid.ra.admin.QpidQueue</adminobject-interface>
       <adminobject-class>org.apache.qpid.ra.admin.QpidQueueImpl</adminobject-class>
       <adminobject-instance>
-         <message-destination-name>GoodByeQueue</message-destination-name>
+          <message-destination-name>GoodByeQueue</message-destination-name>
          <config-property-setting name="DestinationAddress">@qpid.goodbye.queue.dest.address@</config-property-setting>
       </adminobject-instance>
     </adminobject>
@@ -114,7 +116,7 @@
       <adminobject-interface>org.apache.qpid.ra.admin.QpidQueue</adminobject-interface>
       <adminobject-class>org.apache.qpid.ra.admin.QpidQueueImpl</adminobject-class>
       <adminobject-instance>
-         <message-destination-name>RequestQueue</message-destination-name>
+          <message-destination-name>RequestQueue</message-destination-name>
          <config-property-setting name="DestinationAddress">@qpid.request.queue.dest.address@</config-property-setting>
       </adminobject-instance>
     </adminobject>
@@ -122,7 +124,7 @@
       <adminobject-interface>org.apache.qpid.ra.admin.QpidQueue</adminobject-interface>
       <adminobject-class>org.apache.qpid.ra.admin.QpidQueueImpl</adminobject-class>
       <adminobject-instance>
-         <message-destination-name>ResponseQueue</message-destination-name>
+          <message-destination-name>ResponseQueue</message-destination-name>
          <config-property-setting name="DestinationAddress">@qpid.response.queue.dest.address@</config-property-setting>
       </adminobject-instance>
     </adminobject>
@@ -130,7 +132,7 @@
       <adminobject-interface>javax.jms.ConnectionFactory</adminobject-interface>
       <adminobject-class>org.apache.qpid.ra.admin.QpidConnectionFactoryProxy</adminobject-class>
       <adminobject-instance>
-         <message-destination-name>QpidConnectionFactory</message-destination-name>
+          <message-destination-name>QpidConnectionFactory</message-destination-name>
          <config-property-setting name="ConnectionURL">@broker.url@</config-property-setting>
       </adminobject-instance>
     </adminobject>

Added: qpid/trunk/qpid/java/jca/example/conf/glassfish-ejb-jar.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/conf/glassfish-ejb-jar.xml?rev=1327294&view=auto
==============================================================================
--- qpid/trunk/qpid/java/jca/example/conf/glassfish-ejb-jar.xml (added)
+++ qpid/trunk/qpid/java/jca/example/conf/glassfish-ejb-jar.xml Tue Apr 17 21:38:29 2012
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
+<glassfish-ejb-jar>
+   <enterprise-beans>
+   <ejb>
+     <ejb-name>QpidHelloListenerBean</ejb-name>
+     <jndi-name>HelloQueue</jndi-name>
+     <mdb-resource-adapter>
+        <resource-adapter-mid>qpid-ra-@rar.ver@</resource-adapter-mid>
+     </mdb-resource-adapter>
+     <resource-ref>
+       <res-ref-name>QpidJMSXA</res-ref-name>
+       <jndi-name>QpidJMSXA</jndi-name>
+     </resource-ref>
+   </ejb>
+   <ejb>
+     <ejb-name>QpidGoodByeListenerBean</ejb-name>
+     <jndi-name>GoodByeQueue</jndi-name>
+     <mdb-resource-adapter>
+        <resource-adapter-mid>qpid-ra-@rar.ver@</resource-adapter-mid>
+     </mdb-resource-adapter>
+     <resource-ref>
+       <res-ref-name>QpidJMSXA</res-ref-name>
+       <jndi-name>QpidJMSXA</jndi-name>
+     </resource-ref>
+   </ejb>
+   <ejb>
+     <ejb-name>QpidHelloSubscriberBean</ejb-name>
+     <jndi-name>HelloTopic</jndi-name>
+     <mdb-resource-adapter>
+        <resource-adapter-mid>qpid-ra-@rar.ver@</resource-adapter-mid>
+     </mdb-resource-adapter>
+     <resource-ref>
+       <res-ref-name>QpidJMSXA</res-ref-name>
+       <jndi-name>QpidJMSXA</jndi-name>
+     </resource-ref>
+   </ejb>
+   <ejb>
+     <ejb-name>QpidGoodByeSubscriberBean</ejb-name>
+     <jndi-name>GoodByeTopic</jndi-name>
+     <mdb-resource-adapter>
+        <resource-adapter-mid>qpid-ra-@rar.ver@</resource-adapter-mid>
+     </mdb-resource-adapter>
+     <resource-ref>
+       <res-ref-name>QpidJMSXA</res-ref-name>
+       <jndi-name>QpidJMSXA</jndi-name>
+     </resource-ref>
+   </ejb>
+   <ejb>
+     <ejb-name>QpidJMSResponderBean</ejb-name>
+     <jndi-name>QpidResponderQueue</jndi-name>
+     <mdb-resource-adapter>
+        <resource-adapter-mid>qpid-ra-@rar.ver@</resource-adapter-mid>
+     </mdb-resource-adapter>
+     <resource-ref>
+       <res-ref-name>QpidJMSXA</res-ref-name>
+       <jndi-name>QpidJMSXA</jndi-name>
+     </resource-ref>
+   </ejb>
+   <ejb>
+     <ejb-name>QpidTestBean</ejb-name>
+     <jndi-name>QpidTestBean</jndi-name>
+     <resource-ref>
+       <res-ref-name>QpidJMSXA</res-ref-name>
+       <jndi-name>QpidJMSXA</jndi-name>
+     </resource-ref>
+   </ejb>
+   </enterprise-beans>
+</glassfish-ejb-jar>
+

Added: qpid/trunk/qpid/java/jca/example/conf/glassfish-resources.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/conf/glassfish-resources.xml?rev=1327294&view=auto
==============================================================================
--- qpid/trunk/qpid/java/jca/example/conf/glassfish-resources.xml (added)
+++ qpid/trunk/qpid/java/jca/example/conf/glassfish-resources.xml Tue Apr 17 21:38:29 2012
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
+<resources>
+
+
+    <resource-adapter-config name="QpidResourceAdapter" resource-adapter-name="qpid-ra-@rar.ver@" thread-pool-ids="thread-pool-1">
+       <property name="TransactionManagerLocatorClass" value="org.apache.qpid.ra.tm.GlassfishTransactionManagerLocator"/>
+       <property name="TransactionManagerLocatorMethod" value="getTm"/>
+    </resource-adapter-config>
+
+    <!--XAConnectionFactory-->
+    <connector-connection-pool
+        name="QpidJMSXAPool"
+        resource-adapter-name="qpid-ra-@rar.ver@"
+        connection-definition-name="org.apache.qpid.ra.QpidRAConnectionFactory"
+        transaction-support="XATransaction"
+        ping="true">
+        <property name="connectionURL" value="@broker.url@"/>
+        <property name="SessionDefaultType" value="javax.jms.Queue"/>
+   </connector-connection-pool>
+
+    <connector-resource jndi-name="QpidJMSXA" pool-name="QpidJMSXAPool"/>
+
+    <!--LocalTransaction ConnectionFactory
+    <connector-connection-pool
+        name="QpidJMSPool"
+        resource-adapter-name="qpid-ra-@rar.ver@"
+        connection-definition-name="org.apache.qpid.ra.QpidRAConnectionFactory"
+        transaction-support="LocalTransaction"
+        ping="true">
+        <property name="connectionURL" value="@broker.url@"/>
+        <property name="SessionDefaultType" value="javax.jms.Queue"/>
+        <property name="UseLocalTx" value="true"/>
+    </connector-connection-pool>
+
+
+    <connector-resource jndi-name="QpidJMS" pool-name="QpidJMSPool"/>
+
+    -->
+    <!--Destinations-->
+    <admin-object-resource jndi-name="HelloQueue" res-adapter="qpid-ra-@rar.ver@" res-type="org.apache.qpid.ra.admin.QpidQueue" class-name="org.apache.qpid.ra.admin.QpidQueueImpl">
+        <property name="DestinationAddress" value="@qpid.hello.queue.dest.address@"/>
+    </admin-object-resource>
+
+    <admin-object-resource jndi-name="GoodByeQueue" res-adapter="qpid-ra-@rar.ver@" res-type="org.apache.qpid.ra.admin.QpidQueue" class-name="org.apache.qpid.ra.admin.QpidQueueImpl">
+        <property name="DestinationAddress" value="@qpid.goodbye.queue.dest.address@"/>
+    </admin-object-resource>
+
+    <admin-object-resource jndi-name="HelloTopic" res-adapter="qpid-ra-@rar.ver@" res-type="org.apache.qpid.ra.admin.QpidTopic" class-name="org.apache.qpid.ra.admin.QpidTopicImpl">
+        <property name="DestinationAddress" value="@qpid.hello.topic.dest.address@"/>
+    </admin-object-resource>
+
+    <admin-object-resource jndi-name="GoodByeTopic" res-adapter="qpid-ra-@rar.ver@" res-type="org.apache.qpid.ra.admin.QpidTopic" class-name="org.apache.qpid.ra.admin.QpidTopicImpl">
+        <property name="DestinationAddress" value="@qpid.goodbye.topic.dest.address@"/>
+    </admin-object-resource>
+
+    <!--
+    <admin-object-resource jndi-name="HelloGoodByeTopic" res-adapter="qpid-ra-@rar.ver@" res-type="org.apache.qpid.ra.admin.QpidTopic" class-name="org.apache.qpid.ra.admin.QpidTopicImpl">
+        <property name="DestinationAddress" value="@qpid.hellogoodbye.topic.dest.address@"/>
+    </admin-object-resource>
+    -->
+    <admin-object-resource jndi-name="QpidRequestQueue" res-adapter="qpid-ra-@rar.ver@" res-type="org.apache.qpid.ra.admin.QpidQueue" class-name="org.apache.qpid.ra.admin.QpidQueueImpl">
+        <property name="DestinationAddress" value="@qpid.request.queue.dest.address@"/>
+    </admin-object-resource>
+
+    <admin-object-resource jndi-name="QpidResponseQueue" res-adapter="qpid-ra-@rar.ver@" res-type="org.apache.qpid.ra.admin.QpidQueue" class-name="org.apache.qpid.ra.admin.QpidQueueImpl">
+        <property name="DestinationAddress" value="@qpid.response.queue.dest.address@"/>
+    </admin-object-resource>
+
+    <admin-object-resource jndi-name="QpidConnectionFactory" res-adapter="qpid-ra-@rar.ver@" res-type="javax.jms.ConnectionFactory" class-name="org.apache.qpid.ra.admin.QpidConnectionFactoryProxy">
+        <property name="ConnectionURL" value="@broker.url@"/>
+    </admin-object-resource>
+
+</resources>

Added: qpid/trunk/qpid/java/jca/example/conf/glassfish-web.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/conf/glassfish-web.xml?rev=1327294&view=auto
==============================================================================
--- qpid/trunk/qpid/java/jca/example/conf/glassfish-web.xml (added)
+++ qpid/trunk/qpid/java/jca/example/conf/glassfish-web.xml Tue Apr 17 21:38:29 2012
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
+<glassfish-web-app>
+
+    <context-root>qpid-jca-web</context-root>
+
+    <ejb-ref>
+        <ejb-ref-name>QpidTestBean</ejb-ref-name>
+        <jndi-name>QpidTestBean</jndi-name>
+    </ejb-ref>
+
+    <resource-ref>
+      <res-ref-name>QpidJMSXA</res-ref-name>
+      <jndi-name>QpidJMSXA</jndi-name>
+    </resource-ref>
+    <resource-env-ref>
+      <res-env-ref-name>HelloQueue</res-env-ref-name>
+      <jndi-name>HelloQueue</jndi-name>
+    </resource-env-ref>
+    <resource-ref>
+      <res-ref-name>HelloTopic</res-ref-name>
+      <jndi-name>HelloTopic</jndi-name>
+    </resource-ref>
+
+
+</glassfish-web-app>

Modified: qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/client/QpidRequestResponseClient.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/client/QpidRequestResponseClient.java?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/client/QpidRequestResponseClient.java (original)
+++ qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/client/QpidRequestResponseClient.java Tue Apr 17 21:38:29 2012
@@ -42,7 +42,7 @@ public class QpidRequestResponseClient i
     private static final Logger _log = LoggerFactory.getLogger(QpidRequestResponseClient.class);
 
     private static final String DEFAULT_CF_JNDI = "QpidConnectionFactory";
-    private static final String DEFAULT_DESTINATION_JNDI = "QpidResponderQueue";
+    private static final String DEFAULT_DESTINATION_JNDI = "QpidRequestQueue";
     private static final String DEFAULT_MESSAGE = "Hello, World!";
     private static final int DEFAULT_MESSAGE_COUNT = 1;
     private static final int DEFAULT_THREAD_COUNT = 1;

Modified: qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidGoodByeListenerBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidGoodByeListenerBean.java?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidGoodByeListenerBean.java (original)
+++ qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidGoodByeListenerBean.java Tue Apr 17 21:38:29 2012
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
 @MessageDriven(activationConfig = {
     @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
     @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
-    @ActivationConfigProperty(propertyName = "destination", propertyValue = "@qpid.goodbye.queue.jndi.name@"),
+    @ActivationConfigProperty(propertyName = "destination", propertyValue = "@jndi.prefix@@qpid.goodbye.queue.jndi.name@"),
     @ActivationConfigProperty(propertyName = "connectionURL", propertyValue = "@broker.url@"),
     @ActivationConfigProperty(propertyName = "useLocalTx", propertyValue = "false"),
     @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "10")

Modified: qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidGoodByeSubscriberBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidGoodByeSubscriberBean.java?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidGoodByeSubscriberBean.java (original)
+++ qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidGoodByeSubscriberBean.java Tue Apr 17 21:38:29 2012
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
 @MessageDriven(activationConfig = {
     @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
     @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
-    @ActivationConfigProperty(propertyName = "destination", propertyValue = "@qpid.goodbye.topic.jndi.name@"),
+    @ActivationConfigProperty(propertyName = "destination", propertyValue = "@jndi.prefix@@qpid.goodbye.topic.jndi.name@"),
     @ActivationConfigProperty(propertyName = "connectionURL", propertyValue = "@broker.url@"),
     @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "NotDurable"),
     @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "10")

Modified: qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidHelloListenerBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidHelloListenerBean.java?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidHelloListenerBean.java (original)
+++ qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidHelloListenerBean.java Tue Apr 17 21:38:29 2012
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
 @MessageDriven(activationConfig = {
    @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
-   @ActivationConfigProperty(propertyName = "destination", propertyValue = "@qpid.hello.queue.jndi.name@"),
+   @ActivationConfigProperty(propertyName = "destination", propertyValue = "@jndi.prefix@@qpid.hello.queue.jndi.name@"),
    @ActivationConfigProperty(propertyName = "connectionURL", propertyValue = "@broker.url@"),
    @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "10")
 })

Modified: qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidHelloSubscriberBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidHelloSubscriberBean.java?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidHelloSubscriberBean.java (original)
+++ qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidHelloSubscriberBean.java Tue Apr 17 21:38:29 2012
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
 @MessageDriven(activationConfig = {
    @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
-   @ActivationConfigProperty(propertyName = "destination", propertyValue = "@qpid.hello.topic.jndi.name@"),
+   @ActivationConfigProperty(propertyName = "destination", propertyValue = "@jndi.prefix@@qpid.hello.topic.jndi.name@"),
    @ActivationConfigProperty(propertyName = "connectionURL", propertyValue = "@broker.url@"),
    @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "NotDurable"),
    @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "10")

Modified: qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidJMSResponderBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidJMSResponderBean.java?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidJMSResponderBean.java (original)
+++ qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidJMSResponderBean.java Tue Apr 17 21:38:29 2012
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
 @MessageDriven(activationConfig = {
     @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
     @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
-    @ActivationConfigProperty(propertyName = "destination", propertyValue = "@qpid.request.queue.jndi.name@"),
+    @ActivationConfigProperty(propertyName = "destination", propertyValue = "@jndi.prefix@@qpid.request.queue.jndi.name@"),
     @ActivationConfigProperty(propertyName = "connectionURL", propertyValue = "@broker.url@"),
     @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "10")
 })

Modified: qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidTestBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidTestBean.java?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidTestBean.java (original)
+++ qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/ejb/QpidTestBean.java Tue Apr 17 21:38:29 2012
@@ -43,10 +43,10 @@ public class QpidTestBean implements Qpi
     @Resource(@jndi.scheme@="@qpid.xacf.jndi.name@")
     private ConnectionFactory _connectionFactory;
 
-    @Resource(@jndi.scheme@="HelloQueue")
+    @Resource(@jndi.scheme@="@qpid.hello.queue.jndi.name@")
     private Destination _queue;
 
-    @Resource(@jndi.scheme@="HelloTopic")
+    @Resource(@jndi.scheme@="@qpid.hello.topic.jndi.name@")
     private Destination _topic;
 
     @Override

Modified: qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/web/QpidRequestResponseServlet.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/web/QpidRequestResponseServlet.java?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/web/QpidRequestResponseServlet.java (original)
+++ qpid/trunk/qpid/java/jca/example/src/main/java/org/apache/qpid/jca/example/web/QpidRequestResponseServlet.java Tue Apr 17 21:38:29 2012
@@ -59,10 +59,10 @@ public class QpidRequestResponseServlet 
     @Resource(@jndi.scheme@="@qpid.xacf.jndi.name@")
     private ConnectionFactory _connectionFactory;
 
-    @Resource(@jndi.scheme@="QpidRequestQueue")
+    @Resource(@jndi.scheme@="@qpid.request.queue.jndi.name@")
     private Destination _queue;
 
-    @Resource(@jndi.scheme@="QpidResponseQueue")
+    @Resource(@jndi.scheme@="@qpid.response.queue.jndi.name@")
     private Destination _responseQueue;
 
 

Modified: qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/admin/QpidConnectionFactoryProxy.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/admin/QpidConnectionFactoryProxy.java?rev=1327294&r1=1327293&r2=1327294&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/admin/QpidConnectionFactoryProxy.java (original)
+++ qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/admin/QpidConnectionFactoryProxy.java Tue Apr 17 21:38:29 2012
@@ -137,7 +137,20 @@ public class QpidConnectionFactoryProxy 
     */
    public Connection createConnection() throws JMSException
    {
-       return _delegate.createConnection();
+       try
+       {
+           if(_delegate == null)
+           {
+               getReference();
+           }
+
+           return _delegate.createConnection();
+       }
+       catch(Exception e)
+       {
+          throw new JMSException(e.getMessage());
+       }
+
    }
 
    /**

Added: qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/GlassfishTransactionManagerLocator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/GlassfishTransactionManagerLocator.java?rev=1327294&view=auto
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/GlassfishTransactionManagerLocator.java (added)
+++ qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/GlassfishTransactionManagerLocator.java Tue Apr 17 21:38:29 2012
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.qpid.ra.tm;
+
+
+import javax.naming.InitialContext;
+import javax.transaction.TransactionManager;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GlassfishTransactionManagerLocator
+{
+    private static final Logger _log = LoggerFactory.getLogger(GlassfishTransactionManagerLocator.class);
+
+    private static final String TM_JNDI_NAME = "java:appserver/TransactionManager";
+
+    public TransactionManager getTm() throws Exception
+    {
+        InitialContext ctx = null;
+        TransactionManager tm = null;
+
+        try
+        {
+            ctx = new InitialContext();
+            tm = (TransactionManager)ctx.lookup(TM_JNDI_NAME);
+        }
+        catch(Exception e)
+        {
+            _log.error("Error attempting to location TM " + e.getMessage());
+        }
+        finally
+        {
+            try
+            {
+                if(ctx != null)
+                {
+                    ctx.close();
+                }
+            }
+            catch(Exception ignore){}
+        }
+
+        return tm;
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org