[jboss-cvs] JBossAS SVN: r95290 - in projects/jboss-jca/trunk/deployers: src/main/java/org/jboss/jca/deployers/fungal and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 21 09:18:58 EDT 2009


Author: jeff.zhang
Date: 2009-10-21 09:18:58 -0400 (Wed, 21 Oct 2009)
New Revision: 95290

Added:
   projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/
   projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestActivationSpec.java
   projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestAdminObject.java
   projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestManagedConnection.java
   projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestManagedConnectionFactory.java
   projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestResourceAdapter.java
   projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestWorkContext.java
   projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/package.html
   projects/jboss-jca/trunk/deployers/src/test/resources/ra16annoconfprop.rar/
   projects/jboss-jca/trunk/deployers/src/test/resources/ra16annoconfprop.rar/META-INF/
   projects/jboss-jca/trunk/deployers/src/test/resources/ra16annoconfprop.rar/META-INF/ra.xml
Modified:
   projects/jboss-jca/trunk/deployers/build.xml
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java
   projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java
Log:
[JBJCA-176] testProcessConfigProperty

Modified: projects/jboss-jca/trunk/deployers/build.xml
===================================================================
--- projects/jboss-jca/trunk/deployers/build.xml	2009-10-21 13:01:53 UTC (rev 95289)
+++ projects/jboss-jca/trunk/deployers/build.xml	2009-10-21 13:18:58 UTC (rev 95290)
@@ -250,14 +250,6 @@
          includes="org/jboss/jca/test/deployers/spec/rars/ra16user303jbossra/*.class"/>
       <fileset dir="src/test/resources/ra16user303jbossra.rar"/>
    </jar>
-    <jar destfile="${build.deployers.dir}/ra16inoutanno.rar"
-         manifest="src/main/resources/rar-manifest.mf">
-       <fileset dir="${build.deployers.dir}/test"
-          includes="org/jboss/jca/test/deployers/spec/rars/*.class"/>
-       <fileset dir="${build.deployers.dir}/test"
-          includes="org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/*.class"/>
-       <fileset dir="src/test/resources/ra16inoutanno.rar"/>
-    </jar>
 
    <jar destfile="${build.deployers.dir}/ra16inoutjar.jar">
       <fileset dir="${build.deployers.dir}/test"
@@ -280,6 +272,23 @@
           includes="org/jboss/jca/test/deployers/spec/rars/rafail2connector/*.class"/>
        <fileset dir="src/test/resources/rafail2connector.rar"/>
     </jar>
+  	
+    <jar destfile="${build.deployers.dir}/ra16inoutanno.rar"
+         manifest="src/main/resources/rar-manifest.mf">
+       <fileset dir="${build.deployers.dir}/test"
+          includes="org/jboss/jca/test/deployers/spec/rars/*.class"/>
+       <fileset dir="${build.deployers.dir}/test"
+          includes="org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/*.class"/>
+       <fileset dir="src/test/resources/ra16inoutanno.rar"/>
+    </jar>
+    <jar destfile="${build.deployers.dir}/ra16annoconfprop.rar"
+         manifest="src/main/resources/rar-manifest.mf">
+       <fileset dir="${build.deployers.dir}/test"
+          includes="org/jboss/jca/test/deployers/spec/rars/*.class"/>
+       <fileset dir="${build.deployers.dir}/test"
+          includes="org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/*.class"/>
+       <fileset dir="src/test/resources/ra16annoconfprop.rar"/>
+    </jar>
   </target>
 
   <!-- ================================= 

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java	2009-10-21 13:01:53 UTC (rev 95289)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java	2009-10-21 13:18:58 UTC (rev 95290)
@@ -436,18 +436,7 @@
                                                                 ConnectionDefinitions cds)
       throws Exception
    {
-      if (md.getRa() == null)
-      {
-         md.setRa(new ResourceAdapterMetaData());
-      }
-      if (md.getRa().getOutboundRa() == null)
-      {
-         md.getRa().setOutboundRa(new OutboundRaMetaData());
-      }
-      if (md.getRa().getOutboundRa().getConDefs() == null)
-      {
-         md.getRa().getOutboundRa().setConDefs(new ArrayList<ConnectionDefinitionMetaData>());
-      }
+      createConDefs(md);
       return md;
    }
 
@@ -489,18 +478,7 @@
       if (trace)
          log.trace("Processing: " + annotation);
 
-      if (md.getRa() == null)
-      {
-         md.setRa(new ResourceAdapterMetaData());
-      }
-      if (md.getRa().getOutboundRa() == null)
-      {
-         md.getRa().setOutboundRa(new OutboundRaMetaData());
-      }
-      if (md.getRa().getOutboundRa().getConDefs() == null)
-      {
-         md.getRa().getOutboundRa().setConDefs(new ArrayList<ConnectionDefinitionMetaData>());
-      }
+      createConDefs(md);
 
       for (ConnectionDefinitionMetaData cdMeta : md.getRa().getOutboundRa().getConDefs())
       {
@@ -588,7 +566,7 @@
       {
          if (md.getRa() == null)
          {
-            throw new DeployException("@Connector should be already handled");
+            md.setRa(new ResourceAdapterMetaData());
          }
          if (md.getRa().getConfigProperty() == null)
          {
@@ -605,12 +583,7 @@
       }
       else if (hasInterface(attachedClass, "javax.resource.spi.ManagedConnectionFactory"))
       {
-         if (md.getRa() == null || 
-            md.getRa().getOutboundRa() == null ||
-            md.getRa().getOutboundRa().getConDefs() == null)
-         {
-            throw new DeployException("@ConnectionDefinition should be already handled");
-         }
+         createConDefs(md);
          for (ConnectionDefinitionMetaData cdMeta : md.getRa().getOutboundRa().getConDefs())
          {
             if (attachedClassName.equals(cdMeta.getManagedConnectionFactoryClass()))
@@ -632,12 +605,7 @@
       }
       else if (hasInterface(attachedClass, "javax.resource.spi.AdministeredObject"))
       {
-         if (md.getRa() == null || 
-            md.getRa().getOutboundRa() == null ||
-            md.getRa().getAdminObjects() == null)
-         {
-            throw new DeployException("@AdministeredObject should be already handled");
-         }
+         createAdminObject(md);
          for (AdminObjectMetaData aoMeta : md.getRa().getAdminObjects())
          {
             if (attachedClassName.equals(aoMeta.getAdminObjectImplementationClass()))
@@ -659,13 +627,7 @@
       }
       else if (hasInterface(attachedClass, "javax.resource.spi.ActivationSpec"))
       {
-         if (md.getRa() == null || 
-            md.getRa().getInboundRa() == null ||
-            md.getRa().getInboundRa().getMessageAdapter() == null ||
-            md.getRa().getInboundRa().getMessageAdapter().getMessageListeners() == null)
-         {
-            throw new DeployException("@Activation should be already handled");
-         }
+         createMessageListeners(md);
          for (MessageListenerMetaData mlMeta : md.getRa().getInboundRa().getMessageAdapter().getMessageListeners())
          {
             if (attachedClassName.equals(mlMeta.getActivationSpecType().getAsClass()))
@@ -725,37 +687,7 @@
       }
       return false;
    }
-   
-   /**
-    * Process: @AuthenticationMechanism
-    * @param md The metadata
-    * @param annotationRepository The annotation repository
-    * @return The updated metadata
-    * @exception Exception Thrown if an error occurs
-    */
-   /*
-   private static ConnectorMetaData processAuthenticationMechanism(ConnectorMetaData md, 
-                                                                   AnnotationRepository annotationRepository)
-      throws Exception
-   {
-      Collection<Annotation> values = annotationRepository.getAnnotation(AuthenticationMechanism.class);
-      if (values != null)
-      {
-         for (Annotation annotation : values)
-         {
-            AuthenticationMechanism a = (AuthenticationMechanism)annotation.getAnnotation();
 
-            if (trace)
-               log.trace("Processing: " + a);
-
-            md = attachAuthenticationMechanism(md, a);
-         }
-      }
-
-      return md;
-   }
-   */
-
    /**
     * Attach @AuthenticationMechanism
     * @param md The metadata
@@ -856,14 +788,7 @@
    private static ConnectorMetaData attachAdministeredObject(ConnectorMetaData md, AdministeredObject a)
       throws Exception
    {
-      if (md.getRa() == null)
-      {
-         md.setRa(new ResourceAdapterMetaData());
-      }
-      if (md.getRa().getAdminObjects() == null)
-      {
-         md.getRa().setAdminObjects(new ArrayList<AdminObjectMetaData>());
-      }
+      createAdminObject(md);
       String aoName = null;
       if (a.adminObjectInterfaces().length > 0)
       {
@@ -913,6 +838,27 @@
       if (trace)
          log.trace("Processing: " + activation);
       
+      createMessageListeners(md);
+      for (Class asClass : activation.messageListeners())
+      {
+         ActivationspecMetaData asMeta = new ActivationspecMetaData();
+         asMeta.setAsClass(annotation.getClassName());
+         MessageListenerMetaData mlMeta = new MessageListenerMetaData();
+         mlMeta.setActivationSpecType(asMeta);
+         mlMeta.setType(asClass.getName());
+         md.getRa().getInboundRa().getMessageAdapter().getMessageListeners().add(mlMeta);
+      }
+      return md;
+   }
+   
+
+   /**
+    * createMessageListeners
+    * @param md
+    * @throws Exception
+    */
+   private static void createMessageListeners(ConnectorMetaData md) throws Exception
+   {
       if (md.getRa() == null)
       {
          md.setRa(new ResourceAdapterMetaData());
@@ -929,15 +875,44 @@
       {
          md.getRa().getInboundRa().getMessageAdapter().setMessageListeners(new ArrayList<MessageListenerMetaData>());
       }
-      for (Class asClass : activation.messageListeners())
+   }
+
+   /**
+    * createAdminObject
+    * @param md
+    * @throws Exception
+    */
+   private static void createAdminObject(ConnectorMetaData md) throws Exception
+   {
+      if (md.getRa() == null)
       {
-         ActivationspecMetaData asMeta = new ActivationspecMetaData();
-         asMeta.setAsClass(annotation.getClassName());
-         MessageListenerMetaData mlMeta = new MessageListenerMetaData();
-         mlMeta.setActivationSpecType(asMeta);
-         mlMeta.setType(asClass.getName());
-         md.getRa().getInboundRa().getMessageAdapter().getMessageListeners().add(mlMeta);
+         md.setRa(new ResourceAdapterMetaData());
       }
-      return md;
+      if (md.getRa().getAdminObjects() == null)
+      {
+         md.getRa().setAdminObjects(new ArrayList<AdminObjectMetaData>());
+      }
    }
+
+   /**
+    * createConDefs
+    * @param md
+    * @throws Exception
+    */
+   private static void createConDefs(ConnectorMetaData md) throws Exception
+   {
+      if (md.getRa() == null)
+      {
+         md.setRa(new ResourceAdapterMetaData());
+      }
+      if (md.getRa().getOutboundRa() == null)
+      {
+         md.getRa().setOutboundRa(new OutboundRaMetaData());
+      }
+      if (md.getRa().getOutboundRa().getConDefs() == null)
+      {
+         md.getRa().getOutboundRa().setConDefs(new ArrayList<ConnectionDefinitionMetaData>());
+      }
+   }
+
 }

Modified: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java	2009-10-21 13:01:53 UTC (rev 95289)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java	2009-10-21 13:18:58 UTC (rev 95290)
@@ -264,12 +264,12 @@
     * Process: ConfigProperty -- verification of the processConfigProperty method
     * @throws Throwable throwable exception 
     */
-   @Ignore
+   @Test
    public void testProcessConfigProperty() throws Throwable
    {
       try
       {
-         URL url = getURL("ra16inoutnora.rar"); //TODO will create rar for testcase 
+         URL url = getURL("ra16annoconfprop.rar");
          AnnotationScanner asf = AnnotationScannerFactory.getDefault();
          AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
 

Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestActivationSpec.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestActivationSpec.java	                        (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestActivationSpec.java	2009-10-21 13:18:58 UTC (rev 95290)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.test.deployers.spec.rars.ra16annoconfprop;
+
+import org.jboss.jca.test.deployers.spec.rars.BaseActivationSpec;
+
+import javax.resource.spi.ConfigProperty;
+
+/**
+ * TestActivationSpec
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+public class TestActivationSpec extends BaseActivationSpec
+{
+   @ConfigProperty(type = String.class, defaultValue = "InAS")
+   private String myStringProperty;
+
+   /**
+    * @param myStringProperty the myStringProperty to set
+    */
+   public void setMyStringProperty(String myStringProperty)
+   {
+      this.myStringProperty = myStringProperty;
+   }
+
+   /**
+    * @return the myStringProperty
+    */
+   public String getMyStringProperty()
+   {
+      return myStringProperty;
+   }
+}


Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestActivationSpec.java
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date

Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestAdminObject.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestAdminObject.java	                        (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestAdminObject.java	2009-10-21 13:18:58 UTC (rev 95290)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.test.deployers.spec.rars.ra16annoconfprop;
+
+import javax.resource.spi.ConfigProperty;
+
+/**
+ * 
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+public class TestAdminObject
+{
+   @ConfigProperty(type = String.class, defaultValue = "InAO")
+   private String myStringProperty;
+
+   /**
+    * @param myStringProperty the myStringProperty to set
+    */
+   public void setMyStringProperty(String myStringProperty)
+   {
+      this.myStringProperty = myStringProperty;
+   }
+
+   /**
+    * @return the myStringProperty
+    */
+   public String getMyStringProperty()
+   {
+      return myStringProperty;
+   }
+}


Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestAdminObject.java
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date

Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestManagedConnection.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestManagedConnection.java	                        (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestManagedConnection.java	2009-10-21 13:18:58 UTC (rev 95290)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.test.deployers.spec.rars.ra16annoconfprop;
+
+import org.jboss.jca.test.deployers.spec.rars.BaseManagedConnection;
+
+/**
+ * TestManagedConnection
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+public class TestManagedConnection extends BaseManagedConnection
+{
+
+}


Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestManagedConnection.java
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date

Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestManagedConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestManagedConnectionFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestManagedConnectionFactory.java	2009-10-21 13:18:58 UTC (rev 95290)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.test.deployers.spec.rars.ra16annoconfprop;
+
+import org.jboss.jca.test.deployers.spec.rars.BaseManagedConnectionFactory;
+
+import javax.resource.spi.ConfigProperty;
+
+/**
+ * TestManagedConnectionFactory
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+public class TestManagedConnectionFactory extends BaseManagedConnectionFactory
+{
+   private static final long serialVersionUID = 1L;
+   
+   @ConfigProperty(type = String.class, defaultValue = "JCA")
+   private String myStringProperty;
+
+   /**
+    * @param myStringProperty the myStringProperty to set
+    */
+   public void setMyStringProperty(String myStringProperty)
+   {
+      this.myStringProperty = myStringProperty;
+   }
+
+   /**
+    * @return the myStringProperty
+    */
+   public String getMyStringProperty()
+   {
+      return myStringProperty;
+   }
+}


Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestManagedConnectionFactory.java
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date

Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestResourceAdapter.java	                        (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestResourceAdapter.java	2009-10-21 13:18:58 UTC (rev 95290)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.test.deployers.spec.rars.ra16annoconfprop;
+
+import org.jboss.jca.test.deployers.spec.rars.BaseResourceAdapter;
+
+import javax.resource.spi.AdministeredObject;
+import javax.resource.spi.ConfigProperty;
+
+/**
+ * TestResourceAdapter
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+ at AdministeredObject(
+      adminObjectInterfaces = TestAdminObject.class)
+public class TestResourceAdapter extends BaseResourceAdapter
+{
+   @ConfigProperty(type = String.class, defaultValue = "JCA", description = "desc")
+   private String myStringProperty;
+
+   /**
+    * @param myStringProperty the myStringProperty to set
+    */
+   public void setMyStringProperty(String myStringProperty)
+   {
+      this.myStringProperty = myStringProperty;
+   }
+
+   /**
+    * @return the myStringProperty
+    */
+   public String getMyStringProperty()
+   {
+      return myStringProperty;
+   }
+}


Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestResourceAdapter.java
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date

Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestWorkContext.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestWorkContext.java	                        (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestWorkContext.java	2009-10-21 13:18:58 UTC (rev 95290)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.test.deployers.spec.rars.ra16annoconfprop;
+
+import javax.resource.spi.work.WorkContext;
+
+/**
+ * 
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+public class TestWorkContext implements WorkContext
+{
+   private static final long serialVersionUID = 1L;
+
+   /** 
+    * getDescription
+    * 
+    * @see javax.resource.spi.work.WorkContext#getDescription()
+    * @return description
+    */
+   public String getDescription()
+   {
+      return "TestDescription";
+   }
+
+   /** 
+    * getName
+    * @see javax.resource.spi.work.WorkContext#getName()
+    * @return name
+    */
+   public String getName()
+   {
+      return "TestName";
+   }
+
+}


Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/TestWorkContext.java
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date

Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/package.html
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16annoconfprop/package.html	2009-10-21 13:18:58 UTC (rev 95290)
@@ -0,0 +1,3 @@
+<body>
+Test cases about deployers.
+</body>

Added: projects/jboss-jca/trunk/deployers/src/test/resources/ra16annoconfprop.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/resources/ra16annoconfprop.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/resources/ra16annoconfprop.rar/META-INF/ra.xml	2009-10-21 13:18:58 UTC (rev 95290)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/javaee"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+           http://java.sun.com/xml/ns/j2ee/connector_1_6.xsd"
+           version="1.6" metadata-complete="false">
+
+   <vendor-name>Red Hat Middleware LLC</vendor-name>
+   <eis-type>Test RA</eis-type>
+   <resourceadapter-version>0.1</resourceadapter-version>
+
+   <resourceadapter>
+      <resourceadapter-class>org.jboss.jca.test.deployers.spec.rars.ra16annoconfprop.TestResourceAdapter</resourceadapter-class>
+
+      <config-property>
+         <config-property-name>myStringPropertyOrig</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>JEFF</config-property-value>
+      </config-property>
+      
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.deployers.spec.rars.ra16annoconfprop.TestManagedConnectionFactory</managedconnectionfactory-class>
+
+          <config-property>
+             <config-property-name>myStringPropertyInOutOrig</config-property-name>
+             <config-property-type>java.lang.String</config-property-type>
+             <config-property-value>JEFF</config-property-value>
+          </config-property>
+          
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.deployers.spec.rars.ra16annoconfprop.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.deployers.spec.rars.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.deployers.spec.rars.TestConnection</connection-impl-class>
+         </connection-definition>
+         <!-- overwrite -->
+     
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+      <inbound-resourceadapter>
+         <messageadapter>        
+            <messagelistener>
+               <messagelistener-type>org.jboss.jca.test.deployers.spec.rars.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.jca.test.deployers.spec.rars.ra16annoconfprop.TestActivationSpec</activationspec-class>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file


Property changes on: projects/jboss-jca/trunk/deployers/src/test/resources/ra16annoconfprop.rar/META-INF/ra.xml
___________________________________________________________________
Name: svn:keywords
   + Id Reversion Date




More information about the jboss-cvs-commits mailing list