You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2011/12/18 06:09:10 UTC

svn commit: r1220336 [8/8] - in /qpid/trunk/qpid/java: ./ client/src/main/java/org/apache/qpid/client/ jca/ jca/example/ jca/example/conf/ jca/example/src/ jca/example/src/main/ jca/example/src/main/java/ jca/example/src/main/java/org/ jca/example/src/...

Added: qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/JBoss7TransactionManagerLocator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/JBoss7TransactionManagerLocator.java?rev=1220336&view=auto
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/JBoss7TransactionManagerLocator.java (added)
+++ qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/JBoss7TransactionManagerLocator.java Sun Dec 18 05:09:07 2011
@@ -0,0 +1,33 @@
+package org.apache.qpid.ra.tm;
+
+import javax.naming.InitialContext;
+import javax.transaction.TransactionManager;
+
+public class JBoss7TransactionManagerLocator
+{
+    private static final String TM_JNDI_NAME = "java:jboss/TransactionManager";
+
+    public TransactionManager getTm() throws Exception
+    {
+        InitialContext ctx = null;
+
+        try
+        {
+            ctx = new InitialContext();
+            return (TransactionManager)ctx.lookup(TM_JNDI_NAME);
+        }
+        finally
+        {
+            try
+            {
+                if(ctx != null)
+                {
+                    ctx.close();
+                }
+            }
+            catch(Exception ignore)
+            {
+            }
+        }
+    }
+}

Added: qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/JBossTransactionManagerLocator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/JBossTransactionManagerLocator.java?rev=1220336&view=auto
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/JBossTransactionManagerLocator.java (added)
+++ qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/tm/JBossTransactionManagerLocator.java Sun Dec 18 05:09:07 2011
@@ -0,0 +1,70 @@
+/*
+ *
+ * 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 java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import javax.transaction.TransactionManager;
+
+/**
+ */
+public class JBossTransactionManagerLocator
+{
+   private final String LOCATOR = "org.jboss.tm.TransactionManagerLocator" ;
+
+   public TransactionManager getTm()
+      throws SecurityException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
+   {
+      final ClassLoader classLoader = Thread.currentThread().getContextClassLoader() ;
+      final Class<?> locatorClass ;
+      try
+      {
+         locatorClass = classLoader.loadClass(LOCATOR) ;
+      }
+      catch (final ClassNotFoundException cnfe)
+      {
+         return null ;
+      }
+
+      Method instanceMethod = null ;
+      try
+      {
+         instanceMethod = locatorClass.getMethod("getInstance") ;
+      }
+      catch (final NoSuchMethodException nsme) {} // ignore
+
+      final Object instance ;
+      final String locatorMethodName ;
+      if (instanceMethod != null)
+      {
+         instance = instanceMethod.invoke(null) ;
+         locatorMethodName = "locate" ;
+      }
+      else
+      {
+         instance = null ;
+         locatorMethodName = "locateTransactionManager" ;
+      }
+      final Method locatorMethod = locatorClass.getMethod(locatorMethodName) ;
+      return (TransactionManager) locatorMethod.invoke(instance) ;
+   }
+}

Added: qpid/trunk/qpid/java/jca/src/main/resources/META-INF/jboss-ra.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/resources/META-INF/jboss-ra.xml?rev=1220336&view=auto
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/resources/META-INF/jboss-ra.xml (added)
+++ qpid/trunk/qpid/java/jca/src/main/resources/META-INF/jboss-ra.xml Sun Dec 18 05:09:07 2011
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ - 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.
+ -
+ -->
+<jboss-ra>
+  <ra-config-property>
+        <ra-config-property-name>TransactionManagerLocatorClass</ra-config-property-name>
+        <ra-config-property-type>java.lang.String</ra-config-property-type>
+        <ra-config-property-value>org.apache.qpid.ra.tm.JBossTransactionManagerLocator</ra-config-property-value>
+    </ra-config-property>
+    <ra-config-property>
+        <ra-config-property-name>TransactionManagerLocatorMethod</ra-config-property-name>
+        <ra-config-property-type>java.lang.String</ra-config-property-type>
+        <ra-config-property-value>getTm</ra-config-property-value>
+    </ra-config-property>
+</jboss-ra>

Added: qpid/trunk/qpid/java/jca/src/main/resources/META-INF/ra.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/resources/META-INF/ra.xml?rev=1220336&view=auto
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/resources/META-INF/ra.xml (added)
+++ qpid/trunk/qpid/java/jca/src/main/resources/META-INF/ra.xml Sun Dec 18 05:09:07 2011
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ - 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.
+ -
+ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+           http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+           version="1.5">
+
+  <description>QPID Resource Adapter</description>
+  <display-name>QPID Resource Adapter</display-name>
+
+  <vendor-name>Apache Software Foundation</vendor-name>
+  <eis-type>JMS 1.1 Server</eis-type>
+  <resourceadapter-version>1.0</resourceadapter-version>
+
+  <license>
+    <description>
+      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.
+    </description>
+    <license-required>true</license-required>
+  </license>
+
+  <resourceadapter>
+    <resourceadapter-class>org.apache.qpid.ra.QpidResourceAdapter</resourceadapter-class>
+    <config-property>
+      <description>Client ID for the connection</description>
+      <config-property-name>ClientId</config-property-name>
+      <config-property-type>java.lang.String</config-property-type>
+      <config-property-value>client_id</config-property-value>
+    </config-property>
+
+    <config-property>
+      <description>Number of setup attempts before failing</description>
+      <config-property-name>SetupAttempts</config-property-name>
+      <config-property-type>java.lang.Integer</config-property-type>
+      <config-property-value>5</config-property-value>
+    </config-property>
+
+    <config-property>
+      <description>Interval between setup attempts</description>
+      <config-property-name>SetupInterval</config-property-name>
+      <config-property-type>java.lang.Long</config-property-type>
+      <config-property-value>5000</config-property-value>
+    </config-property>
+
+    <config-property>
+      <description>Use local transactions rather than XA</description>
+      <config-property-name>UseLocalTx</config-property-name>
+      <config-property-type>java.lang.Boolean</config-property-type>
+      <config-property-value>false</config-property-value>
+    </config-property>
+
+    <config-property>
+      <description>Broker host</description>
+      <config-property-name>Host</config-property-name>
+      <config-property-type>java.lang.String</config-property-type>
+      <config-property-value>localhost</config-property-value>
+    </config-property>
+
+    <config-property>
+      <description>Broker port</description>
+      <config-property-name>Port</config-property-name>
+      <config-property-type>java.lang.Integer</config-property-type>
+      <config-property-value>5672</config-property-value>
+    </config-property>
+
+    <config-property>
+      <description>Virtual Path for Connection Factory</description>
+      <config-property-name>Path</config-property-name>
+      <config-property-type>java.lang.String</config-property-type>
+      <config-property-value>test</config-property-value>
+    </config-property>
+
+    <config-property>
+      <description>connection URL</description>
+      <config-property-name>ConnectionURL</config-property-name>
+      <config-property-type>java.lang.String</config-property-type>
+      <config-property-value>amqp://guest:guest@/test?brokerlist='tcp://localhost:5672'</config-property-value>
+    </config-property>
+
+    <outbound-resourceadapter>
+      <connection-definition>
+        <managedconnectionfactory-class>org.apache.qpid.ra.QpidRAManagedConnectionFactory</managedconnectionfactory-class>
+
+        <config-property>
+          <description>Default session type</description>
+          <config-property-name>sessionDefaultType</config-property-name>
+          <config-property-type>java.lang.String</config-property-type>
+          <config-property-value>javax.jms.Queue</config-property-value>
+        </config-property>
+
+        <config-property>
+          <description>Specify lock timeout in seconds</description>
+          <config-property-name>useTryLock</config-property-name>
+          <config-property-type>java.lang.Integer</config-property-type>
+          <config-property-value>0</config-property-value>
+        </config-property>
+
+        <config-property>
+         <description>Use local transactions rather than XA</description>
+         <config-property-name>UseLocalTx</config-property-name>
+         <config-property-type>java.lang.Boolean</config-property-type>
+         <config-property-value>false</config-property-value>
+       </config-property>
+
+        <config-property>
+          <description>Client ID for the connection</description>
+          <config-property-name>ClientID</config-property-name>
+          <config-property-type>java.lang.String</config-property-type>
+          <config-property-value>client_id</config-property-value>
+        </config-property>
+
+        <config-property>
+          <description>Connection URL</description>
+          <config-property-name>ConnectionURL</config-property-name>
+          <config-property-type>java.lang.String</config-property-type>
+          <config-property-value></config-property-value>
+        </config-property>
+
+        <config-property>
+          <description>Broker host</description>
+          <config-property-name>Host</config-property-name>
+          <config-property-type>java.lang.String</config-property-type>
+          <config-property-value>localhost</config-property-value>
+        </config-property>
+
+        <config-property>
+          <description>Broker port</description>
+          <config-property-name>Port</config-property-name>
+          <config-property-type>java.lang.Integer</config-property-type>
+          <config-property-value>5672</config-property-value>
+        </config-property>
+
+        <config-property>
+          <description>Virtual Path for Connection Factory</description>
+          <config-property-name>Path</config-property-name>
+          <config-property-type>java.lang.String</config-property-type>
+          <config-property-value>test</config-property-value>
+        </config-property>
+
+        <connectionfactory-interface>org.apache.qpid.ra.QpidRAConnectionFactory</connectionfactory-interface>
+        <connectionfactory-impl-class>org.apache.qpid.ra.QpidRAConnectionFactoryImpl</connectionfactory-impl-class>
+        <connection-interface>javax.jms.Session</connection-interface>
+        <connection-impl-class>org.apache.qpid.ra.QpidRASessionImpl</connection-impl-class>
+      </connection-definition>
+      <transaction-support>XATransaction</transaction-support>
+      <authentication-mechanism>
+        <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+        <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+      </authentication-mechanism>
+      <reauthentication-support>false</reauthentication-support>
+    </outbound-resourceadapter>
+      <inbound-resourceadapter>
+        <messageadapter>
+          <messagelistener>
+            <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
+            <activationspec>
+              <activationspec-class>org.apache.qpid.ra.inflow.QpidActivationSpec</activationspec-class>
+              <required-config-property>
+                <config-property-name>destination</config-property-name>
+              </required-config-property>
+            </activationspec>
+          </messagelistener>
+        </messageadapter>
+      </inbound-resourceadapter>
+
+      <adminobject>
+            <adminobject-interface>javax.jms.Destination</adminobject-interface>
+            <adminobject-class> org.apache.qpid.ra.admin.QpidDestinationProxy</adminobject-class>
+            <config-property>
+                <config-property-name>destinationAddress </config-property-name>
+                <config-property-type>java.lang.String </config-property-type>
+            </config-property>
+            <config-property>
+                <config-property-name>destinationType</config-property-name>
+                <config-property-type>java.lang.String </config-property-type>
+            </config-property>
+        </adminobject>
+      <adminobject>
+            <adminobject-interface>javax.jms.ConnectionFactory</adminobject-interface>
+            <adminobject-class> org.apache.qpid.ra.admin.QpidConnectionFactoryProxy</adminobject-class>
+            <config-property>
+                <config-property-name>connectionURL</config-property-name>
+                <config-property-type>java.lang.String </config-property-type>
+            </config-property>
+        </adminobject>
+   </resourceadapter>
+</connector>

Propchange: qpid/trunk/qpid/java/jca/src/main/resources/META-INF/ra.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: qpid/trunk/qpid/java/lib/geronimo-ejb_3.0_spec-1.0.1.jar
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/lib/geronimo-ejb_3.0_spec-1.0.1.jar?rev=1220336&view=auto
==============================================================================
Files qpid/trunk/qpid/java/lib/geronimo-ejb_3.0_spec-1.0.1.jar (added) and qpid/trunk/qpid/java/lib/geronimo-ejb_3.0_spec-1.0.1.jar Sun Dec 18 05:09:07 2011 differ

Added: qpid/trunk/qpid/java/lib/geronimo-j2ee-connector_1.5_spec-2.0.0.jar
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/lib/geronimo-j2ee-connector_1.5_spec-2.0.0.jar?rev=1220336&view=auto
==============================================================================
Files qpid/trunk/qpid/java/lib/geronimo-j2ee-connector_1.5_spec-2.0.0.jar (added) and qpid/trunk/qpid/java/lib/geronimo-j2ee-connector_1.5_spec-2.0.0.jar Sun Dec 18 05:09:07 2011 differ

Added: qpid/trunk/qpid/java/lib/geronimo-jta_1.1_spec-1.1.1.jar
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/lib/geronimo-jta_1.1_spec-1.1.1.jar?rev=1220336&view=auto
==============================================================================
Files qpid/trunk/qpid/java/lib/geronimo-jta_1.1_spec-1.1.1.jar (added) and qpid/trunk/qpid/java/lib/geronimo-jta_1.1_spec-1.1.1.jar Sun Dec 18 05:09:07 2011 differ

Added: qpid/trunk/qpid/java/lib/geronimo-kernel-2.2.1.jar
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/lib/geronimo-kernel-2.2.1.jar?rev=1220336&view=auto
==============================================================================
Files qpid/trunk/qpid/java/lib/geronimo-kernel-2.2.1.jar (added) and qpid/trunk/qpid/java/lib/geronimo-kernel-2.2.1.jar Sun Dec 18 05:09:07 2011 differ



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org