[jboss-cvs] JBossAS SVN: r92739 - in projects/jboss-jca/trunk: deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Aug 24 08:04:24 EDT 2009
Author: jeff.zhang
Date: 2009-08-24 08:04:24 -0400 (Mon, 24 Aug 2009)
New Revision: 92739
Added:
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/
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/TestAdminObjectInterface.java
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestManagedConnection.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
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/package.html
projects/jboss-jca/trunk/deployers/src/test/resources/ra16inoutanno.rar/
projects/jboss-jca/trunk/deployers/src/test/resources/ra16inoutanno.rar/META-INF/
projects/jboss-jca/trunk/deployers/src/test/resources/ra16inoutanno.rar/META-INF/ra.xml
Modified:
projects/jboss-jca/trunk/deployers/build.xml
projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/deployers/ra/Annotations.java
projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/deployers/ra/RADeployer.java
Log:
[JBJCA-145] Create metadata model from annotations
Modified: projects/jboss-jca/trunk/deployers/build.xml
===================================================================
--- projects/jboss-jca/trunk/deployers/build.xml 2009-08-24 11:39:26 UTC (rev 92738)
+++ projects/jboss-jca/trunk/deployers/build.xml 2009-08-24 12:04:24 UTC (rev 92739)
@@ -237,6 +237,14 @@
includes="org/jboss/jca/test/deployers/spec/rars/ra16user303jbossra/*.class"/>
<fileset dir="src/test/resources/ra16user303jbossra.rar"/>
</jar>
+ <jar destfile="${build.deployers.dir}/ra16inoutanno.rar"
+ manifest="src/main/resources/rar-manifest.mf">
+ <fileset dir="${build.deployers.dir}/test"
+ includes="org/jboss/jca/test/deployers/spec/rars/*.class"/>
+ <fileset dir="${build.deployers.dir}/test"
+ includes="org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/*.class"/>
+ <fileset dir="src/test/resources/ra16inoutanno.rar"/>
+ </jar>
</target>
<!-- =================================
Added: 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 (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestActivationSpec.java 2009-08-24 12:04:24 UTC (rev 92739)
@@ -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.ra16inoutanno;
+
+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/ra16inoutanno/TestActivationSpec.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: 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 (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestAdminObjectInterface.java 2009-08-24 12:04:24 UTC (rev 92739)
@@ -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.ra16inoutanno;
+
+/**
+ *
+ * @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/ra16inoutanno/TestAdminObjectInterface.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestManagedConnection.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestManagedConnection.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestManagedConnection.java 2009-08-24 12:04:24 UTC (rev 92739)
@@ -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.ra16inoutanno;
+
+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/ra16inoutanno/TestManagedConnection.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: 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 (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestManagedConnectionFactory.java 2009-08-24 12:04:24 UTC (rev 92739)
@@ -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.deployers.spec.rars.ra16inoutanno;
+
+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 org.jboss.jca.test.deployers.spec.rars.ra16out.TestManagedConnection;
+
+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;
+}
Property changes on: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestManagedConnectionFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: 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 (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/TestResourceAdapter.java 2009-08-24 12:04:24 UTC (rev 92739)
@@ -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.ra16inoutanno;
+
+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/ra16inoutanno/TestResourceAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/package.html
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/package.html (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/ra16inoutanno/package.html 2009-08-24 12:04:24 UTC (rev 92739)
@@ -0,0 +1,3 @@
+<body>
+Test cases about deployers.
+</body>
Added: projects/jboss-jca/trunk/deployers/src/test/resources/ra16inoutanno.rar/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/resources/ra16inoutanno.rar/META-INF/ra.xml (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/resources/ra16inoutanno.rar/META-INF/ra.xml 2009-08-24 12:04:24 UTC (rev 92739)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/j2ee/connector_1_6.xsd"
+ version="1.6" metadata-complete="false">
+
+ <vendor-name>Red Hat Middleware LLC</vendor-name>
+ <eis-type>Test RA</eis-type>
+ <resourceadapter-version>0.1</resourceadapter-version>
+
+ <resourceadapter>
+ <resourceadapter-class>org.jboss.jca.test.deployers.spec.rars.ra16inoutanno.TestResourceAdapter</resourceadapter-class>
+
+ <config-property>
+ <config-property-name>myStringProperty</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>JEFF</config-property-value>
+ </config-property>
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.jboss.jca.test.deployers.spec.rars.ra16inoutanno.TestManagedConnectionFactory</managedconnectionfactory-class>
+
+ <connectionfactory-interface>javax.resource.spi.ManagedConnection</connectionfactory-interface>
+ <connectionfactory-impl-class>org.jboss.jca.test.deployers.spec.rars.ra16inoutanno.TestManagedConnection</connectionfactory-impl-class>
+ <connection-interface>org.jboss.jca.test.deployers.spec.rars.TestConnectionInterface</connection-interface>
+ <connection-impl-class>org.jboss.jca.test.deployers.spec.rars.TestConnection</connection-impl-class>
+ </connection-definition>
+ <!-- overwrite -->
+ <transaction-support>LocalTransaction</transaction-support>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
+ <inbound-resourceadapter>
+ <messageadapter>
+ <messagelistener>
+ <messagelistener-type>org.jboss.jca.test.deployers.spec.rars.MessageListener</messagelistener-type>
+ <activationspec>
+ <activationspec-class>org.jboss.jca.test.deployers.spec.rars.ra16inoutanno.TestActivationSpec</activationspec-class>
+ </activationspec>
+ </messagelistener>
+ </messageadapter>
+ </inbound-resourceadapter>
+ </resourceadapter>
+</connector>
\ No newline at end of file
Property changes on: projects/jboss-jca/trunk/deployers/src/test/resources/ra16inoutanno.rar/META-INF/ra.xml
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Modified: projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/deployers/ra/Annotations.java
===================================================================
--- projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/deployers/ra/Annotations.java 2009-08-24 11:39:26 UTC (rev 92738)
+++ projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/deployers/ra/Annotations.java 2009-08-24 12:04:24 UTC (rev 92739)
@@ -25,6 +25,7 @@
import org.jboss.jca.sjc.annotationscanner.Annotation;
import org.jboss.jca.sjc.deployers.DeployException;
+import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -32,23 +33,30 @@
import javax.resource.spi.Activation;
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.ConnectionDefinition;
import javax.resource.spi.ConnectionDefinitions;
import javax.resource.spi.Connector;
import javax.resource.spi.SecurityPermission;
import javax.resource.spi.TransactionSupport;
+import javax.resource.spi.TransactionSupport.TransactionSupportLevel;
import javax.resource.spi.work.WorkContext;
import org.jboss.logging.Logger;
+import org.jboss.metadata.rar.spec.AdminObjectMetaData;
+import org.jboss.metadata.rar.spec.AuthenticationMechanismMetaData;
import org.jboss.metadata.rar.spec.ConnectorMetaData;
+import org.jboss.metadata.rar.spec.InboundRaMetaData;
import org.jboss.metadata.rar.spec.JCA16DTDMetaData;
import org.jboss.metadata.rar.spec.JCA16DefaultNSMetaData;
import org.jboss.metadata.rar.spec.JCA16MetaData;
import org.jboss.metadata.rar.spec.LicenseMetaData;
+import org.jboss.metadata.rar.spec.OutboundRaMetaData;
import org.jboss.metadata.rar.spec.ResourceAdapterMetaData;
import org.jboss.metadata.rar.spec.SecurityPermissionMetaData;
+import org.jboss.metadata.rar.spec.TransactionSupportMetaData;
/**
* The annotation processor for JCA 1.6
@@ -87,7 +95,7 @@
javax.resource.spi.Connector
javax.resource.spi.SecurityPermission
*/
-
+
if (md == null)
{
JCA16MetaData jmd = new JCA16MetaData();
@@ -116,6 +124,8 @@
// @Activation
md = processActivation(md, annotations);
+ //log.debug("ConnectorMetadata " + md);
+
return md;
}
@@ -216,7 +226,7 @@
// Reauthentication support
boolean reauthenticationSupport = c.reauthenticationSupport();
- // TODO
+ md.getRa().getOutboundRa().setReAuthSupport(reauthenticationSupport);
// RequiredWorkContext
Class<? extends WorkContext>[] requiredWorkContexts = c.requiredWorkContexts();
@@ -281,7 +291,9 @@
for (SecurityPermission securityPermission : securityPermissions)
{
- // TODO
+ SecurityPermissionMetaData spmd = new SecurityPermissionMetaData();
+ spmd.setSecurityPermissionSpec(securityPermission.permissionSpec());
+ md.getRa().getSecurityPermissions().add(spmd);
}
}
@@ -298,8 +310,18 @@
// Transaction support
TransactionSupport.TransactionSupportLevel transactionSupport = c.transactionSupport();
- // TODO
-
+ if (transactionSupport.equals(TransactionSupportLevel.NoTransaction))
+ {
+ md.getRa().getOutboundRa().setTransSupport(TransactionSupportMetaData.NoTransaction);
+ }
+ else if (transactionSupport.equals(TransactionSupportLevel.XATransaction))
+ {
+ md.getRa().getOutboundRa().setTransSupport(TransactionSupportMetaData.XATransaction);
+ }
+ else if (transactionSupport.equals(TransactionSupportLevel.LocalTransaction))
+ {
+ md.getRa().getOutboundRa().setTransSupport(TransactionSupportMetaData.LocalTransaction);
+ }
// Vendor name
String vendorName = c.vendorName();
if (vendorName != null)
@@ -487,6 +509,37 @@
AuthenticationMechanism authenticationmechanism)
throws Exception
{
+ if (md.getRa() == null)
+ {
+ md.setRa(new ResourceAdapterMetaData());
+ }
+ if (md.getRa().getOutboundRa() == null)
+ {
+ md.getRa().setOutboundRa(new OutboundRaMetaData());
+ }
+ if (md.getRa().getOutboundRa().getAuthMechanisms() == null)
+ {
+ md.getRa().getOutboundRa().setAuthMechanisms(new ArrayList<AuthenticationMechanismMetaData>());
+ }
+ AuthenticationMechanismMetaData ammd = new AuthenticationMechanismMetaData();
+ ammd.setAuthenticationMechanismType(authenticationmechanism.authMechanism());
+
+ String credentialInterfaceClass = null;
+ if (authenticationmechanism.credentialInterface().equals(CredentialInterface.GenericCredential))
+ {
+ credentialInterfaceClass = "javax.resource.spi.security.GenericCredential";
+ }
+ else if (authenticationmechanism.credentialInterface().equals(CredentialInterface.GSSCredential))
+ {
+ credentialInterfaceClass = "org.ietf.jgss.GSSCredential";
+ }
+ else if (authenticationmechanism.credentialInterface().equals(CredentialInterface.PasswordCredential))
+ {
+ credentialInterfaceClass = "javax.resource.spi.security.PasswordCredential";
+ }
+ ammd.setCredentialInterfaceClass(credentialInterfaceClass);
+ md.getRa().getOutboundRa().getAuthMechanisms().add(ammd);
+
return md;
}
@@ -528,6 +581,22 @@
private static ConnectorMetaData attachAdministeredObject(ConnectorMetaData md, AdministeredObject a)
throws Exception
{
+ if (md.getRa() == null)
+ {
+ md.setRa(new ResourceAdapterMetaData());
+ }
+ if (md.getRa().getAdminObjects() == null)
+ {
+ md.getRa().setAdminObjects(new ArrayList<AdminObjectMetaData>());
+ }
+ String aoName = null;
+ if (a.adminObjectInterfaces().length > 0)
+ {
+ aoName = ((Class)Array.get(a.adminObjectInterfaces(), 0)).getName();
+ }
+ AdminObjectMetaData aomd = new AdminObjectMetaData();
+ aomd.setAdminObjectInterfaceClass(aoName);
+ md.getRa().getAdminObjects().add(aomd);
return md;
}
@@ -569,6 +638,15 @@
private static ConnectorMetaData attachActivation(ConnectorMetaData md, Activation activation)
throws Exception
{
+ if (md.getRa() == null)
+ {
+ md.setRa(new ResourceAdapterMetaData());
+ }
+ if (md.getRa().getInboundRa() == null)
+ {
+ md.getRa().setInboundRa(new InboundRaMetaData());
+ }
+ //TODO
return md;
}
}
Modified: projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/deployers/ra/RADeployer.java
===================================================================
--- projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/deployers/ra/RADeployer.java 2009-08-24 11:39:26 UTC (rev 92738)
+++ projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/deployers/ra/RADeployer.java 2009-08-24 12:04:24 UTC (rev 92739)
@@ -42,6 +42,7 @@
import java.util.Map;
import org.jboss.logging.Logger;
+
import org.jboss.metadata.rar.jboss.BvGroupMetaData;
import org.jboss.metadata.rar.jboss.JBossRA20Base;
import org.jboss.metadata.rar.jboss.JBossRAMetaData;
More information about the jboss-cvs-commits
mailing list