Author: wprice
Date: Wed Apr 18 05:34:59 2012
New Revision: 1327380

URL: http://svn.apache.org/viewvc?rev=1327380&view=rev
Log:
QPID-3776: Add support for JBoss7 Application Server

Added:
    qpid/trunk/qpid/java/jca/example/conf/jboss-ejb-client.properties
Modified:
    qpid/trunk/qpid/java/jca/example/build-jboss7-properties.xml
    qpid/trunk/qpid/java/jca/example/build.xml
    qpid/trunk/qpid/java/jca/example/conf/standalone.xml
    
qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/admin/QpidConnectionFactoryProxy.java

Modified: qpid/trunk/qpid/java/jca/example/build-jboss7-properties.xml
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/build-jboss7-properties.xml?rev=1327380&r1=1327379&r2=1327380&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/build-jboss7-properties.xml (original)
+++ qpid/trunk/qpid/java/jca/example/build-jboss7-properties.xml Wed Apr 18 
05:34:59 2012
@@ -21,20 +21,25 @@
 <project name="qpid-jca-example-jboss7-properties" basedir="." default="">
 
     <property name="jndi.scheme" value="name"/>
+    <property name="jndi.prefix" value=""/>
 
     <property name="qpid.xacf.jndi.name" value="java:/QpidJMSXA"/>
     <property name="qpid.cf.jndi.name" value="QpidConnectionFactory"/>
-    <property name="qpid.hello.topic.jndi.name" value="java:/HelloTopic"/>
-    <property name="qpid.goodbye.topic.jndi.name" value="java:/GoodByeTopic"/>
-    <property name="qpid.hello.queue.jndi.name" value="java:/HelloQueue"/>
-    <property name="qpid.goodbye.queue.jndi.name" value="java:/GoodByeQueue"/>
-    <property name="qpid.responder.queue.jndi.name" 
value="java:/QpidResponderQueue"/>
+    <property name="qpid.hello.topic.jndi.name" 
value="java:jboss/exported/HelloTopic"/>
+    <property name="qpid.goodbye.topic.jndi.name" 
value="java:jboss/exported/GoodByeTopic"/>
+    <property name="qpid.hello.queue.jndi.name" 
value="java:jboss/exported/HelloQueue"/>
+    <property name="qpid.goodbye.queue.jndi.name" 
value="java:jboss/exported/GoodByeQueue"/>
+    <property name="qpid.request.queue.jndi.name" 
value="java:jboss/exported/QpidRequestQueue"/>
+    <property name="qpid.response.queue.jndi.name" 
value="java:jboss/exported/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.ejb.name" 
value="ejb:qpid-jcaex/qpid-jcaex-ejb/QpidTestBean!org.apache.qpid.jca.example.ejb.QpidTestRemote"/>
 
-    <property name="jndi.context" 
value="org.jnp.interfaces.NamingContextFactory"/>
-    <property name="server.host" value="jnp://localhost:1099"/>
+    <property name="qpid.client.cf.jndi.name" 
value="${jndi.prefix}/QpidConnectionFactory"/>
+    <property name="qpid.client.dest.jndi.name" 
value="${jndi.prefix}/HelloQueue"/>
+    <property name="jndi.context" 
value="org.jboss.naming.remote.client.InitialContextFactory"/>
+    <property name="server.host" value="remote://localhost:4447"/>
 
 
     <property name="jboss.server.config" value="standalone"/>
@@ -44,19 +49,20 @@
     <property name="jboss.deploy" 
location="${jboss.home}/${jboss.server}/deployments"/>
     <property name="jboss.modules" location="${jboss.home}/modules"/>
     <property name="jboss.config.dir" 
location="${jboss.home}/${jboss.server}/configuration/"/>
+    <property name="jboss.client" location="${jboss.home}/bin/client"/>
 
     <path id="compile.classpath">
         <fileset dir="${jboss.modules}/javax/jms/api/main">
-            <include name="jboss-jms-api_1.1_spec-1.0.0.Final.jar"/>
+            <include name="jboss-jms-api_1.1_spec-1.0.1.Final.jar"/>
         </fileset>
         <fileset dir="${jboss.modules}/javax/ejb/api/main">
-            <include name="jboss-ejb-api_3.1_spec-1.0.1.Final.jar"/>
+            <include name="jboss-ejb-api_3.1_spec-1.0.2.Final.jar"/>
         </fileset>
         <fileset dir="${jboss.modules}/javax/servlet/api/main">
-            <include name="jboss-servlet-api_3.0_spec-1.0.0.Final.jar"/>
+            <include name="jboss-servlet-api_3.0_spec-1.0.1.Final.jar"/>
         </fileset>
         <fileset dir="${jboss.modules}/javax/transaction/api/main">
-            <include name="jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>
+            <include name="jboss-transaction-api_1.1_spec-1.0.1.Final.jar"/>
         </fileset>
         <fileset dir="${jboss.modules}/org/slf4j/main">
             <include name="slf4j-api-1.6.1.jar"/>
@@ -64,15 +70,25 @@
     </path>
 
     <path id="run.classpath">
+        <fileset dir="${jboss.client}">
+            <include name="jboss-client.jar"/>
+        </fileset>
         <fileset dir="${lib.dir}">
             <include name="qpid-ra-*.jar"/>
             <include name="qpid-client-*.jar"/>
             <include name="qpid-common-*.jar"/>
         </fileset>
-        <fileset dir="${jboss.client}">
-            <!-- Shortcut to get it working!-->
-            <include name="jbossall-client.jar"/>
+        <fileset dir="${jboss.modules}/org/slf4j/main">
+            <include name="slf4j-api-1.6.1.jar"/>
+        </fileset>
+        <fileset dir="../../build/lib">
+            <include name="slf4j*.jar"/>
+            <include name="log4j*.jar"/>
         </fileset>
+        <fileset dir="${jboss.modules}/org/jboss/ejb-client/main/">
+            <include name="jboss-ejb-client-1.0.6.CR1.jar"/>
+        </fileset>
+
     </path>
 
     <filterset id="extra.filterset"/>

Modified: qpid/trunk/qpid/java/jca/example/build.xml
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/build.xml?rev=1327380&r1=1327379&r2=1327380&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/build.xml (original)
+++ qpid/trunk/qpid/java/jca/example/build.xml Wed Apr 18 05:34:59 2012
@@ -27,7 +27,7 @@
     <property name="qpid.dest_syntax" value="ADDR"/>
 
     <!-- Properties controlling running sample standalone client -->
-    <property name="client.use.ejb" value="false"/> <!-- uses JNDI/JMS or 
JNDI/RMI -->
+    <property name="client.use.ejb" value="true"/> <!-- 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 -->
@@ -147,6 +147,9 @@
             </classpath>
             <sysproperty key="java.naming.factory.initial" 
value="${jndi.context}"/>
             <sysproperty key="java.naming.provider.url" 
value="${server.host}"/>
+            <sysproperty key="java.naming.factory.url.pkgs" 
value="org.jboss.ejb.client.naming"/>
+            <sysproperty key="jboss.ejb.client.properties.file.path" 
value="${conf.dir}/jboss-ejb-client.properties"/>
+
             <sysproperty key="qpid.ejb.name" value="${qpid.ejb.name}"/>
             <sysproperty key="qpid.cf.name" 
value="${qpid.client.cf.jndi.name}"/>
             <sysproperty key="qpid.dest.name" 
value="${qpid.client.dest.jndi.name}"/>

Added: qpid/trunk/qpid/java/jca/example/conf/jboss-ejb-client.properties
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/conf/jboss-ejb-client.properties?rev=1327380&view=auto
==============================================================================
--- qpid/trunk/qpid/java/jca/example/conf/jboss-ejb-client.properties (added)
+++ qpid/trunk/qpid/java/jca/example/conf/jboss-ejb-client.properties Wed Apr 
18 05:34:59 2012
@@ -0,0 +1,12 @@
+endpoint.name=client-endpoint
+remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
+
+remote.connections=default
+
+remote.connection.default.host=localhost
+remote.connection.default.port = 4447
+remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
+
+remote.connection.default.username=wmprice
+remote.connection.default.password=72whtu78
+

Modified: qpid/trunk/qpid/java/jca/example/conf/standalone.xml
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/example/conf/standalone.xml?rev=1327380&r1=1327379&r2=1327380&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/example/conf/standalone.xml (original)
+++ qpid/trunk/qpid/java/jca/example/conf/standalone.xml Wed Apr 18 05:34:59 
2012
@@ -279,34 +279,39 @@
                         </connection-definition>
                     </connection-definitions>
                     <admin-objects>
-                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidConnectionFactoryProxy" 
jndi-name="QpidJMS" use-java-context="false">
+                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidConnectionFactoryProxy" 
jndi-name="java:jboss/exported/QpidConnectionFactory" use-java-context="false">
                             <config-property name="ConnectionURL">
                                 @broker.url@
                             </config-property>
                         </admin-object>
-                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidTopicImpl" jndi-name="GoodByeTopic" 
use-java-context="false" pool-name="GoodByeTopic">
-                            <config-property name="destinationAddress">
+                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidTopicImpl" 
jndi-name="java:jboss/exported/GoodByeTopic" use-java-context="false" 
pool-name="GoodByeTopic">
+                            <config-property name="DestinationAddress">
                                 @qpid.hello.topic.dest.address@
                             </config-property>
                         </admin-object>
-                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidTopicImpl" jndi-name="HelloTopic" 
use-java-context="false" pool-name="HelloTopic">
-                            <config-property name="destinationAddress">
+                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidTopicImpl" 
jndi-name="java:jboss/exported/HelloTopic" use-java-context="false" 
pool-name="HelloTopic">
+                            <config-property name="DestinationAddress">
                                 @qpid.goodbye.topic.dest.address@
                             </config-property>
                         </admin-object>
-                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidQueueImpl" jndi-name="GoodByeQueue" 
use-java-context="false" pool-name="GoodByeQueue">
-                            <config-property name="destinationAddress">
+                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidQueueImpl" 
jndi-name="java:jboss/exported/GoodByeQueue" use-java-context="false" 
pool-name="GoodByeQueue">
+                            <config-property name="DestinationAddress">
                                 @qpid.goodbye.queue.dest.address@
                             </config-property>
                         </admin-object>
-                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidQueueImpl" jndi-name="HelloQueue" 
use-java-context="false" pool-name="HelloQueue">
-                            <config-property name="destinationAddress">
+                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidQueueImpl" 
jndi-name="java:jboss/exported/HelloQueue" use-java-context="false" 
pool-name="HelloQueue">
+                            <config-property name="DestinationAddress">
                                 @qpid.hello.queue.dest.address@
                             </config-property>
                         </admin-object>
-                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidQueueImpl" 
jndi-name="QpidResponderQueue" use-java-context="false" 
pool-name="QpidResponderQueue">
-                            <config-property name="destinationAddress">
-                                @qpid.responder.queue.dest.address@
+                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidQueueImpl" 
jndi-name="java:jboss/exported/QpidRequestQueue" use-java-context="false" 
pool-name="QpidRequestQueue">
+                            <config-property name="DestinationAddress">
+                                @qpid.request.queue.dest.address@
+                            </config-property>
+                        </admin-object>
+                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidQueueImpl" 
jndi-name="java:jboss/exported/QpidResponseQueue" use-java-context="false" 
pool-name="QpidResponseQueue">
+                            <config-property name="DestinationAddress">
+                                @qpid.response.queue.dest.address@
                             </config-property>
                         </admin-object>
                     </admin-objects>

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=1327380&r1=1327379&r2=1327380&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
 Wed Apr 18 05:34:59 2012
@@ -77,17 +77,17 @@ public class QpidConnectionFactoryProxy 
 
     public void writeExternal(ObjectOutput out) throws IOException
     {
-        if (_delegate == null)
-        {
-            _log.error("Null Destination ");
-            throw new IOException("Null ConnectionFactory!");
-        }
 
         try
         {
+            if(_delegate == null)
+            {
+                getReference();
+            }
+
             out.writeObject(((Referenceable) _delegate).getReference());
         }
-        catch (NamingException e)
+        catch (Exception e)
         {
             _log.error("Failed to dereference ConnectionFactory " + 
e.getMessage(), e);
             throw new IOException("Failed to dereference ConnectionFactory: " 
+ e.getMessage());



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to