You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by dj...@apache.org on 2010/03/21 23:12:12 UTC
svn commit: r925916 - in /openejb/trunk/openejb3/container/openejb-jee/src:
main/java/org/apache/openejb/jee/ test/java/org/apache/openejb/jee/
test/resources/
Author: djencks
Date: Sun Mar 21 22:12:11 2010
New Revision: 925916
URL: http://svn.apache.org/viewvc?rev=925916&view=rev
Log:
OPENEJB-1242 Add initial support for connector 1.0 ra.xml. Needs discussion but seems to work
Added:
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java (with props)
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector10.java (with props)
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConnectorBase.java (contents, props changed)
- copied, changed from r924973, openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java (with props)
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter10.java (with props)
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapterBase.java (contents, props changed)
- copied, changed from r924876, openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java
openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.0-example.xml
- copied, changed from r924973, openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.5-example.xml
Modified:
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ObjectFactory.java
openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/JeeTest.java
Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java?rev=925916&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java Sun Mar 21 22:12:11 2010
@@ -0,0 +1,82 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.jee;
+
+import javax.xml.bind.annotation.*;
+
+/**
+ * The connectorType defines a resource adapter.
+ */
+@XmlRootElement(name = "connector")
+@XmlAccessorType(XmlAccessType.NONE)
+//@XmlType(name = "connectorType", propOrder = {
+// "moduleName",
+// "descriptions",
+// "displayNames",
+// "icon",
+// "vendorName",
+// "eisType",
+// "resourceAdapterVersion",
+// "license",
+// "resourceAdapter",
+// "requiredWorkContext"
+//})
+public class Connector extends ConnectorBase {
+
+ public Connector() {
+ }
+
+ public Connector(String id) {
+ super(id);
+ }
+
+ @XmlElement(name = "resourceadapter-version")
+ public String getResourceAdapterVersion() {
+ return resourceAdapterVersion;
+ }
+
+ public void setResourceAdapterVersion(String value) {
+ this.resourceAdapterVersion = value;
+ }
+
+ @XmlElement(name = "resourceadapter", required = true)
+ public ResourceAdapter getResourceAdapter() {
+ if (resourceAdapter == null) {
+ resourceAdapter = new ResourceAdapter();
+ }
+ return (ResourceAdapter) resourceAdapter;
+ }
+
+ public ResourceAdapter setResourceAdapter(ResourceAdapter resourceAdapter16) {
+ this.resourceAdapter = resourceAdapter16;
+ return (ResourceAdapter) this.resourceAdapter;
+ }
+
+ @XmlAttribute(required = true)
+ public String getVersion() {
+ if (version == null) {
+ return "1.6";
+ } else {
+ return version;
+ }
+ }
+
+ public void setVersion(String value) {
+ this.version = value;
+ }
+
+}
\ No newline at end of file
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector10.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector10.java?rev=925916&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector10.java (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector10.java Sun Mar 21 22:12:11 2010
@@ -0,0 +1,77 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.jee;
+
+import javax.xml.bind.annotation.*;
+
+/**
+ * The connectorType defines a resource adapter.
+ */
+@XmlRootElement(name = "connector")
+@XmlAccessorType(XmlAccessType.PROPERTY)
+//@XmlType(name = "connectorType", propOrder = {
+// "displayNames",
+// "descriptions",
+// "icon",
+// "vendorName",
+// "version",
+// "eisType",
+// "version",
+// "license",
+// "resourceAdapter"
+//})
+public class Connector10 extends ConnectorBase {
+
+ public Connector10() {
+ }
+
+ @XmlElement(name = "version")
+ public String getResourceAdapterVersion() {
+ return resourceAdapterVersion;
+ }
+
+ public void setResourceAdapterVersion(String value) {
+ this.resourceAdapterVersion = value;
+ }
+
+ @XmlElement(name = "resourceadapter", required = true)
+ public ResourceAdapter10 getResourceAdapter() {
+ if (resourceAdapter == null){
+ resourceAdapter = new ResourceAdapter10();
+ }
+ return (ResourceAdapter10) resourceAdapter;
+ }
+
+ public ResourceAdapter10 setResourceAdapter(ResourceAdapter10 value) {
+ this.resourceAdapter = value;
+ return (ResourceAdapter10) resourceAdapter;
+ }
+
+ @XmlElement(name="spec-version")
+ public String getVersion() {
+ if (version == null) {
+ return "1.0";
+ } else {
+ return version;
+ }
+ }
+
+ public void setVersion(String value) {
+ this.version = value;
+ }
+
+}
\ No newline at end of file
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector10.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector10.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector10.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConnectorBase.java (from r924973, openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java)
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConnectorBase.java?p2=openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConnectorBase.java&p1=openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java&r1=924973&r2=925916&rev=925916&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Connector.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConnectorBase.java Sun Mar 21 22:12:11 2010
@@ -21,9 +21,7 @@ import javax.xml.bind.annotation.XmlAcce
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.ArrayList;
@@ -34,21 +32,8 @@ import java.util.Map;
/**
* The connectorType defines a resource adapter.
*/
-@XmlRootElement(name = "connector")
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "connectorType", propOrder = {
- "moduleName",
- "descriptions",
- "displayNames",
- "icon",
- "vendorName",
- "eisType",
- "resourceAdapterVersion",
- "license",
- "resourceAdapter",
- "requiredWorkContext"
-})
-public class Connector {
+public class ConnectorBase {
@XmlElement(name = "module-name")
protected String moduleName;
@@ -63,26 +48,26 @@ public class Connector {
protected String vendorName = "";
@XmlElement(name = "eis-type")
protected String eisType = "";
- @XmlElement(name = "resourceadapter-version")
+ @XmlTransient
protected String resourceAdapterVersion = "";
protected License license;
- @XmlElement(name = "resourceadapter", required = true)
- protected ResourceAdapter resourceAdapter;
+ @XmlTransient
+ protected ResourceAdapterBase resourceAdapter;
@XmlElement(name = "required-work-context")
protected List<String> requiredWorkContext;
@XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
protected String id;
- @XmlAttribute(required = true)
+ @XmlTransient
protected String version;
@XmlAttribute(name = "metadata-complete")
protected Boolean metadataComplete;
- public Connector() {
+ public ConnectorBase() {
}
- public Connector(String id) {
+ public ConnectorBase(String id) {
this.id = id;
}
@@ -170,16 +155,12 @@ public class Connector {
this.license = value;
}
- public ResourceAdapter getResourceAdapter() {
- if (resourceAdapter == null){
- resourceAdapter = new ResourceAdapter();
- }
+ public ResourceAdapterBase getResourceAdapter() {
return resourceAdapter;
}
- public ResourceAdapter setResourceAdapter(ResourceAdapter value) {
- this.resourceAdapter = value;
- return resourceAdapter;
+ public void setResourceAdapter(ResourceAdapterBase resourceAdapter) {
+ this.resourceAdapter = resourceAdapter;
}
public List<String> getRequiredWorkContext() {
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConnectorBase.java
------------------------------------------------------------------------------
svn:keywords = Date Rev Author Id Revision HeadURL
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ObjectFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ObjectFactory.java?rev=925916&r1=925915&r2=925916&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ObjectFactory.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ObjectFactory.java Sun Mar 21 22:12:11 2010
@@ -139,12 +139,12 @@ public class ObjectFactory {
}
/**
- * Create an instance of {@link JAXBElement }{@code <}{@link Connector }{@code >}}
+ * Create an instance of {@link JAXBElement }{@code <}{@link ConnectorBase }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://java.sun.com/xml/ns/j2ee", name = "connector")
- public JAXBElement<Connector> createConnector(Connector value) {
- return new JAXBElement<Connector>(_Connector_QNAME, Connector.class, null, value);
+ public JAXBElement<ConnectorBase> createConnector(ConnectorBase value) {
+ return new JAXBElement<ConnectorBase>(_Connector_QNAME, ConnectorBase.class, null, value);
}
/**
Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java?rev=925916&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java Sun Mar 21 22:12:11 2010
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.jee;
+
+import javax.xml.bind.annotation.*;
+import java.util.List;
+
+/**
+ * The resourceadapterType specifies information about the
+ * resource adapter. The information includes fully qualified
+ * resource adapter Java class name, configuration properties,
+ * information specific to the implementation of the resource
+ * adapter library as specified through the
+ * outbound-resourceadapter and inbound-resourceadapter
+ * elements, and an optional set of administered objects.
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+//@XmlType(name = "resourceadapterType", propOrder = {
+// "resourceAdapterClass",
+// "configProperty",
+// "outboundResourceAdapter",
+// "inboundResourceAdapter",
+// "adminObject",
+// "securityPermission"
+//})
+public class ResourceAdapter extends ResourceAdapterBase {
+
+ public ResourceAdapter() {
+ }
+
+ public ResourceAdapter(Class resourceAdapterClass) {
+ super(resourceAdapterClass);
+ }
+
+ public ResourceAdapter(String resourceAdapterClass) {
+ super(resourceAdapterClass);
+ }
+
+ @XmlElement(name = "config-property")
+ public List<ConfigProperty> getConfigProperty() {
+ return super.getConfigProperty();
+ }
+
+}
\ No newline at end of file
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter10.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter10.java?rev=925916&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter10.java (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter10.java Sun Mar 21 22:12:11 2010
@@ -0,0 +1,142 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.jee;
+
+import javax.xml.bind.annotation.*;
+import java.util.List;
+
+/**
+ * The resourceadapterType specifies information about the
+ * resource adapter. The information includes fully qualified
+ * resource adapter Java class name, configuration properties,
+ * information specific to the implementation of the resource
+ * adapter library as specified through the
+ * outbound-resourceadapter and inbound-resourceadapter
+ * elements, and an optional set of administered objects.
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+//@XmlType(name = "resourceadapterType", propOrder = {
+// "managedConnectionFactoryClass",
+// "connectionFactoryInterface",
+// "connectionFactoryImplClass",
+// "connectionInterface",
+// "connectionImplClass",
+// "transactionSupport",
+// "configProperty",
+// "authenticationMechanism",
+// "reauthenticationSupport",
+// "securityPermission"
+//})
+public class ResourceAdapter10 extends ResourceAdapterBase {
+
+ private ConnectionDefinition connectionDefinition = new ConnectionDefinition();
+
+ public ResourceAdapter10() {
+ setOutboundResourceAdapter(new OutboundResourceAdapter());
+ getOutboundResourceAdapter().getConnectionDefinition().add(connectionDefinition);
+ }
+
+ @XmlElement(name = "config-property")
+ public List<ConfigProperty> getConfigProperty() {
+ return connectionDefinition.getConfigProperty();
+ }
+
+ @XmlElement(name = "managedconnectionfactory-class", required = true)
+ public String getManagedConnectionFactoryClass() {
+ return connectionDefinition.getManagedConnectionFactoryClass();
+ }
+
+ public void setManagedConnectionFactoryClass(String value) {
+ connectionDefinition.setManagedConnectionFactoryClass(value);
+ }
+
+ @XmlElement(name = "connectionfactory-interface", required = true)
+ public String getConnectionFactoryInterface() {
+ return connectionDefinition.getConnectionFactoryInterface();
+ }
+
+ public void setConnectionFactoryInterface(String value) {
+ connectionDefinition.setConnectionFactoryInterface(value);
+ }
+
+ @XmlElement(name = "connectionfactory-impl-class", required = true)
+ public String getConnectionFactoryImplClass() {
+ return connectionDefinition.getConnectionFactoryImplClass();
+ }
+
+ public void setConnectionFactoryImplClass(String value) {
+ connectionDefinition.setConnectionFactoryImplClass(value);
+ }
+
+ @XmlElement(name = "connection-interface", required = true)
+ public String getConnectionInterface() {
+ return connectionDefinition.getConnectionInterface();
+ }
+
+ public void setConnectionInterface(String value) {
+ connectionDefinition.setConnectionInterface(value);
+ }
+
+ @XmlElement(name = "connection-impl-class", required = true)
+ public String getConnectionImplClass() {
+ return connectionDefinition.getConnectionImplClass();
+ }
+
+ public void setConnectionImplClass(String value) {
+ connectionDefinition.setConnectionImplClass(value);
+ }
+
+ @XmlElement(name = "transaction-support")
+ public TransactionSupportType getTransactionSupport() {
+ return getOutboundResourceAdapter().getTransactionSupport();
+ }
+
+ public void setTransactionSupport(TransactionSupportType value) {
+ getOutboundResourceAdapter().setTransactionSupport(value);
+ }
+
+ @XmlElement(name = "authentication-mechanism")
+ public List<AuthenticationMechanism> getAuthenticationMechanism() {
+ return getOutboundResourceAdapter().getAuthenticationMechanism();
+ }
+
+ @XmlElement(name = "reauthentication-support")
+ public Boolean isReauthenticationSupport() {
+ return getOutboundResourceAdapter().isReauthenticationSupport();
+ }
+
+ public void setReauthenticationSupport(Boolean value) {
+ getOutboundResourceAdapter().setReauthenticationSupport(value);
+ }
+
+
+// public List<SecurityPermission> getSecurityPermission() {
+// if (securityPermission == null) {
+// securityPermission = new ArrayList<SecurityPermission>();
+// }
+// return this.securityPermission;
+// }
+
+// public String getId() {
+// return id;
+// }
+//
+// public void setId(String value) {
+// this.id = value;
+// }
+
+}
\ No newline at end of file
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter10.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter10.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter10.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapterBase.java (from r924876, openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java)
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapterBase.java?p2=openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapterBase.java&p1=openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java&r1=924876&r2=925916&rev=925916&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapter.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapterBase.java Sun Mar 21 22:12:11 2010
@@ -16,12 +16,7 @@
*/
package org.apache.openejb.jee;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.ArrayList;
@@ -37,19 +32,12 @@ import java.util.List;
* elements, and an optional set of administered objects.
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "resourceadapterType", propOrder = {
- "resourceAdapterClass",
- "configProperty",
- "outboundResourceAdapter",
- "inboundResourceAdapter",
- "adminObject",
- "securityPermission"
-})
-public class ResourceAdapter {
+//@XmlSeeAlso(ResourceAdapter.class)
+public class ResourceAdapterBase {
@XmlElement(name = "resourceadapter-class")
protected String resourceAdapterClass;
- @XmlElement(name = "config-property")
+ @XmlTransient
protected List<ConfigProperty> configProperty;
@XmlElement(name = "outbound-resourceadapter")
protected OutboundResourceAdapter outboundResourceAdapter;
@@ -64,14 +52,14 @@ public class ResourceAdapter {
@XmlID
protected String id;
- public ResourceAdapter() {
+ public ResourceAdapterBase() {
}
- public ResourceAdapter(String resourceAdapterClass) {
+ public ResourceAdapterBase(String resourceAdapterClass) {
this.resourceAdapterClass = resourceAdapterClass;
}
- public ResourceAdapter(Class resourceAdapterClass) {
+ public ResourceAdapterBase(Class resourceAdapterClass) {
this(resourceAdapterClass.getName());
}
Propchange: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ResourceAdapterBase.java
------------------------------------------------------------------------------
svn:keywords = Date Rev Author Id Revision HeadURL
Modified: openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/JeeTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/JeeTest.java?rev=925916&r1=925915&r2=925916&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/JeeTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/JeeTest.java Sun Mar 21 22:12:11 2010
@@ -133,10 +133,14 @@ public class JeeTest extends TestCase {
marshalAndUnmarshal(TldTaglib.class, "tld-example.xml");
}
+ public void testRar10() throws Exception {
+ marshalAndUnmarshal(Connector10.class, "connector-1.0-example.xml");
+ }
+
public void testRar15() throws Exception {
marshalAndUnmarshal(Connector.class, "connector-1.5-example.xml");
}
-
+
public void testRar16() throws Exception {
marshalAndUnmarshal(Connector.class, "connector-1.6-example.xml");
}
Copied: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.0-example.xml (from r924973, openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.5-example.xml)
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.0-example.xml?p2=openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.0-example.xml&p1=openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.5-example.xml&r1=924973&r2=925916&rev=925916&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.5-example.xml (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.0-example.xml Sun Mar 21 22:12:11 2010
@@ -1,138 +1,72 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- $Rev$ $Date$ -->
-
-<connector xmlns="http://java.sun.com/xml/ns/javaee" version="1.5" id="ID001">
- <description xml:lang="">description0</description>
+<!DOCTYPE connector PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Connector 1.0//EN"
+ "http://java.sun.com/dtd/connector_1_0.dtd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<connector id="ID001">
<display-name xml:lang="en-US">display-name0</display-name>
+ <description xml:lang="">description0</description>
<icon xml:lang="" id="ID007">
<small-icon>small-icon0</small-icon>
<large-icon>large-icon0</large-icon>
</icon>
<vendor-name>vendor-name0</vendor-name>
+ <spec-version>1.0</spec-version>
<eis-type>eis-type0</eis-type>
- <resourceadapter-version>resourceadapter-version0</resourceadapter-version>
+ <version>version0</version>
<license id="ID019">
<description xml:lang="" id="ID021">description1</description>
<license-required>true</license-required>
</license>
<resourceadapter id="ID025">
- <resourceadapter-class>resourceadapter-class0</resourceadapter-class>
- <config-property id="ID029">
- <description xml:lang="" id="ID031">description2</description>
- <config-property-name>config-property-name0</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value>config-property-value0</config-property-value>
- </config-property>
- <outbound-resourceadapter id="ID039">
- <connection-definition id="ID041">
+ <!--<resourceadapter-class>resourceadapter-class0</resourceadapter-class>-->
+ <!--<config-property id="ID029">-->
+ <!--<description xml:lang="" id="ID031">description2</description>-->
+ <!--<config-property-name>config-property-name0</config-property-name>-->
+ <!--<config-property-type>java.lang.Boolean</config-property-type>-->
+ <!--<config-property-value>config-property-value0</config-property-value>-->
+ <!--</config-property>-->
+ <!--<outbound-resourceadapter id="ID039">-->
+ <!--<connection-definition id="ID041">-->
<managedconnectionfactory-class>managedconnectionfactory-class0</managedconnectionfactory-class>
+ <connectionfactory-interface>connectionfactory-interface0</connectionfactory-interface>
+ <connectionfactory-impl-class>connectionfactory-impl-class0</connectionfactory-impl-class>
+ <connection-interface>connection-interface0</connection-interface>
+ <connection-impl-class>connection-impl-class0</connection-impl-class>
+ <transaction-support>NoTransaction</transaction-support>
<config-property id="ID045">
<description xml:lang="en-US" id="ID047">description3</description>
<config-property-name>config-property-name1</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>config-property-value1</config-property-value>
</config-property>
- <connectionfactory-interface>connectionfactory-interface0</connectionfactory-interface>
- <connectionfactory-impl-class>connectionfactory-impl-class0</connectionfactory-impl-class>
- <connection-interface>connection-interface0</connection-interface>
- <connection-impl-class>connection-impl-class0</connection-impl-class>
- </connection-definition>
- <connection-definition id="ID063">
- <managedconnectionfactory-class>managedconnectionfactory-class1</managedconnectionfactory-class>
- <config-property id="ID067">
- <description xml:lang="en-US" id="ID069">description4</description>
- <config-property-name>config-property-name2</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value>config-property-value2</config-property-value>
- </config-property>
- <connectionfactory-interface>connectionfactory-interface1</connectionfactory-interface>
- <connectionfactory-impl-class>connectionfactory-impl-class1</connectionfactory-impl-class>
- <connection-interface>connection-interface1</connection-interface>
- <connection-impl-class>connection-impl-class1</connection-impl-class>
- </connection-definition>
- <connection-definition id="ID085">
- <managedconnectionfactory-class>managedconnectionfactory-class2</managedconnectionfactory-class>
- <config-property id="ID089">
- <description xml:lang="en-US" id="ID091">description5</description>
- <config-property-name>config-property-name3</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value>config-property-value3</config-property-value>
- </config-property>
- <connectionfactory-interface>connectionfactory-interface2</connectionfactory-interface>
- <connectionfactory-impl-class>connectionfactory-impl-class2</connectionfactory-impl-class>
- <connection-interface>connection-interface2</connection-interface>
- <connection-impl-class>connection-impl-class2</connection-impl-class>
- </connection-definition>
- <transaction-support>NoTransaction</transaction-support>
+ <!--</connection-definition>-->
<authentication-mechanism id="ID109">
<description xml:lang="en-US" id="ID111">description6</description>
<authentication-mechanism-type>authentication-mechanism-type0</authentication-mechanism-type>
<credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
</authentication-mechanism>
<reauthentication-support>true</reauthentication-support>
- </outbound-resourceadapter>
- <inbound-resourceadapter id="ID119">
- <messageadapter id="ID121">
- <messagelistener id="ID123">
- <messagelistener-type>messagelistener-type0</messagelistener-type>
- <activationspec id="ID127">
- <activationspec-class>activationspec-class0</activationspec-class>
- <required-config-property id="ID131">
- <description xml:lang="en-US" id="ID133">description7</description>
- <config-property-name>config-property-name4</config-property-name>
- </required-config-property>
- </activationspec>
- </messagelistener>
- <messagelistener id="ID137">
- <messagelistener-type>messagelistener-type1</messagelistener-type>
- <activationspec id="ID141">
- <activationspec-class>activationspec-class1</activationspec-class>
- <required-config-property id="ID145">
- <description xml:lang="" id="ID147">description8</description>
- <config-property-name>config-property-name5</config-property-name>
- </required-config-property>
- </activationspec>
- </messagelistener>
- <messagelistener id="ID151">
- <messagelistener-type>messagelistener-type2</messagelistener-type>
- <activationspec id="ID155">
- <activationspec-class>activationspec-class2</activationspec-class>
- <required-config-property id="ID159">
- <description xml:lang="" id="ID161">description9</description>
- <config-property-name>config-property-name6</config-property-name>
- </required-config-property>
- </activationspec>
- </messagelistener>
- </messageadapter>
- </inbound-resourceadapter>
- <adminobject id="ID165">
- <adminobject-interface>adminobject-interface0</adminobject-interface>
- <adminobject-class>adminobject-class0</adminobject-class>
- <config-property id="ID171">
- <description xml:lang="" id="ID173">description10</description>
- <config-property-name>config-property-name7</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value>config-property-value4</config-property-value>
- </config-property>
- </adminobject>
+ <!--</outbound-resourceadapter>-->
<security-permission id="ID181">
<description xml:lang="" id="ID183">description11</description>
<security-permission-spec>security-permission-spec0</security-permission-spec>