[jboss-cvs] JBossAS SVN: r95009 - in projects/jboss-jca/trunk/deployers/src: test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 16 03:42:56 EDT 2009
Author: jeff.zhang
Date: 2009-10-16 03:42:55 -0400 (Fri, 16 Oct 2009)
New Revision: 95009
Added:
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestAdminObject.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestWorkContext.java
Removed:
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestAdminObjectInterface.java
Modified:
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestActivationSpec.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestManagedConnectionFactory.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestResourceAdapter.java
Log:
[JBJCA-176] Testcase for Annotations Process
Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java 2009-10-16 07:34:13 UTC (rev 95008)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/Annotations.java 2009-10-16 07:42:55 UTC (rev 95009)
@@ -131,7 +131,7 @@
md = processActivation(md, annotationRepository);
// @AuthenticationMechanism
- md = processAuthenticationMechanism(md, annotationRepository);
+ //md = processAuthenticationMechanism(md, annotationRepository);
// @AdministeredObject
md = processAdministeredObject(md, annotationRepository);
@@ -762,6 +762,7 @@
* @return The updated metadata
* @exception Exception Thrown if an error occurs
*/
+ /*
private static ConnectorMetaData processAuthenticationMechanism(ConnectorMetaData md,
AnnotationRepository annotationRepository)
throws Exception
@@ -782,6 +783,7 @@
return md;
}
+ */
/**
* Attach @AuthenticationMechanism
@@ -959,10 +961,10 @@
for (Class asClass : activation.messageListeners())
{
ActivationspecMetaData asMeta = new ActivationspecMetaData();
- asMeta.setAsClass(asClass.getName());
+ asMeta.setAsClass(annotation.getClassName());
MessageListenerMetaData mlMeta = new MessageListenerMetaData();
mlMeta.setActivationSpecType(asMeta);
- mlMeta.setType(annotation.getClassName());
+ mlMeta.setType(asClass.getName());
md.getRa().getInboundRa().getMessageAdapter().getMessageListeners().add(mlMeta);
}
return md;
Modified: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestActivationSpec.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestActivationSpec.java 2009-10-16 07:34:13 UTC (rev 95008)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestActivationSpec.java 2009-10-16 07:42:55 UTC (rev 95009)
@@ -22,16 +22,35 @@
package org.jboss.jca.test.deployers.spec.rars.ra16inoutanno;
import org.jboss.jca.test.deployers.spec.rars.BaseActivationSpec;
+import org.jboss.jca.test.deployers.spec.rars.MessageListener;
import javax.resource.spi.Activation;
+import javax.resource.spi.ConfigProperty;
/**
* TestActivationSpec
* @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
* @version $Revision: $
*/
- at Activation(messageListeners = { })
+ at Activation(messageListeners = { MessageListener.class })
public class TestActivationSpec extends BaseActivationSpec
{
+ @ConfigProperty(type = String.class, defaultValue = "InAS")
+ private String myStringProperty;
+ /**
+ * @param myStringProperty the myStringProperty to set
+ */
+ public void setMyStringProperty(String myStringProperty)
+ {
+ this.myStringProperty = myStringProperty;
+ }
+
+ /**
+ * @return the myStringProperty
+ */
+ public String getMyStringProperty()
+ {
+ return myStringProperty;
+ }
}
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestAdminObject.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestAdminObject.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestAdminObject.java 2009-10-16 07:42:55 UTC (rev 95009)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.test.deployers.spec.rars.ra16inoutanno;
+
+import javax.resource.spi.ConfigProperty;
+
+/**
+ *
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+public class TestAdminObject
+{
+ @ConfigProperty(type = String.class, defaultValue = "InAO")
+ private String myStringProperty;
+
+ /**
+ * @param myStringProperty the myStringProperty to set
+ */
+ public void setMyStringProperty(String myStringProperty)
+ {
+ this.myStringProperty = myStringProperty;
+ }
+
+ /**
+ * @return the myStringProperty
+ */
+ public String getMyStringProperty()
+ {
+ return myStringProperty;
+ }
+}
Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestAdminObject.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Deleted: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestAdminObjectInterface.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestAdminObjectInterface.java 2009-10-16 07:34:13 UTC (rev 95008)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestAdminObjectInterface.java 2009-10-16 07:42:55 UTC (rev 95009)
@@ -1,32 +0,0 @@
-/*
- * 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.ra16inoutanno;
-
-/**
- *
- * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
- * @version $Revision: $
- */
-public interface TestAdminObjectInterface
-{
-
-}
Modified: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestManagedConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestManagedConnectionFactory.java 2009-10-16 07:34:13 UTC (rev 95008)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestManagedConnectionFactory.java 2009-10-16 07:42:55 UTC (rev 95009)
@@ -27,6 +27,7 @@
import javax.resource.spi.ConfigProperty;
import javax.resource.spi.ConnectionDefinition;
+import javax.resource.spi.ConnectionDefinitions;
import javax.resource.spi.ManagedConnection;
/**
@@ -34,10 +35,11 @@
* @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
* @version $Revision: $
*/
+ at ConnectionDefinitions(
@ConnectionDefinition(connectionFactory = ManagedConnection.class,
connectionFactoryImpl = TestManagedConnection.class,
connection = TestConnectionInterface.class,
- connectionImpl = TestConnection.class)
+ connectionImpl = TestConnection.class))
public class TestManagedConnectionFactory extends BaseManagedConnectionFactory
{
private static final long serialVersionUID = 1L;
Modified: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestResourceAdapter.java 2009-10-16 07:34:13 UTC (rev 95008)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestResourceAdapter.java 2009-10-16 07:42:55 UTC (rev 95009)
@@ -49,10 +49,11 @@
reauthenticationSupport = true,
authMechanisms = { @AuthenticationMechanism(credentialInterface = CredentialInterface.PasswordCredential) },
securityPermissions = { @SecurityPermission(permissionSpec = "permissionSpec") },
- transactionSupport = TransactionSupport.TransactionSupportLevel.LocalTransaction)
+ transactionSupport = TransactionSupport.TransactionSupportLevel.LocalTransaction,
+ requiredWorkContexts = { TestWorkContext.class })
//TODO API has not been updated requiredWorkContexts = null
@AdministeredObject(
- adminObjectInterfaces = TestAdminObjectInterface.class)
+ adminObjectInterfaces = TestAdminObject.class)
public class TestResourceAdapter extends BaseResourceAdapter
{
@ConfigProperty(type = String.class, defaultValue = "JCA")
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestWorkContext.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestWorkContext.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestWorkContext.java 2009-10-16 07:42:55 UTC (rev 95009)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.test.deployers.spec.rars.ra16inoutanno;
+
+import javax.resource.spi.work.WorkContext;
+
+/**
+ *
+ * @author <a href="mailto:jeff.zhang at jboss.org">Jeff Zhang</a>
+ * @version $Revision: $
+ */
+public class TestWorkContext implements WorkContext
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * getDescription
+ *
+ * @see javax.resource.spi.work.WorkContext#getDescription()
+ * @return description
+ */
+ public String getDescription()
+ {
+ return "TestDescription";
+ }
+
+ /**
+ * getName
+ * @see javax.resource.spi.work.WorkContext#getName()
+ * @return name
+ */
+ public String getName()
+ {
+ return "TestName";
+ }
+
+}
Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestWorkContext.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
More information about the jboss-cvs-commits
mailing list