[jboss-cvs] JBossAS SVN: r110772 - in projects/jboss-jca/trunk: core and 14 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 24 15:37:04 EST 2011


Author: jesper.pedersen
Date: 2011-02-24 15:37:03 -0500 (Thu, 24 Feb 2011)
New Revision: 110772

Added:
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/ActivationImpl.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/EndpointImpl.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/MessageListenerImpl.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/SimpleResourceAdapterRepository.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/package.html
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/Activation.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/AlreadyExistsException.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/Endpoint.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/MessageListener.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/NotFoundException.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/ResourceAdapterRepository.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/ResourceAdapterRepositoryException.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/package.html
   projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/
   projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/HornetQTestCase.java
   projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/package.html
   projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/
   projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/HornetQMessageEndpoint.java
   projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/HornetQMessageEndpointFactory.java
   projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/package.html
   projects/jboss-jca/trunk/core/src/test/resources/hornetq-configuration.xml
   projects/jboss-jca/trunk/core/src/test/resources/hornetq-jms.xml
   projects/jboss-jca/trunk/core/src/test/resources/hornetq-users.xml
   projects/jboss-jca/trunk/core/src/test/resources/hornetq.xml
Modified:
   projects/jboss-jca/trunk/build.xml
   projects/jboss-jca/trunk/core/build.xml
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractResourceAdapterDeployer.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalDeployment.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalRADeployer.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAActivator.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAActivatorDeployment.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAConfiguration.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployment.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RaXmlDeployer.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RaXmlDeployment.java
   projects/jboss-jca/trunk/doc/userguide/en-US/modules/configuration.xml
   projects/jboss-jca/trunk/embedded/src/main/resources/jca.xml
   projects/jboss-jca/trunk/ivy.xml
   projects/jboss-jca/trunk/lib/
   projects/jboss-jca/trunk/sjc/src/main/resources/bootstrap/jca.xml
Log:
[JBJCA-503] Inflow support

Modified: projects/jboss-jca/trunk/build.xml
===================================================================
--- projects/jboss-jca/trunk/build.xml	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/build.xml	2011-02-24 20:37:03 UTC (rev 110772)
@@ -100,13 +100,16 @@
   <property name="version.h2" value="1.2.145"/>
   <property name="version.hibernate-annotations" value="3.5.1-Final"/>
   <property name="version.hibernate-validator" value="4.1.0.Final"/>
+  <property name="version.hornetq" value="2.2.0.QA-10129"/>
   <property name="version.javassist" value="3.14.0-GA"/>
   <property name="version.jboss.common" value="2.2.17.GA"/>
   <property name="version.jboss.integration" value="5.1.0.CR1"/>
   <property name="version.jboss.jaspi.api" value="1.0.0.GA"/>
+  <property name="version.jboss.jms.api" value="1.0.0.Beta1"/>
   <property name="version.jboss.logging" value="3.0.0.Beta3"/>
   <property name="version.jboss.logmanager" value="1.2.0.CR8"/>
   <property name="version.jboss.naming" value="5.0.3.GA"/>
+  <property name="version.jboss.netty" value="3.2.1.Final"/>
   <property name="version.jboss.papaki" value="1.0.0.Beta3"/>
   <property name="version.jboss.picketbox" value="4.0.0.Alpha3"/>
   <property name="version.jboss.security" value="2.1.0.20090318"/>
@@ -148,6 +151,9 @@
     <fileset dir="${lib.dir}/jetty">
       <include name="**/*.jar"/>
     </fileset>
+    <fileset dir="${lib.dir}/hornetq">
+      <include name="**/*.jar"/>
+    </fileset>
     <fileset dir="${lib.dir}/sjc">
       <include name="**/*.jar"/>
     </fileset>
@@ -185,6 +191,9 @@
     <fileset dir="${lib.dir}/mail">
       <include name="**/*.jar"/>
     </fileset>
+    <fileset dir="${lib.dir}/hornetq">
+      <include name="**/*.jar"/>
+    </fileset>
     <fileset dir="${lib.dir}/test">
       <include name="**/*.jar"/>
     </fileset>
@@ -213,6 +222,9 @@
     <fileset dir="${lib.dir}/jetty">
       <include name="**/*.jar"/>
     </fileset>
+    <fileset dir="${lib.dir}/hornetq">
+      <include name="**/*.jar"/>
+    </fileset>
     <fileset dir="${lib.dir}/sjc">
       <include name="**/*.jar"/>
     </fileset>
@@ -271,7 +283,7 @@
        ================================= -->
   <target name="resolve" depends="init">
     <ivy:retrieve pattern="${lib.dir}/[conf]/[artifact].[ext]" 
-                  conf="common,sjc,embedded,arquillian,jetty,mail,test,tools,rhq"
+                  conf="common,sjc,embedded,arquillian,jetty,hornetq,mail,rhq,test,tools"
                   sync="true"/>
   </target>
   
@@ -503,6 +515,9 @@
         <fileset dir="${lib.dir}/jetty">
           <include name="*.jar"/>
         </fileset>
+        <fileset dir="${lib.dir}/hornetq">
+          <include name="*.jar"/>
+        </fileset>
         <fileset dir="${lib.dir}/sjc">
           <include name="*.jar"/>
         </fileset>
@@ -556,6 +571,9 @@
         <fileset dir="${lib.dir}/jetty">
           <include name="*.jar"/>
         </fileset>
+        <fileset dir="${lib.dir}/hornetq">
+          <include name="*.jar"/>
+        </fileset>
         <fileset dir="${lib.dir}/sjc">
           <include name="*.jar"/>
         </fileset>
@@ -655,6 +673,7 @@
         <fileset dir="${lib.dir}/embedded" includes="*.jar" />
         <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
         <fileset dir="${lib.dir}/jetty" includes="*.jar" />
+        <fileset dir="${lib.dir}/hornetq" includes="*.jar" />
         <fileset dir="${lib.dir}/sjc" includes="*.jar" />
         <fileset dir="${lib.dir}/mail" includes="*.jar" />
         <fileset dir="${lib.dir}/test" includes="*.jar" />
@@ -694,6 +713,7 @@
         <fileset dir="${lib.dir}/embedded" includes="*.jar" />
         <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
         <fileset dir="${lib.dir}/jetty" includes="*.jar" />
+        <fileset dir="${lib.dir}/hornetq" includes="*.jar" />
         <fileset dir="${lib.dir}/sjc" includes="*.jar" />
         <fileset dir="${lib.dir}/mail" includes="*.jar" />
         <fileset dir="${lib.dir}/test" includes="*.jar" />
@@ -733,6 +753,7 @@
         <fileset dir="${lib.dir}/embedded" includes="*.jar" />
         <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
         <fileset dir="${lib.dir}/jetty" includes="*.jar" />
+        <fileset dir="${lib.dir}/hornetq" includes="*.jar" />
         <fileset dir="${lib.dir}/sjc" includes="*.jar" />
         <fileset dir="${lib.dir}/mail" includes="*.jar" />
         <fileset dir="${lib.dir}/test" includes="*.jar" />
@@ -772,6 +793,7 @@
         <fileset dir="${lib.dir}/embedded" includes="*.jar" />
         <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
         <fileset dir="${lib.dir}/jetty" includes="*.jar" />
+        <fileset dir="${lib.dir}/hornetq" includes="*.jar" />
         <fileset dir="${lib.dir}/sjc" includes="*.jar" />
         <fileset dir="${lib.dir}/mail" includes="*.jar" />
         <fileset dir="${lib.dir}/test" includes="*.jar" />
@@ -811,6 +833,7 @@
         <fileset dir="${lib.dir}/embedded" includes="*.jar" />
         <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
         <fileset dir="${lib.dir}/jetty" includes="*.jar" />
+        <fileset dir="${lib.dir}/hornetq" includes="*.jar" />
         <fileset dir="${lib.dir}/sjc" includes="*.jar" />
         <fileset dir="${lib.dir}/mail" includes="*.jar" />
         <fileset dir="${lib.dir}/test" includes="*.jar" />
@@ -850,6 +873,7 @@
         <fileset dir="${lib.dir}/embedded" includes="*.jar" />
         <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
         <fileset dir="${lib.dir}/jetty" includes="*.jar" />
+        <fileset dir="${lib.dir}/hornetq" includes="*.jar" />
         <fileset dir="${lib.dir}/sjc" includes="*.jar" />
         <fileset dir="${lib.dir}/mail" includes="*.jar" />
         <fileset dir="${lib.dir}/test" includes="*.jar" />
@@ -890,6 +914,7 @@
         <fileset dir="${lib.dir}/embedded" includes="*.jar" />
         <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
         <fileset dir="${lib.dir}/jetty" includes="*.jar" />
+        <fileset dir="${lib.dir}/hornetq" includes="*.jar" />
         <fileset dir="${lib.dir}/sjc" includes="*.jar" />
         <fileset dir="${lib.dir}/mail" includes="*.jar" />
         <fileset dir="${lib.dir}/test" includes="*.jar" />

Modified: projects/jboss-jca/trunk/core/build.xml
===================================================================
--- projects/jboss-jca/trunk/core/build.xml	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/core/build.xml	2011-02-24 20:37:03 UTC (rev 110772)
@@ -167,6 +167,7 @@
         <fileset dir="${lib.dir}/common" includes="*.jar" />
         <fileset dir="${lib.dir}/embedded" includes="*.jar" />
         <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
+        <fileset dir="${lib.dir}/hornetq" includes="*.jar" />
         <fileset dir="${lib.dir}/sjc" includes="*.jar" />
         <fileset dir="${lib.dir}/test" includes="*.jar" />
       </classpath>
@@ -217,6 +218,7 @@
         <fileset dir="${lib.dir}/common" includes="*.jar" />
         <fileset dir="${lib.dir}/embedded" includes="*.jar" />
         <fileset dir="${lib.dir}/arquillian" includes="*.jar" />
+        <fileset dir="${lib.dir}/hornetq" includes="*.jar" />
         <fileset dir="${lib.dir}/sjc" includes="*.jar" />
         <fileset dir="${lib.dir}/test" includes="*.jar" />
       </classpath>
@@ -266,6 +268,12 @@
       </manifest>
     </jar>
 
+    <copy todir="${build.core.dir}/test" flatten="true">
+      <fileset dir="${lib.dir}/hornetq">
+        <include name="**/*.rar"/>
+      </fileset>
+    </copy>
+
   </target>
 
   <!-- ================================= 

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/ActivationImpl.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/ActivationImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/ActivationImpl.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.rar;
+
+import org.jboss.jca.core.spi.rar.Activation;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.resource.spi.ActivationSpec;
+
+/**
+ * An activation implementation
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class ActivationImpl implements Activation
+{
+   /** Config properties */
+   private Map<String, Class<?>> configProperties;
+
+   /** Required config properties */
+   private Set<String> requiredConfigProperties;
+
+   /** ActivationSpec instance */
+   private ActivationSpec instance;
+
+   /**
+    * Constructor
+    * @param configProperties The config properties
+    * @param requiredConfigProperties The required config properties
+    * @param instance The instance
+    */
+   ActivationImpl(Map<String, Class<?>> configProperties,
+                  Set<String> requiredConfigProperties,
+                  ActivationSpec instance)
+   {
+      this.configProperties = configProperties;
+      this.requiredConfigProperties = requiredConfigProperties;
+      this.instance = instance;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public Map<String, Class<?>> getConfigProperties()
+   {
+      return configProperties;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public Set<String> getRequiredConfigProperties()
+   {
+      return requiredConfigProperties;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public ActivationSpec getInstance()
+   {
+      return instance;
+   }
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/EndpointImpl.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/EndpointImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/EndpointImpl.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.rar;
+
+import org.jboss.jca.core.spi.rar.Endpoint;
+
+import java.lang.ref.WeakReference;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ActivationSpec;
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.endpoint.MessageEndpointFactory;
+
+/**
+ * An endpoint representation
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class EndpointImpl implements Endpoint
+{
+   /** The reference to the resource adapter instance */
+   private WeakReference<ResourceAdapter> ra;
+
+   /**
+    * Constructor
+    * @param ra The resource adapter reference
+    */
+   EndpointImpl(WeakReference<ResourceAdapter> ra)
+   {
+      this.ra = ra;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void activate(MessageEndpointFactory endpointFactory,
+                        ActivationSpec spec) throws ResourceException
+   {
+      ResourceAdapter rar = ra.get();
+
+      if (rar == null)
+         throw new ResourceException("ResourceAdapter instance not active");
+
+      rar.endpointActivation(endpointFactory, spec);
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void deactivate(MessageEndpointFactory endpointFactory,
+                          ActivationSpec spec) throws ResourceException
+   {
+      ResourceAdapter rar = ra.get();
+
+      if (rar == null)
+         throw new ResourceException("ResourceAdapter instance not active");
+
+      rar.endpointDeactivation(endpointFactory, spec);
+   }
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/MessageListenerImpl.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/MessageListenerImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/MessageListenerImpl.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.rar;
+
+import org.jboss.jca.core.spi.rar.Activation;
+import org.jboss.jca.core.spi.rar.MessageListener;
+
+/**
+ * A message listener implementation
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class MessageListenerImpl implements MessageListener
+{
+   /** The message listener type */
+   private Class<?> type;
+
+   /** The activation */
+   private Activation activation;
+
+   /**
+    * Constructor
+    * @param type The type
+    * @param activation The activation
+    */
+   MessageListenerImpl(Class<?> type, Activation activation)
+   {
+      this.type = type;
+      this.activation = activation;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public Class<?> getType()
+   {
+      return type;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public Activation getActivation()
+   {
+      return activation;
+   }
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/SimpleResourceAdapterRepository.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/SimpleResourceAdapterRepository.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/SimpleResourceAdapterRepository.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,329 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.rar;
+
+import org.jboss.jca.common.api.metadata.ra.ConfigProperty;
+import org.jboss.jca.common.api.metadata.ra.Connector;
+import org.jboss.jca.common.api.metadata.ra.RequiredConfigProperty;
+import org.jboss.jca.common.api.metadata.ra.ResourceAdapter1516;
+import org.jboss.jca.common.api.metadata.ra.ra15.Activationspec15;
+import org.jboss.jca.core.spi.mdr.MetadataRepository;
+import org.jboss.jca.core.spi.rar.AlreadyExistsException;
+import org.jboss.jca.core.spi.rar.Endpoint;
+import org.jboss.jca.core.spi.rar.NotFoundException;
+import org.jboss.jca.core.spi.rar.ResourceAdapterRepository;
+
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ActivationSpec;
+import javax.resource.spi.ResourceAdapter;
+
+/**
+ * A simple implementation of the resource adapter repository
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class SimpleResourceAdapterRepository implements ResourceAdapterRepository
+{
+   /** Resource adapters */
+   private Map<String, WeakReference<ResourceAdapter>> rars;
+
+   /** Ids */
+   private Map<String, AtomicInteger> ids;
+
+   /** The metadata repository */
+   private MetadataRepository mdr;
+
+   /**
+    * Constructor
+    */
+   public SimpleResourceAdapterRepository()
+   {
+      this.rars = new HashMap<String, WeakReference<ResourceAdapter>>();
+      this.ids = new HashMap<String, AtomicInteger>();
+      this.mdr = null;
+   }
+
+   /**
+    * Set the metadata repository
+    * @param v The value
+    */
+   public void setMetadataRepository(MetadataRepository v)
+   {
+      this.mdr = v;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public synchronized void registerResourceAdapter(ResourceAdapter ra) 
+      throws AlreadyExistsException
+   {
+      if (ra == null)
+         throw new IllegalArgumentException("ResourceAdapter is null");
+
+      for (WeakReference<ResourceAdapter> wr : rars.values())
+      {
+         if (wr.get() != null)
+         {
+            if (wr.get().equals(ra))
+               throw new AlreadyExistsException(ra + " already registered");
+         }
+      }
+
+      String clzName = ra.getClass().getName();
+
+      AtomicInteger id = ids.get(clzName);
+      if (id == null)
+      {
+         id = new AtomicInteger(0);
+         ids.put(clzName, id);
+      }
+
+      String key = clzName + "#" + id.incrementAndGet();
+
+      rars.put(key, new WeakReference<ResourceAdapter>(ra));
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public synchronized void unregisterResourceAdapter(ResourceAdapter ra) throws NotFoundException
+   {
+      if (ra == null)
+         throw new IllegalArgumentException("ResourceAdapter is null");
+
+      String key = null;
+
+      Iterator<Map.Entry<String, WeakReference<ResourceAdapter>>> it = rars.entrySet().iterator();
+      while (key == null && it.hasNext())
+      {
+         Map.Entry<String, WeakReference<ResourceAdapter>> entry = it.next();
+
+         String k = entry.getKey();
+         WeakReference<ResourceAdapter> wr = entry.getValue();
+
+         if (wr.get() != null)
+         {
+            if (wr.get().equals(ra))
+               key = k;
+         }
+      }
+      
+      if (key == null)
+         throw new NotFoundException(ra + " isn't registered");
+
+      rars.remove(key);
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public synchronized Set<String> getResourceAdapters()
+   {
+      return Collections.unmodifiableSet(rars.keySet());
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public synchronized Endpoint getEndpoint(String uniqueId) throws NotFoundException
+   {
+      if (uniqueId == null)
+         throw new IllegalArgumentException("UniqueId is null");
+
+      if (uniqueId.trim().equals(""))
+         throw new IllegalArgumentException("UniqueId is empty");
+
+      if (!rars.containsKey(uniqueId))
+         throw new NotFoundException(uniqueId + " isn't registered");
+
+      WeakReference<ResourceAdapter> ra = rars.get(uniqueId);
+
+      if (ra.get() == null)
+         throw new NotFoundException(uniqueId + " isn't registered");
+
+      return new EndpointImpl(ra);
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public synchronized List<org.jboss.jca.core.spi.rar.MessageListener> getMessageListeners(String uniqueId)
+      throws NotFoundException, InstantiationException, IllegalAccessException
+   {
+      if (uniqueId == null)
+         throw new IllegalArgumentException("UniqueId is null");
+
+      if (uniqueId.trim().equals(""))
+         throw new IllegalArgumentException("UniqueId is empty");
+
+      if (!rars.containsKey(uniqueId))
+         throw new NotFoundException(uniqueId + " isn't registered");
+
+      WeakReference<ResourceAdapter> ra = rars.get(uniqueId);
+
+      if (ra.get() == null)
+         throw new NotFoundException(uniqueId + " isn't registered");
+
+      if (mdr == null)
+         throw new IllegalStateException("MDR is null");
+      
+      ResourceAdapter rar = ra.get();
+      Connector md = null;
+
+      Set<String> mdrKeys = mdr.getResourceAdapters();
+      Iterator<String> mdrIt = mdrKeys.iterator();
+
+      while (md == null && mdrIt.hasNext())
+      {
+         String mdrId = mdrIt.next();
+         try
+         {
+            Connector c = mdr.getResourceAdapter(mdrId);
+            
+            if (c.getResourceadapter() != null && c.getResourceadapter() instanceof ResourceAdapter1516)
+            {
+               ResourceAdapter1516 ra1516 = (ResourceAdapter1516)c.getResourceadapter();
+               String clz = ra1516.getResourceadapterClass();
+
+               if (rar.getClass().getName().equals(clz))
+                  md = c;
+            }
+         }
+         catch (Throwable t)
+         {
+            throw new NotFoundException("Unable to lookup resource adapter in MDR: " + uniqueId, t);
+         }
+      }
+
+      if (md == null)
+         throw new NotFoundException("Unable to lookup resource adapter in MDR: " + uniqueId);
+
+      if (md != null && md.getResourceadapter() != null && md.getResourceadapter() instanceof ResourceAdapter1516)
+      {
+         ResourceAdapter1516 ra1516 = (ResourceAdapter1516)md.getResourceadapter();
+
+         if (ra1516.getInboundResourceadapter() != null &&
+             ra1516.getInboundResourceadapter().getMessageadapter() != null &&
+             ra1516.getInboundResourceadapter().getMessageadapter().getMessagelisteners() != null &&
+             ra1516.getInboundResourceadapter().getMessageadapter().getMessagelisteners().size() > 0)
+         {
+            List<org.jboss.jca.common.api.metadata.ra.MessageListener> listeners =
+               ra1516.getInboundResourceadapter().getMessageadapter().getMessagelisteners();
+
+            List<org.jboss.jca.core.spi.rar.MessageListener> result =
+               new ArrayList<org.jboss.jca.core.spi.rar.MessageListener>(listeners.size());
+
+            for (org.jboss.jca.common.api.metadata.ra.MessageListener ml : listeners)
+            {
+               result.add(createMessageListener(rar, ml));
+            }
+
+            return result;
+         }
+      }
+
+      return Collections.emptyList();
+   }
+
+   /**
+    * Create a message listener instance
+    * @param rar The resource adapter
+    * @param ml The metadata for the message listener
+    * @return The instance
+    * @exception InstantiationException Thrown if an object couldn't created
+    * @exception IllegalAccessException Thrown if object access is inaccessible
+    */
+   private org.jboss.jca.core.spi.rar.MessageListener 
+   createMessageListener(ResourceAdapter rar, org.jboss.jca.common.api.metadata.ra.MessageListener ml)
+      throws InstantiationException, IllegalAccessException
+   {
+      try
+      {
+         ClassLoader cl = rar.getClass().getClassLoader();
+
+         Class<?> type = Class.forName(ml.getMessagelistenerType().getValue(), true, cl);
+
+         Map<String, Class<?>> configProperties = new HashMap<String, Class<?>>();
+         Set<String> requiredConfigProperties = new HashSet<String>();
+
+         Activationspec15 as = ml.getActivationspec();
+
+         List<? extends ConfigProperty> cps = as.getConfigProperties();
+         if (cps != null && cps.size() > 0)
+         {
+            for (ConfigProperty cp : cps)
+            {
+               String name = cp.getConfigPropertyName().getValue();
+               Class<?> ct = Class.forName(cp.getConfigPropertyType().getValue(), true, cl);
+
+               configProperties.put(name, ct);
+            }
+         }
+
+         List<? extends RequiredConfigProperty> rcps = as.getRequiredConfigProperties();
+         if (rcps != null && rcps.size() > 0)
+         {
+            for (RequiredConfigProperty rcp : rcps)
+            {
+               String name = rcp.getConfigPropertyName().getValue();
+
+               requiredConfigProperties.add(name);
+            }
+         }
+
+         Class<?> asClz = Class.forName(as.getActivationspecClass().getValue(), true, cl);
+         ActivationSpec instance = (ActivationSpec)asClz.newInstance();
+         instance.setResourceAdapter(rar);
+
+         ActivationImpl a = new ActivationImpl(Collections.unmodifiableMap(configProperties),
+                                               Collections.unmodifiableSet(requiredConfigProperties),
+                                               instance);
+
+         return new MessageListenerImpl(type, a);
+      }
+      catch (ResourceException re)
+      {
+         InstantiationException ie = new InstantiationException("Unable to create representation");
+         ie.initCause(re);
+         throw ie;
+      }
+      catch (ClassNotFoundException cnfe)
+      {
+         InstantiationException ie = new InstantiationException("Unable to create representation");
+         ie.initCause(cnfe);
+         throw ie;
+      }
+   }
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/package.html
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/rar/package.html	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,3 @@
+<body>
+This package contains an implementation of the resource adapter repository.
+</body>

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/Activation.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/Activation.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/Activation.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.spi.rar;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.resource.spi.ActivationSpec;
+
+/**
+ * An activation representation
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public interface Activation
+{
+   /**
+    * Get the config-property map with name and type pair
+    * @return The value
+    */
+   public Map<String, Class<?>> getConfigProperties();
+
+   /**
+    * Get the required config-property set with names
+    * @return The value
+    */
+   public Set<String> getRequiredConfigProperties();
+
+   /**
+    * Get an instance of the associated activation spec.
+    * 
+    * Note, that there is only one instance associated with
+    * implementations of this interface
+    * @return The value
+    */
+   public ActivationSpec getInstance();
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/AlreadyExistsException.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/AlreadyExistsException.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/AlreadyExistsException.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.spi.rar;
+
+/**
+ * AlreadyExistsException is thrown in case the resource adapter already is registered
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class AlreadyExistsException extends ResourceAdapterRepositoryException
+{
+   /** Serial version UID */
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * Constructor
+    */
+   public AlreadyExistsException()
+   {
+      super();
+   }
+
+   /**
+    * Constructor
+    * @param message The exception message
+    */
+   public AlreadyExistsException(String message)
+   {
+      super(message);
+   }
+
+   /**
+    * Constructor
+    * @param message The exception message
+    * @param cause The cause of the exception
+    */
+   public AlreadyExistsException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+   /**
+    * Constructor
+    * @param cause The cause of the exception
+    */
+   public AlreadyExistsException(Throwable cause)
+   {
+      super(cause);
+   }
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/Endpoint.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/Endpoint.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/Endpoint.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.spi.rar;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ActivationSpec;
+import javax.resource.spi.endpoint.MessageEndpointFactory;
+
+/**
+ * An endpoint representation
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public interface Endpoint
+{
+   /**
+    * Activate an endpoint
+    * @param endpointFactory The message endpoint factory that should be used for the endpoint
+    * @param spec The activation spec that should be used for the endpoint
+    * @exception ResourceException Thrown if an error occurs
+    */
+   public void activate(MessageEndpointFactory endpointFactory,
+                        ActivationSpec spec) throws ResourceException;
+
+   /**
+    * Deactivate an endpoint
+    * @param endpointFactory The message endpoint factory that should be used for the endpoint
+    * @param spec The activation spec that should be used for the endpoint
+    * @exception ResourceException Thrown if an error occurs
+    */
+   public void deactivate(MessageEndpointFactory endpointFactory,
+                          ActivationSpec spec) throws ResourceException;
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/MessageListener.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/MessageListener.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/MessageListener.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.spi.rar;
+
+/**
+ * A message listener representation
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public interface MessageListener
+{
+   /**
+    * Get the message listener type
+    * @return The value
+    */
+   public Class<?> getType();
+
+   /**
+    * Get the activation for the listener
+    * @return The value
+    */
+   public Activation getActivation();
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/NotFoundException.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/NotFoundException.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/NotFoundException.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.spi.rar;
+
+/**
+ * NotFoundExcepion is thrown in case a resource adapter isn't found in the repository
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class NotFoundException extends ResourceAdapterRepositoryException
+{
+   /** Serial version UID */
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * Constructor
+    */
+   public NotFoundException()
+   {
+      super();
+   }
+
+   /**
+    * Constructor
+    * @param message The exception message
+    */
+   public NotFoundException(String message)
+   {
+      super(message);
+   }
+
+   /**
+    * Constructor
+    * @param message The exception message
+    * @param cause The cause of the exception
+    */
+   public NotFoundException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+   /**
+    * Constructor
+    * @param cause The cause of the exception
+    */
+   public NotFoundException(Throwable cause)
+   {
+      super(cause);
+   }
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/ResourceAdapterRepository.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/ResourceAdapterRepository.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/ResourceAdapterRepository.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.spi.rar;
+
+import java.util.List;
+import java.util.Set;
+
+import javax.resource.spi.ResourceAdapter;
+
+/**
+ * The SPI for the resource adapter repository
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public interface ResourceAdapterRepository
+{
+   /**
+    * Register a resource adapter
+    * @param ra The resource adapter instance
+    * @exception AlreadyExistsException Thrown if the unique id is already registered
+    */
+   public void registerResourceAdapter(ResourceAdapter ra) throws AlreadyExistsException;
+
+   /**
+    * Unregister a resource adapter
+    * @param ra The resource adapter instance
+    * @exception NotFoundException Thrown if the unique id isn't registered
+    */
+   public void unregisterResourceAdapter(ResourceAdapter ra) throws NotFoundException;
+
+   /**
+    * Get the resource adapters unique ids registered
+    * @return The unique ids
+    */
+   public Set<String> getResourceAdapters();
+
+   /**
+    * Get an endpoint representation for a resource adapter
+    * @param uniqueId An unique id that represents the deployment
+    * @return The endpoint
+    * @exception NotFoundException Thrown if the unique id isn't registered
+    */
+   public Endpoint getEndpoint(String uniqueId) throws NotFoundException;
+
+   /**
+    * Get a list of message listeners supported for a resource adapter
+    * @param uniqueId An unique id that represents the deployment
+    * @return The list of message listeners
+    * @exception NotFoundException Thrown if the unique id isn't registered
+    * @exception InstantiationException Thrown if an object couldn't created
+    * @exception IllegalAccessException Thrown if object access is inaccessible
+    */
+   public List<MessageListener> getMessageListeners(String uniqueId) 
+      throws NotFoundException, InstantiationException, IllegalAccessException;
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/ResourceAdapterRepositoryException.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/ResourceAdapterRepositoryException.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/ResourceAdapterRepositoryException.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.spi.rar;
+
+/**
+ * Top level exception for the resource adapter repository
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class ResourceAdapterRepositoryException extends Exception
+{
+   /** Serial version UID */
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * Constructor
+    */
+   public ResourceAdapterRepositoryException()
+   {
+      super();
+   }
+
+   /**
+    * Constructor
+    * @param message The exception message
+    */
+   public ResourceAdapterRepositoryException(String message)
+   {
+      super(message);
+   }
+
+   /**
+    * Constructor
+    * @param message The exception message
+    * @param cause The cause of the exception
+    */
+   public ResourceAdapterRepositoryException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+   /**
+    * Constructor
+    * @param cause The cause of the exception
+    */
+   public ResourceAdapterRepositoryException(Throwable cause)
+   {
+      super(cause);
+   }
+}

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/package.html
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/spi/rar/package.html	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,3 @@
+<body>
+This package contains the SPI for the resource adapter service registry.
+</body>

Added: projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/HornetQTestCase.java
===================================================================
--- projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/HornetQTestCase.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/HornetQTestCase.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,258 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.inflow;
+
+import org.jboss.jca.core.inflow.support.HornetQMessageEndpoint;
+import org.jboss.jca.core.inflow.support.HornetQMessageEndpointFactory;
+import org.jboss.jca.core.spi.rar.Endpoint;
+import org.jboss.jca.core.spi.rar.MessageListener;
+import org.jboss.jca.core.spi.rar.ResourceAdapterRepository;
+import org.jboss.jca.embedded.Embedded;
+import org.jboss.jca.embedded.EmbeddedFactory;
+
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.List;
+import java.util.Locale;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+import javax.resource.spi.ActivationSpec;
+
+import org.jboss.logging.Logger;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ * Test cases for HornetQ
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ * @version $Revision: $
+ */
+public class HornetQTestCase
+{
+
+   // --------------------------------------------------------------------------------||
+   // Class Members ------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   private static Logger log = Logger.getLogger(HornetQTestCase.class);
+
+   // --------------------------------------------------------------------------------||
+   // Tests --------------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   /**
+    * Basic
+    * @exception Throwable Thrown if case of an error
+    */
+   @Test
+   public void testBasic() throws Throwable
+   {
+      Embedded embedded = EmbeddedFactory.create(true);
+      URL hornetq = HornetQTestCase.class.getClassLoader().getResource("hornetq.xml");
+      InitialContext ic = null;
+
+      try
+      {
+         embedded.startup();
+         embedded.deploy(hornetq);
+
+         ic = new InitialContext();
+
+         ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
+         Queue exampleQueue = (Queue)ic.lookup("/queue/ExampleQueue");
+         Connection connection = cf.createConnection();
+
+         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         MessageProducer producer = session.createProducer(exampleQueue);
+
+         MessageConsumer consumer = session.createConsumer(exampleQueue);
+         connection.start();
+
+         TextMessage message = session.createTextMessage("This is an example");
+         producer.send(message);
+
+         TextMessage receivedMessage = (TextMessage)consumer.receive();
+         
+         assertEquals(message.getText(), receivedMessage.getText());
+
+         connection.stop();
+
+         consumer.close();
+         producer.close();
+         session.close();
+         connection.close();
+      }
+      finally
+      {
+         if (ic != null)
+            ic.close();
+
+         embedded.undeploy(hornetq);
+         embedded.shutdown();
+      }
+   }
+
+   /**
+    * Inflow
+    * @exception Throwable Thrown if case of an error
+    */
+   @Test
+   public void testInflow() throws Throwable
+   {
+      Embedded embedded = EmbeddedFactory.create(true);
+      URL hornetq = HornetQTestCase.class.getClassLoader().getResource("hornetq.xml");
+      URL hornetqRar = HornetQTestCase.class.getClassLoader().getResource("hornetq-ra.rar");
+
+      InitialContext ic = null;
+
+      try
+      {
+         embedded.startup();
+         embedded.deploy(hornetq);
+         embedded.deploy(hornetqRar);
+
+         ic = new InitialContext();
+
+         ResourceAdapterRepository raRepository = 
+            embedded.lookup("ResourceAdapterRepository", ResourceAdapterRepository.class);
+
+         assertNotNull(raRepository);
+
+         Set<String> ids = raRepository.getResourceAdapters();
+
+         assertNotNull(ids);
+         assertEquals(1, ids.size());
+
+         String hqId = ids.iterator().next();
+         assertNotNull(hqId);
+
+         Endpoint endpoint = raRepository.getEndpoint(hqId);
+         assertNotNull(endpoint);
+
+         List<MessageListener> listeners = raRepository.getMessageListeners(hqId);
+         assertNotNull(listeners);
+         assertEquals(1, listeners.size());
+
+         MessageListener listener = listeners.get(0);
+
+         ActivationSpec as = listener.getActivation().getInstance();
+         assertNotNull(as);
+         assertNotNull(as.getResourceAdapter());
+
+         setProperty(as, "destination", "queue/ExampleQueue");
+
+         CountDownLatch cdl = new CountDownLatch(1);
+         HornetQMessageEndpoint me = new HornetQMessageEndpoint(cdl);
+         HornetQMessageEndpointFactory mef = new HornetQMessageEndpointFactory(me);
+         
+         endpoint.activate(mef, as);
+
+         ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
+         Queue exampleQueue = (Queue)ic.lookup("/queue/ExampleQueue");
+         Connection connection = cf.createConnection();
+
+         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         MessageProducer producer = session.createProducer(exampleQueue);
+         connection.start();
+
+         String txt = "This is an example";
+         TextMessage message = session.createTextMessage(txt);
+         producer.send(message);
+
+         cdl.await();
+
+         Message receivedMessage = me.getMessage();
+         assertTrue(receivedMessage instanceof TextMessage);
+         assertEquals(txt, ((TextMessage)receivedMessage).getText());
+
+         endpoint.deactivate(mef, as);
+
+         connection.stop();
+
+         producer.close();
+         session.close();
+         connection.close();
+      }
+      finally
+      {
+         embedded.undeploy(hornetqRar);
+         embedded.undeploy(hornetq);
+         embedded.shutdown();
+      }
+   }
+
+   // --------------------------------------------------------------------------------||
+   // Lifecycle Methods --------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   /**
+    * Lifecycle start, before the suite is executed
+    * @throws Throwable throwable exception 
+    */
+   @BeforeClass
+   public static void beforeClass() throws Throwable
+   {
+   }
+
+   /**
+    * Lifecycle stop, after the suite is executed
+    * @throws Throwable throwable exception 
+    */
+   @AfterClass
+   public static void afterClass() throws Throwable
+   {
+   }
+
+   /**
+    * Set property
+    * @param o The object
+    * @param name The property name
+    * @param value The property value
+    * @exception Throwable Thrown if an error occurs
+    */
+   private void setProperty(Object o, String name, String value) throws Throwable
+   {
+      Class<?> c = o.getClass();
+
+      String methodName = "set" + name.substring(0, 1).toUpperCase(Locale.US);
+      if (name.length() > 1)
+         methodName += name.substring(1);
+
+      Method m = c.getMethod(methodName, String.class);
+      m.invoke(o, value);
+   }
+}

Added: projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/package.html
===================================================================
--- projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/package.html	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,3 @@
+<body>
+This package contains test cases for inflow resource adapters.
+</body>

Added: projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/HornetQMessageEndpoint.java
===================================================================
--- projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/HornetQMessageEndpoint.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/HornetQMessageEndpoint.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.inflow.support;
+
+import java.lang.reflect.Method;
+import java.util.concurrent.CountDownLatch;
+
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.resource.spi.endpoint.MessageEndpoint;
+
+import org.jboss.logging.Logger;
+
+/**
+ * A HornetQ message endpoint
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ * @version $Revision: $
+ */
+public class HornetQMessageEndpoint implements MessageEndpoint, MessageListener
+{
+   private static Logger log = Logger.getLogger(HornetQMessageEndpoint.class);
+
+   private CountDownLatch cdl;
+   private Message message;
+
+   /**
+    * Constructor
+    * @param cdl The count down latch
+    */
+   public HornetQMessageEndpoint(CountDownLatch cdl)
+   {
+      this.cdl = cdl;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void onMessage(Message message)
+   {
+      this.message = message;
+      
+      cdl.countDown();
+   }
+
+   /**
+    * Get the message
+    * @return The value
+    */
+   public Message getMessage()
+   {
+      return message;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void afterDelivery()
+   {
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void beforeDelivery(Method method)
+   {
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void release()
+   {
+   }
+}

Added: projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/HornetQMessageEndpointFactory.java
===================================================================
--- projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/HornetQMessageEndpointFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/HornetQMessageEndpointFactory.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.core.inflow.support;
+
+import java.lang.reflect.Method;
+
+import javax.resource.spi.endpoint.MessageEndpoint;
+import javax.resource.spi.endpoint.MessageEndpointFactory;
+import javax.transaction.xa.XAResource;
+
+import org.jboss.logging.Logger;
+
+/**
+ * A HornetQ message endpoint factory
+ * 
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ * @version $Revision: $
+ */
+public class HornetQMessageEndpointFactory implements MessageEndpointFactory
+{
+   private static Logger log = Logger.getLogger(HornetQMessageEndpointFactory.class);
+
+   private MessageEndpoint me;
+
+   /**
+    * Constructor
+    * @param me The message endpoint that should be used
+    */
+   public HornetQMessageEndpointFactory(MessageEndpoint me)
+   {
+      this.me = me;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public MessageEndpoint createEndpoint(XAResource xaResource)
+   {
+      return me;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public MessageEndpoint createEndpoint(XAResource xaResource, long timeout)
+   {
+      return me;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public boolean isDeliveryTransacted(Method method)
+   {
+      return false;
+   }
+}

Added: projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/package.html
===================================================================
--- projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/test/java/org/jboss/jca/core/inflow/support/package.html	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,3 @@
+<body>
+This package contains support classes, like message endpoints, for the inflow test classes.
+</body>

Added: projects/jboss-jca/trunk/core/src/test/resources/hornetq-configuration.xml
===================================================================
--- projects/jboss-jca/trunk/core/src/test/resources/hornetq-configuration.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/test/resources/hornetq-configuration.xml	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,80 @@
+<configuration xmlns="urn:hornetq"
+               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+               xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+  <paging-directory>${iron.jacamar.home}/data/hornetq/paging</paging-directory>
+   
+  <bindings-directory>${iron.jacamar.home}/data/hornetq/bindings</bindings-directory>
+   
+  <journal-directory>${iron.jacamar.home}/data/hornetq/journal</journal-directory>
+   
+  <journal-min-files>2</journal-min-files>
+   
+  <journal-file-size>131072</journal-file-size>
+   
+  <journal-type>NIO</journal-type>
+   
+  <large-messages-directory>${iron.jacamar.home}/data/hornetq/large-messages</large-messages-directory>
+   
+  <connectors>
+    <connector name="in-vm">
+      <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+      <param key="server-id" value="${hornetq.server-id:0}"/>
+    </connector>
+    
+    <connector name="netty">
+      <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+      <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
+      <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+    </connector>
+      
+    <connector name="netty-throughput">
+      <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+      <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
+      <param key="port"  value="${hornetq.remoting.netty.batch.port:5455}"/>
+      <param key="batch-delay" value="50"/>
+    </connector>
+  </connectors>
+
+  <acceptors>
+    <acceptor name="in-vm">
+      <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+    </acceptor>
+
+    <acceptor name="netty">
+      <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+      <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
+      <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+    </acceptor>
+      
+    <acceptor name="netty-throughput">
+      <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+      <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
+      <param key="port"  value="${hornetq.remoting.netty.batch.port:5455}"/>
+      <param key="batch-delay" value="50"/>
+      <param key="direct-deliver" value="false"/>
+    </acceptor>
+  </acceptors>
+
+  <security-settings>
+    <security-setting match="#">
+      <permission type="createNonDurableQueue" roles="guest"/>
+      <permission type="deleteNonDurableQueue" roles="guest"/>
+      <permission type="consume" roles="guest"/>
+      <permission type="send" roles="guest"/>
+    </security-setting>
+  </security-settings>
+
+  <address-settings>
+    <!--default for catch all-->
+    <address-setting match="#">
+      <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+      <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+      <redelivery-delay>0</redelivery-delay>
+      <max-size-bytes>10485760</max-size-bytes>       
+      <message-counter-history-day-limit>10</message-counter-history-day-limit>
+      <address-full-policy>BLOCK</address-full-policy>
+    </address-setting>
+  </address-settings>
+
+</configuration>

Added: projects/jboss-jca/trunk/core/src/test/resources/hornetq-jms.xml
===================================================================
--- projects/jboss-jca/trunk/core/src/test/resources/hornetq-jms.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/test/resources/hornetq-jms.xml	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,38 @@
+<configuration xmlns="urn:hornetq"
+	       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	       xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+  
+  <connection-factory name="NettyConnectionFactory">
+    <connectors>
+      <connector-ref connector-name="netty"/>
+    </connectors>
+    <entries>
+      <entry name="/ConnectionFactory"/>
+      <entry name="/XAConnectionFactory"/>
+    </entries>
+  </connection-factory>
+	
+  <connection-factory name="NettyThroughputConnectionFactory">
+    <connectors>
+      <connector-ref connector-name="netty-throughput"/>
+    </connectors>
+    <entries>
+      <entry name="/ThroughputConnectionFactory"/>
+      <entry name="/XAThroughputConnectionFactory"/>
+    </entries>
+  </connection-factory>
+	
+  <queue name="DLQ">
+    <entry name="/queue/DLQ"/>
+  </queue>
+  <queue name="ExpiryQueue">
+    <entry name="/queue/ExpiryQueue"/>
+  </queue>   
+  <queue name="ExampleQueue">
+    <entry name="/queue/ExampleQueue"/>
+  </queue>
+  <topic name="ExampleTopic">
+    <entry name="/topic/ExampleTopic"/>
+  </topic>
+	
+</configuration>

Added: projects/jboss-jca/trunk/core/src/test/resources/hornetq-users.xml
===================================================================
--- projects/jboss-jca/trunk/core/src/test/resources/hornetq-users.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/test/resources/hornetq-users.xml	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:hornetq /schema/hornetq-users.xsd">
+  <!-- the default user.  this is used where username is null-->
+  <defaultuser name="guest" password="guest">
+    <role name="guest"/>
+  </defaultuser>
+</configuration>

Added: projects/jboss-jca/trunk/core/src/test/resources/hornetq.xml
===================================================================
--- projects/jboss-jca/trunk/core/src/test/resources/hornetq.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/test/resources/hornetq.xml	2011-02-24 20:37:03 UTC (rev 110772)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment>
+
+  <!-- The core configuration -->
+  <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/>
+
+  <!-- The security manager -->
+  <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl">
+    <ignoreStart/>
+    <ignoreStop/>
+  </bean>
+
+  <!-- The core server -->
+  <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
+    <constructor>
+      <parameter><inject bean="Configuration"/></parameter>
+      <parameter><inject bean="Kernel" property="MBeanServer"/></parameter>
+      <parameter><inject bean="HornetQSecurityManager"/></parameter>        
+    </constructor>
+    <ignoreStart/>
+    <ignoreStop/>
+  </bean>
+   
+  <!-- The JMS server -->
+  <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
+    <constructor>         
+      <parameter><inject bean="HornetQServer"/></parameter>         
+    </constructor>
+  </bean>
+
+</deployment>

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractResourceAdapterDeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractResourceAdapterDeployer.java	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractResourceAdapterDeployer.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -46,7 +46,6 @@
 import org.jboss.jca.core.connectionmanager.pool.api.Pool;
 import org.jboss.jca.core.connectionmanager.pool.api.PoolFactory;
 import org.jboss.jca.core.connectionmanager.pool.api.PoolStrategy;
-import org.jboss.jca.core.spi.mdr.AlreadyExistsException;
 import org.jboss.jca.validator.Failure;
 import org.jboss.jca.validator.FailureHelper;
 import org.jboss.jca.validator.Key;
@@ -714,13 +713,13 @@
    * @throws DeployException DeployException
    * @throws ResourceException ResourceException
    * @throws ValidatorException ValidatorException
-   * @throws AlreadyExistsException AlreadyExistsException
+   * @throws org.jboss.jca.core.spi.mdr.AlreadyExistsException AlreadyExistsException
    * @throws ClassNotFoundException ClassNotFoundException
    * @throws Throwable Throwable
    */
    protected CommonDeployment createObjectsAndInjectValue(URL url, String deploymentName, File root, ClassLoader cl,
       Connector cmd, IronJacamar ijmd) throws DeployException, ResourceException, ValidatorException,
-      AlreadyExistsException, ClassNotFoundException, Throwable
+      org.jboss.jca.core.spi.mdr.AlreadyExistsException, ClassNotFoundException, Throwable
    {
       return createObjectsAndInjectValue(url, deploymentName, root, cl, cmd, ijmd, null);
    }
@@ -741,14 +740,14 @@
     * @throws DeployException DeployException
     * @throws ResourceException ResourceException
     * @throws ValidatorException ValidatorException
-    * @throws AlreadyExistsException AlreadyExistsException
+    * @throws org.jboss.jca.core.spi.mdr.AlreadyExistsException AlreadyExistsException
     * @throws ClassNotFoundException ClassNotFoundException
     * @throws Throwable Throwable
     */
    protected CommonDeployment createObjectsAndInjectValue(URL url, String deploymentName, File root, ClassLoader cl,
       Connector cmd, IronJacamar ijmd, org.jboss.jca.common.api.metadata.resourceadapter.ResourceAdapter raxml)
-      throws DeployException, ResourceException, ValidatorException, AlreadyExistsException, ClassNotFoundException,
-      Throwable
+      throws DeployException, ResourceException, ValidatorException, org.jboss.jca.core.spi.mdr.AlreadyExistsException,
+             ClassNotFoundException, Throwable
    {
       Set<Failure> failures = null;
       try
@@ -1486,7 +1485,7 @@
                // Register with MDR
                registerResourceAdapterToMDR(url, root, cmd, ijmd);
             }
-            catch (AlreadyExistsException e)
+            catch (org.jboss.jca.core.spi.mdr.AlreadyExistsException e)
             {
                //ignore it, RA already registered
             }
@@ -1536,6 +1535,9 @@
                }
 
                startContext(resourceAdapter, bootstrapIdentifier);
+
+               // Register with ResourceAdapterRepository
+               registerResourceAdapterToResourceAdapterRepository(resourceAdapter);
             }
          }
 
@@ -1643,12 +1645,21 @@
     * @param root root
     * @param cmd cmd
     * @param ijmd ijmd
-    * @throws AlreadyExistsException AlreadyExistsException
+    * @throws org.jboss.jca.core.spi.mdr.AlreadyExistsException AlreadyExistsException
     */
    protected abstract void registerResourceAdapterToMDR(URL url, File root, Connector cmd, IronJacamar ijmd)
-      throws AlreadyExistsException;
+      throws org.jboss.jca.core.spi.mdr.AlreadyExistsException;
 
    /**
+    * Register the ResourceAdapter to the ResourceAdapterRepository. Implementer should provide the implementation
+    * to get repository and do the registration
+    * @param instance the instance
+    * @throws org.jboss.jca.core.spi.rar.AlreadyExistsException AlreadyExistsException
+    */
+   protected abstract void registerResourceAdapterToResourceAdapterRepository(ResourceAdapter instance)
+      throws org.jboss.jca.core.spi.rar.AlreadyExistsException;
+
+   /**
     *
     * get The transaction Manager. Implementers have to provide right implementation to find and get it
     *

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalDeployment.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalDeployment.java	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalDeployment.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -25,8 +25,8 @@
 import org.jboss.jca.core.api.management.Connector;
 import org.jboss.jca.core.api.management.ManagementRepository;
 import org.jboss.jca.core.spi.mdr.MetadataRepository;
-import org.jboss.jca.core.spi.mdr.NotFoundException;
 import org.jboss.jca.core.spi.naming.JndiStrategy;
+import org.jboss.jca.core.spi.rar.ResourceAdapterRepository;
 
 import java.io.Closeable;
 import java.io.IOException;
@@ -68,6 +68,9 @@
    /** The MDR */
    protected MetadataRepository mdr;
 
+   /** The resource adapter repository */
+   protected ResourceAdapterRepository rar;
+
    /** The connection factories */
    protected Object[] cfs;
 
@@ -103,6 +106,7 @@
     * @param ra The resource adapter instance if present
     * @param jndiStrategy The JNDI strategy
     * @param metadataRepository The metadata repository
+    * @param resourceAdapterRepository The resource adapter repository
     * @param cfs The connection factories
     * @param cfJndis The JNDI names of the connection factories
     * @param aos The admin objects
@@ -116,6 +120,7 @@
     */
    public AbstractFungalDeployment(URL deployment, String deploymentName, boolean activator, ResourceAdapter ra,
                                    JndiStrategy jndiStrategy, MetadataRepository metadataRepository, 
+                                   ResourceAdapterRepository resourceAdapterRepository,
                                    Object[] cfs, String[] cfJndis,
                                    Object[] aos, String[] aoJndis,
                                    ManagementRepository managementRepository, Connector connector,
@@ -128,6 +133,7 @@
       this.ra = ra;
       this.jndiStrategy = jndiStrategy;
       this.mdr = metadataRepository;
+      this.rar = resourceAdapterRepository;
       this.cfs = cfs;
       this.cfJndis = cfJndis;
       this.aos = aos;
@@ -198,7 +204,7 @@
 
                   mdr.unregisterJndiMapping(deployment.toExternalForm(), cf, jndi);
                }
-               catch (NotFoundException nfe)
+               catch (org.jboss.jca.core.spi.mdr.NotFoundException nfe)
                {
                   log.warn("Exception during unregistering deployment", nfe);
                }
@@ -216,7 +222,7 @@
 
                   mdr.unregisterJndiMapping(deployment.toExternalForm(), ao, jndi);
                }
-               catch (NotFoundException nfe)
+               catch (org.jboss.jca.core.spi.mdr.NotFoundException nfe)
                {
                   log.warn("Exception during unregistering deployment", nfe);
                }
@@ -259,6 +265,18 @@
 
          if (ra != null)
          {
+            if (rar != null)
+            {
+               try
+               {
+                  rar.unregisterResourceAdapter(ra);
+               }
+               catch (org.jboss.jca.core.spi.rar.NotFoundException nfe)
+               {
+                  log.warn("Exception during unregistering deployment", nfe);
+               }
+            }
+
             ra.stop();
             ra = null;
          }

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalRADeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalRADeployer.java	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalRADeployer.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -25,7 +25,6 @@
 import org.jboss.jca.common.api.metadata.ironjacamar.IronJacamar;
 import org.jboss.jca.common.api.metadata.ra.ConfigProperty;
 import org.jboss.jca.common.api.metadata.ra.Connector;
-import org.jboss.jca.core.spi.mdr.AlreadyExistsException;
 import org.jboss.jca.core.spi.naming.JndiStrategy;
 import org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer;
 import org.jboss.jca.deployers.common.DeployException;
@@ -46,6 +45,7 @@
 import javax.management.JMException;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
+import javax.resource.spi.ResourceAdapter;
 import javax.transaction.TransactionManager;
 
 import org.jboss.logging.Logger;
@@ -274,12 +274,20 @@
 
    @Override
    protected void registerResourceAdapterToMDR(URL url, File root, Connector cmd, IronJacamar ijmd)
-      throws AlreadyExistsException
+      throws org.jboss.jca.core.spi.mdr.AlreadyExistsException
    {
       ((RAConfiguration) getConfiguration()).getMetadataRepository().
          registerResourceAdapter(url.toExternalForm(), root, cmd, ijmd);
    }
 
+   @Override
+   protected void registerResourceAdapterToResourceAdapterRepository(ResourceAdapter instance)
+      throws org.jboss.jca.core.spi.rar.AlreadyExistsException
+   {
+      ((RAConfiguration) getConfiguration()).getResourceAdapterRepository().
+         registerResourceAdapter(instance);
+   }
+
    /**
     * Register management view of a connector in JMX
     * @param mgtConnector The management view of the connector

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAActivator.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAActivator.java	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAActivator.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -27,6 +27,7 @@
 import org.jboss.jca.common.metadata.merge.Merger;
 import org.jboss.jca.core.spi.mdr.MetadataRepository;
 import org.jboss.jca.core.spi.naming.JndiStrategy;
+import org.jboss.jca.core.spi.rar.ResourceAdapterRepository;
 import org.jboss.jca.deployers.common.CommonDeployment;
 
 import java.io.File;
@@ -266,8 +267,12 @@
          List<ObjectName> ons = registerManagementView(c.getConnector(), kernel.getMBeanServer());
 
          JndiStrategy jndiStrategy = ((RAConfiguration) getConfiguration()).getJndiStrategy();
+         ResourceAdapterRepository resourceAdapterRepository =
+            ((RAConfiguration) getConfiguration()).getResourceAdapterRepository();
+
          return new RAActivatorDeployment(c.getURL(), c.getDeploymentName(), c.getResourceAdapter(), jndiStrategy,
-                                          metadataRepository, c.getCfs(), c.getCfJndiNames(), 
+                                          metadataRepository, resourceAdapterRepository,
+                                          c.getCfs(), c.getCfJndiNames(), 
                                           c.getAos(), c.getAoJndiNames(),
                                           ((RAConfiguration)getConfiguration()).getManagementRepository(), 
                                           c.getConnector(),

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAActivatorDeployment.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAActivatorDeployment.java	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAActivatorDeployment.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -26,6 +26,7 @@
 import org.jboss.jca.core.api.management.ManagementRepository;
 import org.jboss.jca.core.spi.mdr.MetadataRepository;
 import org.jboss.jca.core.spi.naming.JndiStrategy;
+import org.jboss.jca.core.spi.rar.ResourceAdapterRepository;
 
 import java.net.URL;
 import java.util.List;
@@ -49,6 +50,7 @@
     * @param ra The resource adapter instance if present
     * @param jndiStrategy The JNDI strategy
     * @param mdr The metadata repository
+    * @param resourceAdapterRepository The resource adapter repository
     * @param cfs The connection factories
     * @param cfJndis The JNDI names for the connection factories
     * @param aos The admin objects
@@ -61,14 +63,14 @@
     * @param log The logger
     */
    public RAActivatorDeployment(URL deployment, String deploymentName, ResourceAdapter ra, JndiStrategy jndiStrategy,
-                                MetadataRepository mdr, 
+                                MetadataRepository mdr, ResourceAdapterRepository resourceAdapterRepository,
                                 Object[] cfs, String[] cfJndis, 
                                 Object[] aos, String[] aoJndis, 
                                 ManagementRepository managementRepository, Connector connector,
                                 MBeanServer server, List<ObjectName> objectNames,
                                 ClassLoader cl, Logger log)
    {
-      super(deployment, deploymentName, true, ra, jndiStrategy, mdr, 
+      super(deployment, deploymentName, true, ra, jndiStrategy, mdr, resourceAdapterRepository,
             cfs, cfJndis, aos, aoJndis, managementRepository, connector, server, objectNames, cl, log);
    }
 }

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAConfiguration.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAConfiguration.java	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RAConfiguration.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -26,6 +26,7 @@
 import org.jboss.jca.core.api.management.ManagementRepository;
 import org.jboss.jca.core.spi.mdr.MetadataRepository;
 import org.jboss.jca.core.spi.naming.JndiStrategy;
+import org.jboss.jca.core.spi.rar.ResourceAdapterRepository;
 import org.jboss.jca.deployers.common.Configuration;
 
 import java.io.PrintStream;
@@ -82,6 +83,9 @@
    /** The management repository */
    private ManagementRepository managementRepository;
 
+   /** The resource adapter repository */
+   private ResourceAdapterRepository resourceAdapterRepository;
+
    /**
     * Constructor
     */
@@ -318,6 +322,24 @@
    }
 
    /**
+    * Set the resource adapter repository
+    * @param value The value
+    */
+   public void setResourceAdapterRepository(ResourceAdapterRepository value)
+   {
+      resourceAdapterRepository = value;
+   }
+
+   /**
+    * Get the resource adapter repository
+    * @return The handle
+    */
+   public ResourceAdapterRepository getResourceAdapterRepository()
+   {
+      return resourceAdapterRepository;
+   }
+
+   /**
     * Start
     */
    public void start()
@@ -336,5 +358,8 @@
 
       if (managementRepository == null)
          throw new IllegalStateException("ManagementRepository not defined");
+
+      if (resourceAdapterRepository == null)
+         throw new IllegalStateException("ResourceAdapterRepository not defined");
    }
 }

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -36,6 +36,7 @@
 import org.jboss.jca.common.spi.annotations.repository.AnnotationScannerFactory;
 import org.jboss.jca.core.spi.mdr.MetadataRepository;
 import org.jboss.jca.core.spi.naming.JndiStrategy;
+import org.jboss.jca.core.spi.rar.ResourceAdapterRepository;
 import org.jboss.jca.deployers.common.CommonDeployment;
 
 import java.io.File;
@@ -162,8 +163,12 @@
 
          JndiStrategy jndiStrategy = ((RAConfiguration) getConfiguration()).getJndiStrategy();
          MetadataRepository metadataRepository = ((RAConfiguration) getConfiguration()).getMetadataRepository();
+         ResourceAdapterRepository resourceAdapterRepository = 
+            ((RAConfiguration) getConfiguration()).getResourceAdapterRepository();
+
          return new RADeployment(c.getURL(), c.getDeploymentName(), c.isActivateDeployment(), c.getResourceAdapter(),
-                                 jndiStrategy, metadataRepository, c.getCfs(), c.getCfJndiNames(), 
+                                 jndiStrategy, metadataRepository, resourceAdapterRepository,
+                                 c.getCfs(), c.getCfJndiNames(), 
                                  c.getAos(), c.getAoJndiNames(), destination, 
                                  ((RAConfiguration)getConfiguration()).getManagementRepository(), c.getConnector(),
                                  kernel.getMBeanServer(), ons,

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployment.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployment.java	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployment.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -26,6 +26,7 @@
 import org.jboss.jca.core.api.management.ManagementRepository;
 import org.jboss.jca.core.spi.mdr.MetadataRepository;
 import org.jboss.jca.core.spi.naming.JndiStrategy;
+import org.jboss.jca.core.spi.rar.ResourceAdapterRepository;
 
 import java.io.File;
 import java.io.IOException;
@@ -57,6 +58,7 @@
     * @param ra The resource adapter instance if present
     * @param jndiStrategy The JNDI strategy
     * @param mdr The metadata repository
+    * @param resourceAdapterRepository The resource adapter repository
     * @param cfs The connection factories
     * @param cfJndis The JNDI names of the connection factories
     * @param aos The admin objects
@@ -71,14 +73,15 @@
     */
    public RADeployment(URL deployment, String deploymentName, boolean activator, ResourceAdapter ra,
                        JndiStrategy jndiStrategy, MetadataRepository mdr, 
+                       ResourceAdapterRepository resourceAdapterRepository,
                        Object[] cfs, String[] cfJndis,
                        Object[] aos, String[] aoJndis,
-                       File tmpDirectory, 
+                       File tmpDirectory,
                        ManagementRepository managementRepository, Connector connector,
                        MBeanServer server, List<ObjectName> objectNames,
                        ClassLoader cl, Logger log)
    {
-      super(deployment, deploymentName, activator, ra, jndiStrategy, mdr, 
+      super(deployment, deploymentName, activator, ra, jndiStrategy, mdr, resourceAdapterRepository,
             cfs, cfJndis, aos, aoJndis, managementRepository, connector, server, objectNames, cl, log);
 
       this.tmpDirectory = tmpDirectory;
@@ -100,7 +103,7 @@
          }
          catch (Throwable t)
          {
-            log.warn("Exception during unregistering deployment", t);
+            log.warn("Exception during unregistering deployment in the metadata repository", t);
          }
       }
    }

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RaXmlDeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RaXmlDeployer.java	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RaXmlDeployer.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -29,6 +29,7 @@
 import org.jboss.jca.common.metadata.resourceadapter.ResourceAdapterParser;
 import org.jboss.jca.core.spi.mdr.MetadataRepository;
 import org.jboss.jca.core.spi.naming.JndiStrategy;
+import org.jboss.jca.core.spi.rar.ResourceAdapterRepository;
 import org.jboss.jca.deployers.common.CommonDeployment;
 
 import java.io.File;
@@ -276,8 +277,12 @@
 
          JndiStrategy jndiStrategy = ((RAConfiguration) getConfiguration()).getJndiStrategy();
          MetadataRepository metadataRepository = ((RAConfiguration) getConfiguration()).getMetadataRepository();
+         ResourceAdapterRepository resourceAdapterRepository =
+            ((RAConfiguration) getConfiguration()).getResourceAdapterRepository();
+
          return new RaXmlDeployment(c.getURL(), deployment, c.getDeploymentName(), c.getResourceAdapter(),
-                                    jndiStrategy, metadataRepository, c.getCfs(), c.getCfJndiNames(),
+                                    jndiStrategy, metadataRepository, resourceAdapterRepository,
+                                    c.getCfs(), c.getCfJndiNames(),
                                     c.getAos(), c.getAoJndiNames(), 
                                     ((RAConfiguration)getConfiguration()).getManagementRepository(), c.getConnector(),
                                     kernel.getMBeanServer(), ons, 

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RaXmlDeployment.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RaXmlDeployment.java	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RaXmlDeployment.java	2011-02-24 20:37:03 UTC (rev 110772)
@@ -27,6 +27,7 @@
 import org.jboss.jca.core.spi.mdr.MetadataRepository;
 import org.jboss.jca.core.spi.mdr.NotFoundException;
 import org.jboss.jca.core.spi.naming.JndiStrategy;
+import org.jboss.jca.core.spi.rar.ResourceAdapterRepository;
 
 import java.net.URL;
 import java.util.List;
@@ -54,6 +55,7 @@
     * @param ra The resource adapter instance if present
     * @param jndiStrategy The JNDI strategy
     * @param mdr The metadata repository
+    * @param resourceAdapterRepository The resource adapter repository
     * @param cfs The connection factories
     * @param cfJndis The JNDI names of the connection factories
     * @param aos The admin objects
@@ -67,13 +69,14 @@
     */
    public RaXmlDeployment(URL deployment, URL raDeployment, String deploymentName, ResourceAdapter ra,
                           JndiStrategy jndiStrategy, MetadataRepository mdr, 
+                          ResourceAdapterRepository resourceAdapterRepository,
                           Object[] cfs, String[] cfJndis, 
                           Object[] aos, String[] aoJndis, 
                           ManagementRepository managementRepository, Connector connector,
                           MBeanServer server, List<ObjectName> objectNames,
                           ClassLoader cl, Logger log)
    {
-      super(deployment, deploymentName, true, ra, jndiStrategy, mdr, 
+      super(deployment, deploymentName, true, ra, jndiStrategy, mdr, resourceAdapterRepository,
             cfs, cfJndis, aos, aoJndis, managementRepository, connector, server, objectNames, cl, log);
 
       this.raDeployment = raDeployment;

Modified: projects/jboss-jca/trunk/doc/userguide/en-US/modules/configuration.xml
===================================================================
--- projects/jboss-jca/trunk/doc/userguide/en-US/modules/configuration.xml	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/doc/userguide/en-US/modules/configuration.xml	2011-02-24 20:37:03 UTC (rev 110772)
@@ -160,6 +160,13 @@
                   </entry>
                 </row>
                 <row>
+                  <entry><code>ResourceAdapterRepository</code></entry>
+                  <entry><code>org.jboss.jca.&#x200B;core.spi.rar.&#x200B;ResourceAdapterRepository</code></entry>
+                  <entry>
+                    The metadata repository
+                  </entry>
+                </row>
+                <row>
                   <entry><code>ScopeDeployment</code></entry>
                   <entry><code>boolean</code></entry>
                   <entry>
@@ -517,7 +524,10 @@
    <section id="webserver">
       <title>Web server</title>
 
-      <para>The IronJacamar project features a web server which is used to serve web archive deployments.</para>
+      <para>The IronJacamar project features a web server which is used to serve web archive deployments.
+        More information about Jetty can be found at the <ulink url="http://www.eclipse.org/jetty/">
+        homepage</ulink>.
+      </para>
 
       <para>The configuration is done in the</para>
 
@@ -606,5 +616,4 @@
 
    </section>
 
-
 </chapter>

Modified: projects/jboss-jca/trunk/embedded/src/main/resources/jca.xml
===================================================================
--- projects/jboss-jca/trunk/embedded/src/main/resources/jca.xml	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/embedded/src/main/resources/jca.xml	2011-02-24 20:37:03 UTC (rev 110772)
@@ -139,6 +139,13 @@
         interface="org.jboss.jca.core.spi.mdr.MetadataRepository"
         class="org.jboss.jca.core.mdr.SimpleMetadataRepository"/>
 
+  <!-- Resource adapter repository -->
+  <bean name="ResourceAdapterRepository"
+        interface="org.jboss.jca.core.spi.rar.ResourceAdapterRepository"
+        class="org.jboss.jca.core.rar.SimpleResourceAdapterRepository">
+    <property name="MetadataRepository"><inject bean="MDR"/></property>
+  </bean>
+
   <!-- Management repository -->
   <bean name="ManagementRepository"
         class="org.jboss.jca.core.api.management.ManagementRepository"/>
@@ -156,6 +163,7 @@
     <property name="TransactionManager"><inject bean="RealTransactionManager"/></property>
     <property name="MetadataRepository"><inject bean="MDR"/></property>
     <property name="ManagementRepository"><inject bean="ManagementRepository"/></property>
+    <property name="ResourceAdapterRepository"><inject bean="ResourceAdapterRepository"/></property>
   </bean>
 
   <!-- Activator configuration -->
@@ -171,6 +179,7 @@
     <property name="TransactionManager"><inject bean="RealTransactionManager"/></property>
     <property name="MetadataRepository"><inject bean="MDR"/></property>
     <property name="ManagementRepository"><inject bean="ManagementRepository"/></property>
+    <property name="ResourceAdapterRepository"><inject bean="ResourceAdapterRepository"/></property>
   </bean>
 
   <!-- RA deployer -->

Modified: projects/jboss-jca/trunk/ivy.xml
===================================================================
--- projects/jboss-jca/trunk/ivy.xml	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/ivy.xml	2011-02-24 20:37:03 UTC (rev 110772)
@@ -33,13 +33,14 @@
     </description>
   </info>
 
-  <configurations defaultconfmapping="common->default;sjc->default;embedded->default;arquillian->default;jetty->default;test->default;mail->default;;tools->default;ironjacamar-codegenerator->default;ironjacamar-common-api->default;ironjacamar-common-impl->default;ironjacamar-common-impl-papaki->default;ironjacamar-common-spi->default;ironjacamar-core-api->default;ironjacamar-core-impl->default;ironjacamar-core-spi->default;ironjacamar-depchain->default;ironjacamar-deployers-common->default;ironjacamar-deployers-fungal->default;ironjacamar-embedded->default;ironjacamar-embedded-arquillian->default;ironjacamar-spec-api->default;ironjacamar-validator->default;ironjacamar-validator-ant->default;ironjacamar-validator-cli->default;ironjacamar-validator-maven->default;jdbc-local->default;jdbc-xa->default;rhq->default">
+  <configurations defaultconfmapping="common->default;sjc->default;embedded->default;arquillian->default;jetty->default;test->default;mail->default;;tools->default;ironjacamar-codegenerator->default;ironjacamar-common-api->default;ironjacamar-common-impl->default;ironjacamar-common-impl-papaki->default;ironjacamar-common-spi->default;ironjacamar-core-api->default;ironjacamar-core-impl->default;ironjacamar-core-spi->default;ironjacamar-depchain->default;ironjacamar-deployers-common->default;ironjacamar-deployers-fungal->default;ironjacamar-embedded->default;ironjacamar-embedded-arquillian->default;ironjacamar-spec-api->default;ironjacamar-validator->default;ironjacamar-validator-ant->default;ironjacamar-validator-cli->default;ironjacamar-validator-maven->default;jdbc-local->default;jdbc-xa->default;rhq->default;hornetq->default">
+    <conf name="arquillian" transitive="false"/>
     <conf name="common" transitive="false"/>
-    <conf name="sjc" transitive="false"/>
     <conf name="embedded" transitive="false"/>
-    <conf name="arquillian" transitive="false"/>
+    <conf name="hornetq" transitive="false"/>
     <conf name="jetty" transitive="false"/>
     <conf name="mail" transitive="false"/>
+    <conf name="sjc" transitive="false"/>
     <conf name="test" transitive="false"/>
     <conf name="tools" transitive="false"/>
     <conf name="rhq" transitive="false"/>
@@ -127,6 +128,14 @@
     <dependency org="org.eclipse.jetty" name="jetty-xml" rev="${version.jetty}" conf="jetty"/>
     <dependency org="org.hibernate" name="hibernate-annotations" rev="${version.hibernate-annotations}" conf="rhq"/>
     <dependency org="org.hibernate" name="hibernate-validator" rev="${version.hibernate-validator}" conf="common,ironjacamar-depchain"/>
+    <dependency org="org.hornetq" name="hornetq-core" rev="${version.hornetq}" conf="hornetq,ironjacamar-depchain"/>
+    <dependency org="org.hornetq" name="hornetq-core-client" rev="${version.hornetq}" conf="hornetq,ironjacamar-depchain"/>
+    <dependency org="org.hornetq" name="hornetq-jms" rev="${version.hornetq}" conf="hornetq,ironjacamar-depchain"/>
+    <dependency org="org.hornetq" name="hornetq-jms-client" rev="${version.hornetq}" conf="hornetq,ironjacamar-depchain"/>
+    <dependency org="org.hornetq" name="hornetq-ra" rev="${version.hornetq}" conf="hornetq">
+      <artifact name="hornetq-ra" type="jar" conf="hornetq"/>
+      <artifact name="hornetq-ra" type="rar" conf="hornetq"/>
+    </dependency>
     <dependency org="org.javassist" name="javassist" rev="${version.javassist}" conf="common,ironjacamar-depchain"/>
     <dependency org="org.jboss" name="jboss-common-core" rev="${version.jboss.common}" conf="common,ironjacamar-common-impl,ironjacamar-core-impl,ironjacamar-depchain"/>
     <dependency org="org.jboss.apiviz" name="apiviz" rev="${version.apiviz}" conf="tools"/>
@@ -142,11 +151,13 @@
     <dependency org="org.jboss.jbossts" name="jbossjts" rev="${version.jboss.ts}" conf="common,ironjacamar-depchain"/>
     <dependency org="org.jboss.jbossts" name="jbossjts-integration" rev="${version.jboss.ts}" conf="common,ironjacamar-depchain"/>
     <dependency org="org.jboss.naming" name="jnpserver" rev="${version.jboss.naming}" conf="common,ironjacamar-depchain"/>
+    <dependency org="org.jboss.netty" name="netty" rev="${version.jboss.netty}" conf="hornetq,ironjacamar-depchain"/>
     <dependency org="org.jboss.papaki" name="papaki-core" rev="${version.jboss.papaki}" conf="common,ironjacamar-common-impl-papaki,ironjacamar-depchain"/>
     <dependency org="org.jboss.shrinkwrap" name="shrinkwrap-api" rev="${version.jboss.shrinkwrap}" conf="embedded,ironjacamar-depchain,ironjacamar-embedded,ironjacamar-embedded-arquillian"/>
     <dependency org="org.jboss.shrinkwrap" name="shrinkwrap-impl-base" rev="${version.jboss.shrinkwrap}" conf="embedded,ironjacamar-depchain"/>
     <dependency org="org.jboss.shrinkwrap" name="shrinkwrap-spi" rev="${version.jboss.shrinkwrap}" conf="embedded,ironjacamar-depchain"/>
     <dependency org="org.jboss.slf4j" name="slf4j-jboss-logmanager" rev="${version.jboss.slf4j.logmanager}" conf="common,ironjacamar-depchain"/>
+    <dependency org="org.jboss.spec.javax.jms" name="jboss-jms-api_1.1_spec" rev="${version.jboss.jms.api}" conf="hornetq,ironjacamar-depchain"/>
     <dependency org="org.jboss.stdio" name="jboss-stdio" rev="${version.jboss.stdio}" conf="common,ironjacamar-depchain"/>
     <dependency org="org.jboss.threads" name="jboss-threads" rev="${version.jboss.threads}" conf="common,ironjacamar-core-api,ironjacamar-core-impl,ironjacamar-depchain"/>
     <dependency org="org.mockito" name="mockito-all" rev="${version.mockito}" conf="test"/>


Property changes on: projects/jboss-jca/trunk/lib
___________________________________________________________________
Modified: svn:ignore
   - *.jar
standalone
test
qe
sjc
common
embedded
jetty
arquillian
mail
rhq
tools
ironjacamar-core-api
ironjacamar-deployers-common
ironjacamar-deployers-fungal
ironjacamar-codegenerator
ironjacamar-spec-api
ironjacamar-validator-ant
ironjacamar-validator
ironjacamar-common-impl
ironjacamar-common-impl-papaki
ironjacamar-core-impl
ironjacamar-embedded-arquillian
ironjacamar-embedded

   + *.jar
standalone
test
qe
sjc
common
embedded
jetty
arquillian
hornetq
mail
rhq
tools
ironjacamar-core-api
ironjacamar-deployers-common
ironjacamar-deployers-fungal
ironjacamar-codegenerator
ironjacamar-spec-api
ironjacamar-validator-ant
ironjacamar-validator
ironjacamar-common-impl
ironjacamar-common-impl-papaki
ironjacamar-core-impl
ironjacamar-embedded-arquillian
ironjacamar-embedded


Modified: projects/jboss-jca/trunk/sjc/src/main/resources/bootstrap/jca.xml
===================================================================
--- projects/jboss-jca/trunk/sjc/src/main/resources/bootstrap/jca.xml	2011-02-24 19:09:21 UTC (rev 110771)
+++ projects/jboss-jca/trunk/sjc/src/main/resources/bootstrap/jca.xml	2011-02-24 20:37:03 UTC (rev 110772)
@@ -142,6 +142,13 @@
         interface="org.jboss.jca.core.spi.mdr.MetadataRepository"
         class="org.jboss.jca.core.mdr.SimpleMetadataRepository"/>
 
+  <!-- Resource adapter repository -->
+  <bean name="ResourceAdapterRepository"
+        interface="org.jboss.jca.core.spi.rar.ResourceAdapterRepository"
+        class="org.jboss.jca.core.rar.SimpleResourceAdapterRepository">
+    <property name="MetadataRepository"><inject bean="MDR"/></property>
+  </bean>
+
   <!-- Management repository -->
   <bean name="ManagementRepository"
         class="org.jboss.jca.core.api.management.ManagementRepository"/>
@@ -159,6 +166,7 @@
     <property name="TransactionManager"><inject bean="RealTransactionManager"/></property>
     <property name="MetadataRepository"><inject bean="MDR"/></property>
     <property name="ManagementRepository"><inject bean="ManagementRepository"/></property>
+    <property name="ResourceAdapterRepository"><inject bean="ResourceAdapterRepository"/></property>
   </bean>
 
   <!-- Activator configuration -->
@@ -174,6 +182,7 @@
     <property name="TransactionManager"><inject bean="RealTransactionManager"/></property>
     <property name="MetadataRepository"><inject bean="MDR"/></property>
     <property name="ManagementRepository"><inject bean="ManagementRepository"/></property>
+    <property name="ResourceAdapterRepository"><inject bean="ResourceAdapterRepository"/></property>
   </bean>
 
   <!-- RA deployer -->



More information about the jboss-cvs-commits mailing list