[jboss-cvs] JBossAS SVN: r102969 - in projects/jboss-jca/trunk: validator/src/main/java/org/jboss/jca/validator and 33 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 25 13:20:43 EDT 2010


Author: jesper.pedersen
Date: 2010-03-25 13:20:39 -0400 (Thu, 25 Mar 2010)
New Revision: 102969

Added:
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/AOTestCase.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectConstructorWrong.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectPropertyWrong.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectReferenceableWrong.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectSerializableWrong.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/package.html
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/ASTestCase.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/TestActivationSpecWrongConstructor.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/TestActivationSpecWrongProperties.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/package.html
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/base/BaseAdminObject.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/base/BaseAdminObjectRA.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/CFTestCase.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongConstructor.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongReferenceable.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongSerializable.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongConstructor.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongReferenceable.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongSerializable.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingNullConnectionFactory.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/package.html
   projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aonora.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aonora.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aonora.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aora.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aora.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aora.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_constructor_wrong.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_constructor_wrong.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_constructor_wrong.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_property_wrong.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_property_wrong.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_property_wrong.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_referenceable_wrong.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_referenceable_wrong.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_referenceable_wrong.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_serializable_wrong.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_serializable_wrong.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_serializable_wrong.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/as_constructor_wrong.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/as_constructor_wrong.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/as_constructor_wrong.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/as_property_wrong.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/as_property_wrong.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/as_property_wrong.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_constructor_wrong.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_constructor_wrong.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_constructor_wrong.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_null_wrong.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_null_wrong.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_null_wrong.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_referenceable_wrong.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_referenceable_wrong.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_referenceable_wrong.rar/META-INF/ra.xml
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_serializable_wrong.rar/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_serializable_wrong.rar/META-INF/
   projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_serializable_wrong.rar/META-INF/ra.xml
Modified:
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
   projects/jboss-jca/trunk/validator/src/main/java/org/jboss/jca/validator/ValidateObject.java
   projects/jboss-jca/trunk/validator/src/main/java/org/jboss/jca/validator/rules/cf/CFConstructor.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/mcf/TestManagedConnectionFactoryEqualsAndHashCodeWrong.java
   projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right.rar/META-INF/ra.xml
Log:
[JBJCA-294] Validate as early as possible. Patch by Stefano Maestri

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	2010-03-25 16:17:31 UTC (rev 102968)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -421,16 +421,22 @@
                         // ConnectionFactory
                         Object cf = mcf.createConnectionFactory(noTxCm);
 
-                        if (trace)
+                        if (cf == null)
                         {
-                           log.trace("ConnectionFactory: " + cf.getClass().getName());
-                           log.trace("ConnectionFactory defined in classloader: " + 
-                                     cf.getClass().getClassLoader());
+                           log.error("ConnectionFactory is null");
                         }
+                        else
+                        {
+                           if (trace)
+                           {
+                              log.trace("ConnectionFactory: " + cf.getClass().getName());
+                              log.trace("ConnectionFactory defined in classloader: " + cf.getClass().getClassLoader());
+                           }
+                        }
 
                         archiveValidationObjects.add(new ValidateObject(Key.CONNECTION_FACTORY, cf));
 
-                        if (cf instanceof Serializable && cf instanceof Referenceable)
+                        if (cf != null && cf instanceof Serializable && cf instanceof Referenceable)
                         {
                            if (cdMetas.size() == 1)
                            {
@@ -470,20 +476,34 @@
                   {
                      if (mlMeta.getActivationSpecType() != null && mlMeta.getActivationSpecType().getAsClass() != null)
                      {
-                        List<ConfigPropertyMetaData> cpm = mlMeta.getActivationSpecType().getConfigProps();
+                        partialFailures =
+                              validateArchive(url, Arrays
+                                    .asList((Validate) new ValidateClass(Key.ACTIVATION_SPEC, mlMeta
+                                          .getActivationSpecType()
+                                          .getAsClass(), cl, mlMeta.getActivationSpecType().getConfigProps())));
 
-                        Object o = initAndInject(mlMeta.getActivationSpecType().getAsClass(), cpm, cl);
+                        if (partialFailures != null)
+                        {
+                           failures = new HashSet<Failure>();
+                           failures.addAll(partialFailures);
+                        }
 
-                        if (trace)
+                        if (!(getArchiveValidationFailOnError() && hasFailuresLevel(failures, Severity.ERROR)))
                         {
-                           log.trace("ActivationSpec: " + o.getClass().getName());
-                           log.trace("ActivationSpec defined in classloader: " + 
-                                     o.getClass().getClassLoader());
+                           List<ConfigPropertyMetaData> cpm = mlMeta.getActivationSpecType().getConfigProps();
+
+                           Object o = initAndInject(mlMeta.getActivationSpecType().getAsClass(), cpm, cl);
+
+                           if (trace)
+                           {
+                              log.trace("ActivationSpec: " + o.getClass().getName());
+                              log.trace("ActivationSpec defined in classloader: " + o.getClass().getClassLoader());
+                           }
+
+                           archiveValidationObjects.add(new ValidateObject(Key.ACTIVATION_SPEC, o, cpm));
+                           beanValidationObjects.add(o);
+                           associateResourceAdapter(resourceAdapter, o);
                         }
-
-                        archiveValidationObjects.add(new ValidateObject(Key.ACTIVATION_SPEC, o, cpm));
-                        beanValidationObjects.add(o);
-                        associateResourceAdapter(resourceAdapter, o);
                      }
                   }
                }
@@ -500,19 +520,32 @@
                   {
                      if (aoMeta.getAdminObjectImplementationClass() != null)
                      {
-                        Object o = initAndInject(aoMeta.getAdminObjectImplementationClass(), 
-                                                 aoMeta.getConfigProps(), cl);
+                        partialFailures =
+                           validateArchive(url, Arrays
+                                 .asList((Validate) new ValidateClass(Key.ADMIN_OBJECT,
+                                       aoMeta.getAdminObjectImplementationClass(), cl, aoMeta.getConfigProps())));
 
-                        if (trace)
+                        if (partialFailures != null)
                         {
-                           log.trace("AdminObject: " + o.getClass().getName());
-                           log.trace("AdminObject defined in classloader: " + 
-                                     o.getClass().getClassLoader());
+                           failures = new HashSet<Failure>();
+                           failures.addAll(partialFailures);
                         }
 
-                        archiveValidationObjects.add(
-                           new ValidateObject(Key.ADMIN_OBJECT, o, aoMeta.getConfigProps()));
-                        beanValidationObjects.add(o);
+                        if (!(getArchiveValidationFailOnError() && hasFailuresLevel(failures, Severity.ERROR)))
+                        {
+                           Object o =
+                                 initAndInject(aoMeta.getAdminObjectImplementationClass(), aoMeta.getConfigProps(), cl);
+
+                           if (trace)
+                           {
+                              log.trace("AdminObject: " + o.getClass().getName());
+                              log.trace("AdminObject defined in classloader: " + o.getClass().getClassLoader());
+                           }
+                           
+                           archiveValidationObjects
+                              .add(new ValidateObject(Key.ADMIN_OBJECT, o, aoMeta.getConfigProps()));
+                           beanValidationObjects.add(o);
+                        }
                      }
                   }
                }
@@ -524,6 +557,10 @@
 
          if (partialFailures != null)
          {
+            if (failures == null)
+            {
+               failures = new HashSet<Failure>();
+            }
             failures.addAll(partialFailures);
          }
 

Modified: projects/jboss-jca/trunk/validator/src/main/java/org/jboss/jca/validator/ValidateObject.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/main/java/org/jboss/jca/validator/ValidateObject.java	2010-03-25 16:17:31 UTC (rev 102968)
+++ projects/jboss-jca/trunk/validator/src/main/java/org/jboss/jca/validator/ValidateObject.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -32,7 +32,7 @@
 public class ValidateObject extends ValidateClass
 {
    /** Onject */
-   private Object object;
+   private final Object object;
 
    /**
     * Constructor
@@ -55,7 +55,7 @@
                          Object object,
                          List<ConfigPropertyMetaData> configProperties)
    {
-      super(key, object.getClass(), configProperties);
+      super(key, object != null ? object.getClass() : null, configProperties);
       this.object = object;
    }
 

Modified: projects/jboss-jca/trunk/validator/src/main/java/org/jboss/jca/validator/rules/cf/CFConstructor.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/main/java/org/jboss/jca/validator/rules/cf/CFConstructor.java	2010-03-25 16:17:31 UTC (rev 102968)
+++ projects/jboss-jca/trunk/validator/src/main/java/org/jboss/jca/validator/rules/cf/CFConstructor.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -43,7 +43,7 @@
 public class CFConstructor implements Rule
 {
    /** Section */
-   private static final String SECTION = "17.5.1.1 ";
+   private static final String SECTION = "17.5.1.1";
 
    /**
     * Constructor

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/AOTestCase.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/AOTestCase.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/AOTestCase.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,302 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.validator.rules.ao;
+
+import org.jboss.jca.fungal.deployers.DeployException;
+import org.jboss.jca.test.validator.rules.TestCaseAbstract;
+import org.jboss.jca.validator.Failure;
+import org.jboss.jca.validator.Severity;
+import org.jboss.jca.validator.ValidatorException;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
+
+import org.junit.Test;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.hamcrest.core.IsNull.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+import static org.junit.matchers.JUnitMatchers.hasItem;
+
+/**
+ * TestCase stressing AO related validation rules
+ *
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ *
+ */
+public class AOTestCase extends TestCaseAbstract
+{
+
+
+   /**
+    * stress the AORA rule for Serialization constraint
+    *
+    * @throws Throwable and expect a DeployValidatorException
+    *
+    */
+   @Test(expected = ValidatorException.class)
+   public void deployerShouldThrowDeployExceptionWithWrongSerializableAdminObject() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("ao_serializable_wrong.rar");
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+      }
+      catch (DeployException de)
+      {
+         //then
+         ValidatorException dve = null;
+         if (de.getCause() != null && de.getCause() instanceof ValidatorException)
+         {
+            dve = (ValidatorException) de.getCause();
+         }
+         else
+         {
+            //fail
+            de.printStackTrace();
+            throw de;
+         }
+
+         final Failure failureRA =
+               new Failure(Severity.ERROR,
+                     "13.4.2.3",
+                     "An AdminObject must implement javax.resource.Referenceable and java.io.Serializable "
+                           + "interfaces if javax.resource.spi.ResourceAdapterAssociation is implemented Code",
+                     org.jboss.jca.test.validator.rules.ao.TestAdminObjectSerializableWrong.class.getCanonicalName());
+         assertThat(dve.getFailures(), notNullValue());
+         assertThat(dve.getFailures(), hasItem(equalTo(failureRA)));
+         assertThat(dve.getFailures().size(), is(1));
+         //success
+         throw dve;
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+      //no exception = fail!
+      fail();
+   }
+
+   /**
+    * stress the AORA rule for Referenceable constraint
+    *
+    * @throws Throwable and expect a DeployValidatorException
+    *
+    */
+   @Test(expected = ValidatorException.class)
+   public void deployerShouldThrowDeployExceptionWithWrongReferenceableAdminObject() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("ao_referenceable_wrong.rar");
+      try
+      {
+         //when
+         embedded.deploy(archive);
+      }
+      catch (DeployException de)
+      {
+         //then
+         ValidatorException dve = null;
+         if (de.getCause() != null && de.getCause() instanceof ValidatorException)
+         {
+            dve = (ValidatorException) de.getCause();
+         }
+         else
+         {
+            //fail
+            de.printStackTrace();
+            throw de;
+         }
+         final Failure failureRA =
+               new Failure(Severity.ERROR,
+                     "13.4.2.3",
+                     "An AdminObject must implement javax.resource.Referenceable and java.io.Serializable "
+                           + "interfaces if javax.resource.spi.ResourceAdapterAssociation is implemented Code",
+                     org.jboss.jca.test.validator.rules.ao.TestAdminObjectReferenceableWrong.class.getCanonicalName());
+         assertThat(dve.getFailures(), notNullValue());
+         assertThat(dve.getFailures(), hasItem(equalTo(failureRA)));
+         assertThat(dve.getFailures().size(), is(1));
+         //success
+         throw dve;
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+      //no exception = fail!
+      fail();
+   }
+
+
+   /**
+    * stress the AOConstructor rule.
+    *
+    * @throws Throwable and expect a DeployValidatorException
+    *
+    */
+   @Test(expected = ValidatorException.class)
+   public void deployerShouldThrowDeployExceptionWithWrongConstructor() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("ao_constructor_wrong.rar");
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+      }
+      catch (DeployException de)
+      {
+         //then
+         ValidatorException dve = null;
+         if (de.getCause() != null && de.getCause() instanceof ValidatorException)
+         {
+            dve = (ValidatorException) de.getCause();
+         }
+         else
+         {
+            //fail
+            de.printStackTrace();
+            throw de;
+         }
+
+         final Failure failureRA =
+               new Failure(Severity.ERROR, "19.3", "An AdminObject must have a default constructor",
+                     null);
+         assertThat(dve.getFailures(), notNullValue());
+         assertThat(dve.getFailures(), hasItem(equalTo(failureRA)));
+         assertThat(dve.getFailures().size(), is(1));
+         //success
+         throw dve;
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+      //no exception = fail!
+      fail();
+   }
+
+   /**
+    * stress the AOConfigProperties rule.
+    *
+    * @throws Throwable and expect a DeployValidatorException
+    *
+    */
+   @Test
+   public void deployerShouldPrintIntoLogFileWithWrongPropertyAS() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("ao_property_wrong.rar");
+      System.setProperty("jboss.jca.home", ".");
+      File directory = new File("./log");
+      directory.mkdir();
+      BufferedReader input = null;
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+         assertThat(directory.listFiles().length, is(1));
+         assertThat(directory.listFiles()[0].getName(), is("ao_property_wrong.rar.log"));
+         input = new BufferedReader(new FileReader(directory.listFiles()[0]));
+         assertThat(input.readLine(), is("Severity: WARNING"));
+         assertThat(input.readLine(), is("Section: 20.7"));
+         assertThat(input.readLine(), is("Description: Invalid config-property-type for AdminObject."));
+         assertThat(input.readLine(), is("Code: Class: "
+               + "org.jboss.jca.test.validator.rules.ao.TestAdminObjectPropertyWrong "
+               + "Property: myStringProperty Type: void"));
+
+         assertThat(input.readLine(), is((String) null));
+      }
+      finally
+      {
+         if (input != null)
+         {
+            input.close();
+         }
+         deleteDirectory(directory);
+      }
+      embedded.undeploy(archive);
+   }
+
+   /**
+    * Deploy a correct rar with admin object without RAReference
+    *
+    * @throws Throwable and doesn't expect any Exception
+    *
+    */
+   @Test
+   public void deployerShouldNotThrowDeployExceptionWithAllRightWithoutRAReference() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("all_right_aonora.rar");
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+         //then
+         //No Exception
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+
+   }
+
+   /**
+    * Deploy a correct rar with admin object without RAReference
+    *
+    * @throws Throwable and doesn't expect any Exception
+    *
+    */
+   @Test
+   public void deployerShouldNotThrowDeployExceptionWithAllRightWithRAReference() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("all_right_aora.rar");
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+         //then
+         //No Exception
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectConstructorWrong.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectConstructorWrong.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectConstructorWrong.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,61 @@
+/*
+ * 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.validator.rules.ao;
+
+import javax.resource.spi.ConfigProperty;
+
+/**
+ * An AdminObject with wrong property
+ * @author Stefano Maestri mailto:stefano.maestri at javalinux.it
+ *
+ */
+public class TestAdminObjectConstructorWrong
+{
+   @ConfigProperty(type = String.class, defaultValue = "InAO")
+   private String myStringProperty;
+
+   /**
+    * just hide default constructor
+    * @param foo unused param
+    */
+   public TestAdminObjectConstructorWrong(String foo)
+   {
+
+   }
+
+   /**
+    *
+    * @param myStringProperty the myStringProperty to set
+    */
+   public void setMyStringProperty(String myStringProperty)
+   {
+      this.myStringProperty = myStringProperty;
+   }
+
+   /**
+    * @return the myStringProperty
+    */
+   public String getMyStringProperty()
+   {
+      return myStringProperty;
+   }
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectPropertyWrong.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectPropertyWrong.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectPropertyWrong.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,50 @@
+/*
+ * 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.validator.rules.ao;
+
+
+/**
+ * An AdminObject with wrong property
+ * @author Stefano Maestri mailto:stefano.maestri at javalinux.it
+ *
+ */
+public class TestAdminObjectPropertyWrong
+{
+   private String myStringProperty;
+
+   /**
+    *
+    * @param myStringProperty the myStringProperty to set
+    */
+   public void setMyStringProperty(String myStringProperty)
+   {
+      this.myStringProperty = myStringProperty;
+   }
+
+   /**
+    * wrong getter
+    */
+   public void getMyStringProperty()
+   {
+
+   }
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectReferenceableWrong.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectReferenceableWrong.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectReferenceableWrong.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,83 @@
+/*
+ * 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.validator.rules.ao;
+
+import java.io.Serializable;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConfigProperty;
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.ResourceAdapterAssociation;
+
+/**
+ * An AdminObject with wrong property
+ * @author Stefano Maestri mailto:stefano.maestri at javalinux.it
+ *
+ */
+public class TestAdminObjectReferenceableWrong implements ResourceAdapterAssociation, Serializable
+{
+   /**
+    */
+   private static final long serialVersionUID = 5554958948788007459L;
+
+   @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;
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.resource.spi.ResourceAdapterAssociation#getResourceAdapter()
+    */
+   @Override
+   public ResourceAdapter getResourceAdapter()
+   {
+      return null;
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.resource.spi.ResourceAdapterAssociation#setResourceAdapter(javax.resource.spi.ResourceAdapter)
+    */
+   @Override
+   public void setResourceAdapter(ResourceAdapter ra) throws ResourceException
+   {
+   }
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectSerializableWrong.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectSerializableWrong.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/TestAdminObjectSerializableWrong.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,100 @@
+/*
+ * 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.validator.rules.ao;
+
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.resource.Referenceable;
+import javax.resource.ResourceException;
+import javax.resource.spi.ConfigProperty;
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.ResourceAdapterAssociation;
+
+/**
+ * An AdminObject with wrong property
+ * @author Stefano Maestri mailto:stefano.maestri at javalinux.it
+ *
+ */
+public class TestAdminObjectSerializableWrong implements ResourceAdapterAssociation, Referenceable
+{
+   @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;
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.resource.spi.ResourceAdapterAssociation#getResourceAdapter()
+    */
+   @Override
+   public ResourceAdapter getResourceAdapter()
+   {
+      return null;
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.resource.spi.ResourceAdapterAssociation#setResourceAdapter(javax.resource.spi.ResourceAdapter)
+    */
+   @Override
+   public void setResourceAdapter(ResourceAdapter ra) throws ResourceException
+   {
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.resource.Referenceable#setReference(javax.naming.Reference)
+    */
+   @Override
+   public void setReference(Reference reference)
+   {
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.naming.Referenceable#getReference()
+    */
+   @Override
+   public Reference getReference() throws NamingException
+   {
+      return null;
+   }
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/package.html
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/ao/package.html	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,3 @@
+<body>
+Test cases about ao deployers validator.
+</body>

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/ASTestCase.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/ASTestCase.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/ASTestCase.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,171 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.validator.rules.as;
+
+import org.jboss.jca.fungal.deployers.DeployException;
+import org.jboss.jca.test.validator.rules.TestCaseAbstract;
+import org.jboss.jca.validator.Failure;
+import org.jboss.jca.validator.Severity;
+import org.jboss.jca.validator.ValidatorException;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
+
+import org.junit.Test;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.hamcrest.core.IsNull.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+import static org.junit.matchers.JUnitMatchers.hasItem;
+
+/**
+ * TestCase stressing AS related validation rules
+ *
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ *
+ */
+public class ASTestCase extends TestCaseAbstract
+{
+   /**
+    * stress the ASConstructor rule.
+    *
+    * @throws Throwable and expect a DeployValidatorException
+    *
+    */
+   @Test(expected = ValidatorException.class)
+   public void deployerShouldThrowDeployExceptionWithWrongConstructor() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("as_constructor_wrong.rar");
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+      }
+      catch (DeployException de)
+      {
+         //then
+         ValidatorException dve = null;
+         if (de.getCause() != null && de.getCause() instanceof ValidatorException)
+         {
+            dve = (ValidatorException) de.getCause();
+         }
+         else
+         {
+            //fail
+            de.printStackTrace();
+            throw de;
+         }
+
+         final Failure failureRA =
+               new Failure(Severity.ERROR, "19.3", "An ActivationSpec must have a default constructor",
+                     null);
+         assertThat(dve.getFailures(), notNullValue());
+         assertThat(dve.getFailures(), hasItem(equalTo(failureRA)));
+         assertThat(dve.getFailures().size(), is(1));
+         //success
+         throw dve;
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+      //no exception = fail!
+      fail();
+   }
+
+   /**
+    * stress the ASConfigProperties rule.
+    *
+    * @throws Throwable and expect a DeployValidatorException
+    *
+    */
+   @Test
+   public void deployerShouldPrintIntoLogFileWithWrongPropertyAS() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("as_property_wrong.rar");
+      System.setProperty("jboss.jca.home", ".");
+      File directory = new File("./log");
+      directory.mkdir();
+      BufferedReader input = null;
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+         assertThat(directory.listFiles().length, is(1));
+         assertThat(directory.listFiles()[0].getName(), is("as_property_wrong.rar.log"));
+         input = new BufferedReader(new FileReader(directory.listFiles()[0]));
+         assertThat(input.readLine(), is("Severity: WARNING"));
+         assertThat(input.readLine(), is("Section: 20.7"));
+         assertThat(input.readLine(), is("Description: Invalid config-property-type for ActivationSpec."));
+         assertThat(input.readLine(), is("Code: Class: "
+               + "org.jboss.jca.test.validator.rules.as.TestActivationSpecWrongProperties "
+               + "Property: StringRAR Type: void"));
+
+         assertThat(input.readLine(), is((String) null));
+      }
+      finally
+      {
+         if (input != null)
+         {
+            input.close();
+         }
+         deleteDirectory(directory);
+      }
+      embedded.undeploy(archive);
+   }
+
+   /**
+    * Deploy a correct RA not violating any rule.
+    *
+    * @throws Throwable and doesn't expect any Exception
+    *
+    */
+   @Test
+   public void deployerShouldNotThrowDeployExceptionWithAllRight() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("all_right.rar");
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+         //then
+         //No Exception
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/TestActivationSpecWrongConstructor.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/TestActivationSpecWrongConstructor.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/TestActivationSpecWrongConstructor.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,44 @@
+/*
+ * 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.validator.rules.as;
+
+import org.jboss.jca.test.validator.rules.base.BaseActivationSpec;
+
+/**
+ * BaseActivationSpec
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ *
+ */
+
+public class TestActivationSpecWrongConstructor extends BaseActivationSpec
+{
+
+   /**
+    * Just Hide default constructor
+    * @param foo unused parameter
+    */
+   public TestActivationSpecWrongConstructor(String foo)
+   {
+
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/TestActivationSpecWrongProperties.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/TestActivationSpecWrongProperties.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/TestActivationSpecWrongProperties.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -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.validator.rules.as;
+
+import org.jboss.jca.test.validator.rules.base.BaseActivationSpec;
+
+/**
+ * BaseActivationSpec
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ *
+ */
+
+public class TestActivationSpecWrongProperties extends BaseActivationSpec
+{
+   private String stringRar;
+
+   /**
+    *
+    * @param s The value
+    */
+   public void setStringRAR(String s)
+   {
+      this.stringRar = s;
+   }
+
+   /**
+    *
+    */
+   public void getStringRAR()
+   {
+      //return stringRar;
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/package.html
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/as/package.html	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,3 @@
+<body>
+Test cases about as deployers validator.
+</body>

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/base/BaseAdminObject.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/base/BaseAdminObject.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/base/BaseAdminObject.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,52 @@
+/*
+ * 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.validator.rules.base;
+
+import javax.resource.spi.ConfigProperty;
+
+/**
+ * A bAse correct AdminObject
+ * @author Stefano Maestri mailto:stefano.maestri at javalinux.it
+ *
+ */
+
+public class BaseAdminObject
+{
+   @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;
+   }
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/base/BaseAdminObjectRA.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/base/BaseAdminObjectRA.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/base/BaseAdminObjectRA.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,105 @@
+/*
+ * 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.validator.rules.base;
+
+import java.io.Serializable;
+
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.resource.Referenceable;
+import javax.resource.ResourceException;
+import javax.resource.spi.ConfigProperty;
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.ResourceAdapterAssociation;
+
+/**
+ * A bAse correct AdminObject
+ * @author Stefano Maestri mailto:stefano.maestri at javalinux.it
+ *
+ */
+
+public class BaseAdminObjectRA implements ResourceAdapterAssociation, Referenceable, Serializable
+{
+   /**
+    */
+   private static final long serialVersionUID = 1L;
+   @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;
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.resource.spi.ResourceAdapterAssociation#getResourceAdapter()
+    */
+   @Override
+   public ResourceAdapter getResourceAdapter()
+   {
+      return null;
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.resource.spi.ResourceAdapterAssociation#setResourceAdapter(javax.resource.spi.ResourceAdapter)
+    */
+   @Override
+   public void setResourceAdapter(ResourceAdapter ra) throws ResourceException
+   {
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.resource.Referenceable#setReference(javax.naming.Reference)
+    */
+   @Override
+   public void setReference(Reference reference)
+   {
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.naming.Referenceable#getReference()
+    */
+   @Override
+   public Reference getReference() throws NamingException
+   {
+      return null;
+   }
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/CFTestCase.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/CFTestCase.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/CFTestCase.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,274 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.validator.rules.cf;
+
+import org.jboss.jca.fungal.deployers.DeployException;
+import org.jboss.jca.test.validator.rules.TestCaseAbstract;
+import org.jboss.jca.validator.Failure;
+import org.jboss.jca.validator.Severity;
+import org.jboss.jca.validator.ValidatorException;
+
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
+
+import org.junit.Test;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.hamcrest.core.IsNull.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+import static org.junit.matchers.JUnitMatchers.hasItem;
+
+/**
+ * TestCase stressing CF related validation rules
+ *
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ *
+ */
+public class CFTestCase extends TestCaseAbstract
+{
+
+   /**
+    * stress the CF rule.
+    *
+    * @throws Throwable and expect a ValidatorException
+    *
+    */
+   @Test(expected = ValidatorException.class)
+   public void deployerShouldThrowDeployExceptionWithNullCF() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("cf_null_wrong.rar");
+      try
+      {
+         //when
+         embedded.deploy(archive);
+      }
+      catch (DeployException de)
+      {
+         //then
+         ValidatorException dve = null;
+         if (de.getCause() != null && de.getCause() instanceof ValidatorException)
+         {
+            dve = (ValidatorException) de.getCause();
+         }
+         else
+         {
+            //fail
+            de.printStackTrace();
+            throw de;
+         }
+
+         final Failure failureRA =
+               new Failure(Severity.ERROR, "17.5.1.1", "ConnectionFactory must be a non-null value", null);
+         assertThat(dve.getFailures(), notNullValue());
+         assertThat(dve.getFailures(), hasItem(equalTo(failureRA)));
+         assertThat(dve.getFailures().size(), is(1));
+         //success
+         throw dve;
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+
+   }
+
+   /**
+    * stress the CFReferenciable rule.
+    *
+    * @throws Throwable and expect a ValidatorException
+    *
+    */
+   @Test(expected = ValidatorException.class)
+   public void deployerShouldThrowDeployExceptionWithWrongReferenciable() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("cf_referenceable_wrong.rar");
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+      }
+      catch (DeployException de)
+      {
+         //then
+         ValidatorException dve = null;
+         if (de.getCause() != null && de.getCause() instanceof ValidatorException)
+         {
+            dve = (ValidatorException) de.getCause();
+         }
+         else
+         {
+            //fail
+            de.printStackTrace();
+            throw de;
+         }
+
+         final Failure failureRA =
+               new Failure(Severity.ERROR,
+                     "17.5.1.1",
+                     "ConnectionFactory must implement javax.resource.Referenceable",
+                     ConnectionFactoryWithWrongReferenceable.class.getName());
+         assertThat(dve.getFailures(), notNullValue());
+         assertThat(dve.getFailures(), hasItem(equalTo(failureRA)));
+         assertThat(dve.getFailures().size(), is(1));
+         //success
+         throw dve;
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+      //no exception = fail!
+      fail();
+   }
+
+   /**
+    * stress the CFSerializable rule.
+    *
+    * @throws Throwable and expect a ValidatorException
+    *
+    */
+   @Test(expected = ValidatorException.class)
+   public void deployerShouldThrowDeployExceptionWithWrongSerializableCF() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("cf_serializable_wrong.rar");
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+      }
+      catch (DeployException de)
+      {
+         //then
+         ValidatorException dve = null;
+         if (de.getCause() != null && de.getCause() instanceof ValidatorException)
+         {
+            dve = (ValidatorException) de.getCause();
+         }
+         else
+         {
+            //fail
+            de.printStackTrace();
+            throw de;
+         }
+
+         final Failure failureRA =
+               new Failure(Severity.ERROR,
+                     "17.5.1.1",
+                     "ConnectionFactory must implement java.io.Serializable",
+                     ConnectionFactoryWithWrongSerializable.class.getName());
+         assertThat(dve.getFailures(), notNullValue());
+         assertThat(dve.getFailures(), hasItem(equalTo(failureRA)));
+         assertThat(dve.getFailures().size(), is(1));
+         //success
+         throw dve;
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+      //no exception = fail!
+      fail();
+   }
+
+   /**
+    * stress the CFConstructor rule.
+    *
+    * @throws Throwable and expect a DeployValidatorException
+    *
+    */
+   @Test(expected = ValidatorException.class)
+   public void deployerShouldThrowDeployExceptionWithWrongConstructor() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("cf_constructor_wrong.rar");
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+      }
+      catch (DeployException de)
+      {
+         //then
+         ValidatorException dve = null;
+         if (de.getCause() != null && de.getCause() instanceof ValidatorException)
+         {
+            dve = (ValidatorException) de.getCause();
+         }
+         else
+         {
+            //fail
+            de.printStackTrace();
+            throw de;
+         }
+
+         final Failure failureRA =
+               new Failure(Severity.ERROR, "17.5.1.1", "A ConnectionFactory must have a default constructor ",
+                     null);
+         assertThat(dve.getFailures(), notNullValue());
+         assertThat(dve.getFailures(), hasItem(equalTo(failureRA)));
+         assertThat(dve.getFailures().size(), is(1));
+         //success
+         throw dve;
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+      //no exception = fail!
+      fail();
+   }
+
+
+   /**
+    * Deploy a correct RA not violating any rule.
+    *
+    * @throws Throwable and doesn't expect any Exception
+    *
+    */
+   @Test
+   public void deployerShouldNotThrowDeployExceptionWithAllRight() throws Throwable
+   {
+      //given
+      ResourceAdapterArchive archive = getArchive("all_right.rar");
+
+      try
+      {
+         //when
+         embedded.deploy(archive);
+         //then
+         //No Exception
+      }
+      finally
+      {
+         embedded.undeploy(archive);
+      }
+
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongConstructor.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongConstructor.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongConstructor.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,44 @@
+/*
+ * 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.validator.rules.cf;
+
+import org.jboss.jca.test.validator.rules.base.BaseCciConnectionFactory;
+
+/**
+ * ConnectionFactoryWithWrongConstructor
+ *
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ * @version $Revision: $
+ */
+public class ConnectionFactoryWithWrongConstructor extends BaseCciConnectionFactory
+{
+
+   /**
+    * Constructor just to hide default constructor
+    * @param foo unused parameter
+    */
+   public ConnectionFactoryWithWrongConstructor(String foo)
+   {
+
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongReferenceable.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongReferenceable.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongReferenceable.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,40 @@
+/*
+ * 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.validator.rules.cf;
+
+import java.io.Serializable;
+
+/**
+ * ConnectionFactoryWithWrongConstructor
+ *
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ * @version $Revision: $
+ */
+public class ConnectionFactoryWithWrongReferenceable implements Serializable
+{
+
+   /**
+    */
+   private static final long serialVersionUID = -951140423144511514L;
+
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongSerializable.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongSerializable.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/ConnectionFactoryWithWrongSerializable.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,59 @@
+/*
+ * 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.validator.rules.cf;
+
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.resource.Referenceable;
+
+/**
+ * ConnectionFactoryWithWrongConstructor
+ *
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ * @version $Revision: $
+ */
+public class ConnectionFactoryWithWrongSerializable implements Referenceable
+{
+
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.resource.Referenceable#setReference(javax.naming.Reference)
+    */
+   @Override
+   public void setReference(Reference reference)
+   {
+   }
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see javax.naming.Referenceable#getReference()
+    */
+   @Override
+   public Reference getReference() throws NamingException
+   {
+      return null;
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongConstructor.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongConstructor.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongConstructor.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,52 @@
+/*
+ * 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.validator.rules.cf;
+
+import org.jboss.jca.test.validator.rules.base.BaseManagedConnectionFactory;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionManager;
+
+/**
+ * TestManagedConnectionFactoryCreatingNullConnectionFactory
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ * @version $Revision: $
+ */
+public class TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongConstructor
+      extends
+         BaseManagedConnectionFactory
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see org.jboss.jca.test.validator.rules.base.BaseManagedConnectionFactory#createConnectionFactory
+    * (javax.resource.spi.ConnectionManager)
+    */
+   @Override
+   public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException
+   {
+      return new ConnectionFactoryWithWrongConstructor("foo");
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongReferenceable.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongReferenceable.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongReferenceable.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,52 @@
+/*
+ * 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.validator.rules.cf;
+
+import org.jboss.jca.test.validator.rules.base.BaseManagedConnectionFactory;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionManager;
+
+/**
+ * TestManagedConnectionFactoryCreatingNullConnectionFactory
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ * @version $Revision: $
+ */
+public class TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongReferenceable
+      extends
+         BaseManagedConnectionFactory
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see org.jboss.jca.test.validator.rules.base.BaseManagedConnectionFactory#createConnectionFactory
+    * (javax.resource.spi.ConnectionManager)
+    */
+   @Override
+   public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException
+   {
+      return new ConnectionFactoryWithWrongReferenceable();
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongSerializable.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongSerializable.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongSerializable.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,52 @@
+/*
+ * 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.validator.rules.cf;
+
+import org.jboss.jca.test.validator.rules.base.BaseManagedConnectionFactory;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionManager;
+
+/**
+ * TestManagedConnectionFactoryCreatingNullConnectionFactory
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ * @version $Revision: $
+ */
+public class TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongSerializable
+      extends
+         BaseManagedConnectionFactory
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see org.jboss.jca.test.validator.rules.base.BaseManagedConnectionFactory#createConnectionFactory
+    * (javax.resource.spi.ConnectionManager)
+    */
+   @Override
+   public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException
+   {
+      return new ConnectionFactoryWithWrongSerializable();
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingNullConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingNullConnectionFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/TestManagedConnectionFactoryCreatingNullConnectionFactory.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,50 @@
+/*
+ * 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.validator.rules.cf;
+
+import org.jboss.jca.test.validator.rules.base.BaseManagedConnectionFactory;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionManager;
+
+/**
+ * TestManagedConnectionFactoryCreatingNullConnectionFactory
+ * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
+ * @version $Revision: $
+ */
+public class TestManagedConnectionFactoryCreatingNullConnectionFactory extends BaseManagedConnectionFactory
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * {@inheritDoc}
+    *
+    * @see org.jboss.jca.test.validator.rules.base.BaseManagedConnectionFactory#createConnectionFactory
+    * (javax.resource.spi.ConnectionManager)
+    */
+   @Override
+   public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException
+   {
+      return null;
+   }
+
+}

Added: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/package.html
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/cf/package.html	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,3 @@
+<body>
+Test cases about cf deployers validator.
+</body>

Modified: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/mcf/TestManagedConnectionFactoryEqualsAndHashCodeWrong.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/mcf/TestManagedConnectionFactoryEqualsAndHashCodeWrong.java	2010-03-25 16:17:31 UTC (rev 102968)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/test/validator/rules/mcf/TestManagedConnectionFactoryEqualsAndHashCodeWrong.java	2010-03-25 17:20:39 UTC (rev 102969)
@@ -44,7 +44,10 @@
  * @author <a href="mailto:stefano.maestri at javalinux.it">Stefano Maestri</a>
  * @version $Revision: $
  */
-public class TestManagedConnectionFactoryEqualsAndHashCodeWrong implements ManagedConnectionFactory, ResourceAdapterAssociation
+public class TestManagedConnectionFactoryEqualsAndHashCodeWrong
+      implements
+         ManagedConnectionFactory,
+         ResourceAdapterAssociation
 {
    private static final long serialVersionUID = 1L;
 

Modified: projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right.rar/META-INF/ra.xml	2010-03-25 16:17:31 UTC (rev 102968)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -31,5 +31,15 @@
          <transaction-support>LocalTransaction</transaction-support>
          <reauthentication-support>false</reauthentication-support>
       </outbound-resourceadapter>
+      <inbound-resourceadapter>
+         <messageadapter>        
+            <messagelistener>
+               <messagelistener-type>org.jboss.jca.test.validator.rules.base.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.jca.test.validator.rules.base.BaseActivationSpec</activationspec-class>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
    </resourceadapter>
 </connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aonora.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aonora.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aonora.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,50 @@
+<?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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <adminobject>
+         <adminobject-interface>org.jboss.jca.test.validator.rules.base.BaseAdminObject</adminobject-interface>
+         <adminobject-class>org.jboss.jca.test.validator.rules.base.BaseAdminObject</adminobject-class>
+      </adminobject>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>
+      
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnectionFactory</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+      <inbound-resourceadapter>
+         <messageadapter>        
+            <messagelistener>
+               <messagelistener-type>org.jboss.jca.test.validator.rules.base.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.jca.test.validator.rules.base.BaseActivationSpec</activationspec-class>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aora.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aora.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/all_right_aora.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,50 @@
+<?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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <adminobject>
+         <adminobject-interface>org.jboss.jca.test.validator.rules.base.BaseAdminObjectRA</adminobject-interface>
+         <adminobject-class>org.jboss.jca.test.validator.rules.base.BaseAdminObjectRA</adminobject-class>
+      </adminobject>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>
+      
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnectionFactory</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+      <inbound-resourceadapter>
+         <messageadapter>        
+            <messagelistener>
+               <messagelistener-type>org.jboss.jca.test.validator.rules.base.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.jca.test.validator.rules.base.BaseActivationSpec</activationspec-class>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_constructor_wrong.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_constructor_wrong.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_constructor_wrong.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,50 @@
+<?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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <adminobject>
+         <adminobject-interface>org.jboss.jca.test.validator.rules.ao.TestAdminObjectConstructorWrong</adminobject-interface>
+         <adminobject-class>org.jboss.jca.test.validator.rules.ao.TestAdminObjectConstructorWrong</adminobject-class>
+      </adminobject>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>
+      
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnectionFactory</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+      <inbound-resourceadapter>
+         <messageadapter>        
+            <messagelistener>
+               <messagelistener-type>org.jboss.jca.test.validator.rules.base.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.jca.test.validator.rules.base.BaseActivationSpec</activationspec-class>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_property_wrong.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_property_wrong.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_property_wrong.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <adminobject>
+         <adminobject-interface>org.jboss.jca.test.validator.rules.ao.TestAdminObjectPropertyWrong</adminobject-interface>
+         <adminobject-class>org.jboss.jca.test.validator.rules.ao.TestAdminObjectPropertyWrong</adminobject-class>
+         <config-property>
+            <config-property-name>myStringProperty</config-property-name>
+            <config-property-type>java.lang.String</config-property-type>
+            <config-property-value>InAO</config-property-value>
+         </config-property>
+      </adminobject>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>
+      
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnectionFactory</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+      <inbound-resourceadapter>
+         <messageadapter>        
+            <messagelistener>
+               <messagelistener-type>org.jboss.jca.test.validator.rules.base.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.jca.test.validator.rules.base.BaseActivationSpec</activationspec-class>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_referenceable_wrong.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_referenceable_wrong.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_referenceable_wrong.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,50 @@
+<?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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <adminobject>
+         <adminobject-interface>org.jboss.jca.test.validator.rules.ao.TestAdminObjectReferenceableWrong</adminobject-interface>
+         <adminobject-class>org.jboss.jca.test.validator.rules.ao.TestAdminObjectReferenceableWrong</adminobject-class>
+      </adminobject>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>
+      
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnectionFactory</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+      <inbound-resourceadapter>
+         <messageadapter>        
+            <messagelistener>
+               <messagelistener-type>org.jboss.jca.test.validator.rules.base.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.jca.test.validator.rules.base.BaseActivationSpec</activationspec-class>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_serializable_wrong.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_serializable_wrong.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/ao_serializable_wrong.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,50 @@
+<?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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <adminobject>
+         <adminobject-interface>org.jboss.jca.test.validator.rules.ao.TestAdminObjectSerializableWrong</adminobject-interface>
+         <adminobject-class>org.jboss.jca.test.validator.rules.ao.TestAdminObjectSerializableWrong</adminobject-class>
+      </adminobject>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>
+      
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnectionFactory</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+      <inbound-resourceadapter>
+         <messageadapter>        
+            <messagelistener>
+               <messagelistener-type>org.jboss.jca.test.validator.rules.base.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.jca.test.validator.rules.base.BaseActivationSpec</activationspec-class>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/as_constructor_wrong.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/as_constructor_wrong.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/as_constructor_wrong.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+           http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+           version="1.5">
+
+   <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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>   
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnectionFactory</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+      <inbound-resourceadapter>
+         <messageadapter>        
+            <messagelistener>
+               <messagelistener-type>org.jboss.jca.test.validator.rules.base.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.jca.test.validator.rules.as.TestActivationSpecWrongConstructor</activationspec-class>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/as_property_wrong.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/as_property_wrong.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/as_property_wrong.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+   http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+   version="1.5">
+
+   <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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>   
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnectionFactory</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+      <inbound-resourceadapter>
+         <messageadapter>        
+            <messagelistener>
+               <messagelistener-type>org.jboss.jca.test.validator.rules.base.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.jboss.jca.test.validator.rules.as.TestActivationSpecWrongProperties</activationspec-class>
+                  <config-property>
+                     <config-property-name>StringRAR</config-property-name>
+                     <config-property-type>java.lang.String</config-property-type>
+                     <config-property-value>StringFromRARProperties</config-property-value>
+                  </config-property>   
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_constructor_wrong.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_constructor_wrong.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_constructor_wrong.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+           http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+           version="1.5">
+
+   <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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>   
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.cf.TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongConstructor</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_null_wrong.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_null_wrong.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_null_wrong.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+           http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+           version="1.5">
+
+   <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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>   
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.cf.TestManagedConnectionFactoryCreatingNullConnectionFactory</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_referenceable_wrong.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_referenceable_wrong.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_referenceable_wrong.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+           http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+           version="1.5">
+
+   <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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>   
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.cf.TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongReferenceable</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file

Added: projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_serializable_wrong.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_serializable_wrong.rar/META-INF/ra.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/validator/src/test/resources/validator/cf_serializable_wrong.rar/META-INF/ra.xml	2010-03-25 17:20:39 UTC (rev 102969)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+           http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+           version="1.5">
+
+   <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.validator.rules.ra.TestResourceAdapterRight</resourceadapter-class>
+      <config-property>
+         <config-property-name>StringRAR</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>StringFromRARProperties</config-property-value>
+      </config-property>   
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.jboss.jca.test.validator.rules.cf.TestManagedConnectionFactoryCreatingConnectionFactoryWithWrongSerializable</managedconnectionfactory-class>
+
+            <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+            <connectionfactory-impl-class>org.jboss.jca.test.validator.rules.ra.TestManagedConnection</connectionfactory-impl-class>
+            <connection-interface>org.jboss.jca.test.validator.rules.base.TestConnectionInterface</connection-interface>
+            <connection-impl-class>org.jboss.jca.test.validator.rules.base.TestConnection</connection-impl-class>
+         </connection-definition>
+         <transaction-support>LocalTransaction</transaction-support>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+   </resourceadapter>
+</connector>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list