[jboss-cvs] JBossAS SVN: r93800 - in projects/jboss-jca/trunk: deployers and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Sep 21 06:27:13 EDT 2009
Author: jeff.zhang
Date: 2009-09-21 06:27:12 -0400 (Mon, 21 Sep 2009)
New Revision: 93800
Added:
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/package.html
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/Test2ResourceAdapter.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestActivationSpec.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestAdminObjectInterface.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestManagedConnection.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestManagedConnectionFactory.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestResourceAdapter.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/package.html
projects/jboss-jca/trunk/deployers/src/test/resources/rafail2connector.rar/
projects/jboss-jca/trunk/deployers/src/test/resources/rafail2connector.rar/META-INF/
Modified:
projects/jboss-jca/trunk/build.xml
projects/jboss-jca/trunk/deployers/build.xml
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java
Log:
[JBJCA-176] Testcase for Annotations Process
Modified: projects/jboss-jca/trunk/build.xml
===================================================================
--- projects/jboss-jca/trunk/build.xml 2009-09-21 09:57:02 UTC (rev 93799)
+++ projects/jboss-jca/trunk/build.xml 2009-09-21 10:27:12 UTC (rev 93800)
@@ -240,7 +240,10 @@
Target: one-test
================================= -->
<target name="one-test" depends="jars">
+ <!-- we should refactor this to make one-test target can be run on the component build.xml
<ant dir="core" inheritRefs="true" target="one-test"/>
+ -->
+ <ant dir="deployers" inheritRefs="true" target="one-test"/>
</target>
<!-- =================================
Modified: projects/jboss-jca/trunk/deployers/build.xml
===================================================================
--- projects/jboss-jca/trunk/deployers/build.xml 2009-09-21 09:57:02 UTC (rev 93799)
+++ projects/jboss-jca/trunk/deployers/build.xml 2009-09-21 10:27:12 UTC (rev 93800)
@@ -272,6 +272,14 @@
</jar>
<delete file="${build.deployers.dir}/ra16inoutjar.jar"/>
+ <jar destfile="${build.deployers.dir}/rafail2connector.rar"
+ manifest="src/main/resources/rar-manifest.mf">
+ <fileset dir="${build.deployers.dir}/test"
+ includes="org/jboss/jca/test/deployers/spec/rars/*.class"/>
+ <fileset dir="${build.deployers.dir}/test"
+ includes="org/jboss/jca/test/deployers/spec/rars/rafail2connector/*.class"/>
+ <fileset dir="src/test/resources/rafail2connector.rar"/>
+ </jar>
</target>
<!-- =================================
Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java 2009-09-21 09:57:02 UTC (rev 93799)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java 2009-09-21 10:27:12 UTC (rev 93800)
@@ -97,6 +97,8 @@
public static ConnectorMetaData process(ConnectorMetaData md, AnnotationRepository annotationRepository)
throws Exception
{
+ if (annotationRepository == null)
+ throw new DeployException("AnnotationRepository reference is null");
/* Process
-------
javax.resource.spi.Activation
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java 2009-09-21 10:27:12 UTC (rev 93800)
@@ -0,0 +1,186 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.test.deployers.annotations;
+
+import org.jboss.jca.deployers.fungal.Annotations;
+import org.jboss.jca.embedded.EmbeddedJCA;
+import org.jboss.jca.fungal.deployers.DeployException;
+
+import java.io.File;
+import java.net.URL;
+
+import org.jboss.logging.Logger;
+import org.jboss.metadata.rar.spec.ConnectorMetaData;
+import org.jboss.papaki.AnnotationRepository;
+import org.jboss.papaki.AnnotationScanner;
+import org.jboss.papaki.AnnotationScannerFactory;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ * Test cases for the annotations handling
+ *
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+public class AnnotationsTestCase
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger LOG = Logger.getLogger(AnnotationsTestCase.class);
+
+ /*
+ * Embedded
+ */
+ private static EmbeddedJCA embedded;
+
+ // --------------------------------------------------------------------------------||
+ // Tests --------------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Process: Null arguemnts
+ * @throws Throwable throwable exception
+ */
+ @Test(expected = DeployException.class)
+ public void testProcessNullArguments() throws Throwable
+ {
+ Annotations.process(null, null);
+ }
+
+ /**
+ * Process: Null arguemnt for annotation repository
+ * @throws Throwable throwable exception
+ */
+ @Test(expected = DeployException.class)
+ public void testProcessNullAnnotationRepository() throws Throwable
+ {
+ ConnectorMetaData cmd = new ConnectorMetaData();
+ Annotations.process(cmd, null);
+ }
+
+ /**
+ * Process: Null arguemnt for connector metadata
+ * @throws Throwable throwable exception
+ */
+ @Test
+ public void testProcessNullConnectorMetaData() throws Throwable
+ {
+ try
+ {
+ URL url = getURL("ra16inout.rar");
+ AnnotationScanner asf = AnnotationScannerFactory.getDefault();
+ AnnotationRepository ar = asf.scan(new URL[] {url});
+
+ Annotations.process(null, ar);
+ }
+ catch (Throwable t)
+ {
+ fail(t.getMessage());
+ }
+ }
+
+ /**
+ * Process: Connector -- verification of the processConnector method
+ * @throws Throwable throwable exception
+ */
+ @Test
+ public void testProcessConnector() throws Throwable
+ {
+ try
+ {
+ URL url = getURL("ra16inoutnora.rar");
+ AnnotationScanner asf = AnnotationScannerFactory.getDefault();
+ AnnotationRepository ar = asf.scan(new URL[] {url});
+
+ Annotations.process(null, ar);
+ }
+ catch (Throwable t)
+ {
+ fail(t.getMessage());
+ }
+ }
+
+ /**
+ * Process: Connector -- verification of the processConnector method
+ * @throws Throwable throwable exception
+ */
+ @Test
+ public void testProcessConnectorFail() throws Throwable
+ {
+ try
+ {
+ URL url = getURL("rafail2connector.rar");
+ AnnotationScanner asf = AnnotationScannerFactory.getDefault();
+ AnnotationRepository ar = asf.scan(new URL[] {url});
+
+ Annotations.process(null, ar);
+
+ fail("Success");
+ }
+ catch (Throwable t)
+ {
+ // Ok
+ }
+ }
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Lifecycle start, before the suite is executed
+ * @throws Throwable throwable exception
+ */
+ @BeforeClass
+ public static void beforeClass() throws Throwable
+ {
+ }
+
+ /**
+ * Lifecycle stop, after the suite is executed
+ * @throws Throwable throwable exception
+ */
+ @AfterClass
+ public static void afterClass() throws Throwable
+ {
+ }
+
+ /**
+ * Get the URL for a test archive
+ * @param archive The name of the test archive
+ * @return The URL to the archive
+ * @throws Throwable throwable exception
+ */
+ public URL getURL(String archive) throws Throwable
+ {
+ File f = new File(System.getProperty("archives.dir") + File.separator + archive);
+ return f.toURI().toURL();
+ }
+}
Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/package.html
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/package.html (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/package.html 2009-09-21 10:27:12 UTC (rev 93800)
@@ -0,0 +1,3 @@
+<body>
+Test cases for the deployers.
+</body>
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/Test2ResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/Test2ResourceAdapter.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/Test2ResourceAdapter.java 2009-09-21 10:27:12 UTC (rev 93800)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.test.deployers.spec.rars.rafail2connector;
+
+import org.jboss.jca.test.deployers.spec.rars.BaseResourceAdapter;
+
+import javax.resource.spi.AdministeredObject;
+import javax.resource.spi.AuthenticationMechanism;
+import javax.resource.spi.AuthenticationMechanism.CredentialInterface;
+import javax.resource.spi.ConfigProperty;
+import javax.resource.spi.Connector;
+import javax.resource.spi.SecurityPermission;
+import javax.resource.spi.TransactionSupport;
+
+/**
+ * TestResourceAdapter
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+ at Connector(
+ description = { "Test RA" },
+ displayName = { "displayName" },
+ smallIcon = { "smallIcon" },
+ largeIcon = { "largeIcon" },
+ vendorName = "Red Hat Middleware LLC",
+ eisType = "Test RA",
+ version = "0.1",
+ licenseDescription = { "licenseDescription" },
+ licenseRequired = true,
+ reauthenticationSupport = true,
+ authMechanisms = { @AuthenticationMechanism(credentialInterface = CredentialInterface.PasswordCredential) },
+ securityPermissions = { @SecurityPermission(permissionSpec = "permissionSpec") },
+ transactionSupport = TransactionSupport.TransactionSupportLevel.LocalTransaction)
+ //TODO API has not been updated requiredWorkContexts = null
+ at AdministeredObject(
+ adminObjectInterfaces = TestAdminObjectInterface.class)
+public class Test2ResourceAdapter extends BaseResourceAdapter
+{
+ @ConfigProperty(type = String.class, defaultValue = "JCA")
+ private String myStringProperty;
+
+ /**
+ * @param myStringProperty the myStringProperty to set
+ */
+ public void setMyStringProperty(String myStringProperty)
+ {
+ this.myStringProperty = myStringProperty;
+ }
+
+ /**
+ * @return the myStringProperty
+ */
+ public String getMyStringProperty()
+ {
+ return myStringProperty;
+ }
+}
Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/Test2ResourceAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestActivationSpec.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestActivationSpec.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestActivationSpec.java 2009-09-21 10:27:12 UTC (rev 93800)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.test.deployers.spec.rars.rafail2connector;
+
+import org.jboss.jca.test.deployers.spec.rars.BaseActivationSpec;
+
+import javax.resource.spi.Activation;
+
+/**
+ * TestActivationSpec
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+ at Activation()
+public class TestActivationSpec extends BaseActivationSpec
+{
+
+}
Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestActivationSpec.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestAdminObjectInterface.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestAdminObjectInterface.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestAdminObjectInterface.java 2009-09-21 10:27:12 UTC (rev 93800)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.test.deployers.spec.rars.rafail2connector;
+
+/**
+ *
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+public interface TestAdminObjectInterface
+{
+
+}
Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestAdminObjectInterface.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestManagedConnection.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestManagedConnection.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestManagedConnection.java 2009-09-21 10:27:12 UTC (rev 93800)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.test.deployers.spec.rars.rafail2connector;
+
+import org.jboss.jca.test.deployers.spec.rars.BaseManagedConnection;
+
+/**
+ * TestManagedConnection
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+public class TestManagedConnection extends BaseManagedConnection
+{
+
+}
Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestManagedConnection.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestManagedConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestManagedConnectionFactory.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestManagedConnectionFactory.java 2009-09-21 10:27:12 UTC (rev 93800)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.test.deployers.spec.rars.rafail2connector;
+
+import org.jboss.jca.test.deployers.spec.rars.BaseManagedConnectionFactory;
+import org.jboss.jca.test.deployers.spec.rars.TestConnection;
+import org.jboss.jca.test.deployers.spec.rars.TestConnectionInterface;
+
+import javax.resource.spi.ConfigProperty;
+import javax.resource.spi.ConnectionDefinition;
+import javax.resource.spi.ManagedConnection;
+
+/**
+ * TestManagedConnectionFactory
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+ at ConnectionDefinition(connectionFactory = ManagedConnection.class,
+ connectionFactoryImpl = TestManagedConnection.class,
+ connection = TestConnectionInterface.class,
+ connectionImpl = TestConnection.class)
+public class TestManagedConnectionFactory extends BaseManagedConnectionFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ @ConfigProperty(type = String.class, defaultValue = "JCA")
+ private String myStringProperty;
+
+ /**
+ * @param myStringProperty the myStringProperty to set
+ */
+ public void setMyStringProperty(String myStringProperty)
+ {
+ this.myStringProperty = myStringProperty;
+ }
+
+ /**
+ * @return the myStringProperty
+ */
+ public String getMyStringProperty()
+ {
+ return myStringProperty;
+ }
+}
Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestManagedConnectionFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestResourceAdapter.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestResourceAdapter.java 2009-09-21 10:27:12 UTC (rev 93800)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.test.deployers.spec.rars.rafail2connector;
+
+import org.jboss.jca.test.deployers.spec.rars.BaseResourceAdapter;
+
+import javax.resource.spi.AdministeredObject;
+import javax.resource.spi.AuthenticationMechanism;
+import javax.resource.spi.AuthenticationMechanism.CredentialInterface;
+import javax.resource.spi.ConfigProperty;
+import javax.resource.spi.Connector;
+import javax.resource.spi.SecurityPermission;
+import javax.resource.spi.TransactionSupport;
+
+/**
+ * TestResourceAdapter
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+ at Connector(
+ description = { "Test RA" },
+ displayName = { "displayName" },
+ smallIcon = { "smallIcon" },
+ largeIcon = { "largeIcon" },
+ vendorName = "Red Hat Middleware LLC",
+ eisType = "Test RA",
+ version = "0.1",
+ licenseDescription = { "licenseDescription" },
+ licenseRequired = true,
+ reauthenticationSupport = true,
+ authMechanisms = { @AuthenticationMechanism(credentialInterface = CredentialInterface.PasswordCredential) },
+ securityPermissions = { @SecurityPermission(permissionSpec = "permissionSpec") },
+ transactionSupport = TransactionSupport.TransactionSupportLevel.LocalTransaction)
+ //TODO API has not been updated requiredWorkContexts = null
+ at AdministeredObject(
+ adminObjectInterfaces = TestAdminObjectInterface.class)
+public class TestResourceAdapter extends BaseResourceAdapter
+{
+ @ConfigProperty(type = String.class, defaultValue = "JCA")
+ private String myStringProperty;
+
+ /**
+ * @param myStringProperty the myStringProperty to set
+ */
+ public void setMyStringProperty(String myStringProperty)
+ {
+ this.myStringProperty = myStringProperty;
+ }
+
+ /**
+ * @return the myStringProperty
+ */
+ public String getMyStringProperty()
+ {
+ return myStringProperty;
+ }
+}
Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/TestResourceAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/package.html
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/package.html (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/rafail2connector/package.html 2009-09-21 10:27:12 UTC (rev 93800)
@@ -0,0 +1,3 @@
+<body>
+Test cases about deployers.
+</body>
More information about the jboss-cvs-commits
mailing list