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/18 21:11:52 UTC

svn commit: r924973 - 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: Thu Mar 18 20:11:51 2010
New Revision: 924973

URL: http://svn.apache.org/viewvc?rev=924973&view=rev
Log:
OPENEJB-1242 support connector 1.6 dds in jee jaxb tree

Added:
    openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.5-example.xml   (props changed)
      - copied unchanged from r924876, openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-example.xml
    openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.6-example.xml   (with props)
Removed:
    openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-example.xml
Modified:
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ActivationSpec.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConfigProperty.java
    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/OutboundResourceAdapter.java
    openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/JeeTest.java

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ActivationSpec.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ActivationSpec.java?rev=924973&r1=924972&r2=924973&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ActivationSpec.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ActivationSpec.java Thu Mar 18 20:11:51 2010
@@ -36,7 +36,8 @@ import java.util.List;
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "activationspecType", propOrder = {
         "activationSpecClass",
-        "requiredConfigProperty"
+        "requiredConfigProperty",
+        "configProperty"
 })
 public class ActivationSpec {
 
@@ -44,6 +45,8 @@ public class ActivationSpec {
     protected String activationSpecClass;
     @XmlElement(name = "required-config-property")
     protected List<RequiredConfigProperty> requiredConfigProperty;
+    @XmlElement(name = "config-property")
+    protected List<ConfigProperty> configProperty;
     @XmlAttribute
     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
     @XmlID
@@ -80,7 +83,14 @@ public class ActivationSpec {
         getRequiredConfigProperty().add(property);
         return property;
     }
-    
+
+    public List<ConfigProperty> getConfigProperty() {
+        if (configProperty == null) {
+            configProperty = new ArrayList<ConfigProperty>();
+        }
+        return configProperty;
+    }
+
     public String getId() {
         return id;
     }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConfigProperty.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConfigProperty.java?rev=924973&r1=924972&r2=924973&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConfigProperty.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConfigProperty.java Thu Mar 18 20:11:51 2010
@@ -46,7 +46,10 @@ import java.util.List;
         "description",
         "configPropertyName",
         "configPropertyType",
-        "configPropertyValue"
+        "configPropertyValue",
+        "configPropertyIgnore",
+        "configPropertySupportsDynamicUpdates",
+        "configPropertyConfidential"
 })
 public class ConfigProperty {
 
@@ -57,6 +60,12 @@ public class ConfigProperty {
     protected String configPropertyType;
     @XmlElement(name = "config-property-value")
     protected String configPropertyValue;
+    @XmlElement(name = "config-property-ignore")
+    protected Boolean configPropertyIgnore;
+    @XmlElement(name = "config-property-supports-dynamic-updates")
+    protected Boolean configPropertySupportsDynamicUpdates;
+    @XmlElement(name = "config-property-confidential")
+    protected Boolean configPropertyConfidential;
     @XmlAttribute
     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
     @XmlID
@@ -93,6 +102,30 @@ public class ConfigProperty {
         this.configPropertyValue = value;
     }
 
+    public Boolean isConfigPropertyConfidential() {
+        return configPropertyConfidential;
+    }
+
+    public void setConfigPropertyConfidential(Boolean configPropertyConfidential) {
+        this.configPropertyConfidential = configPropertyConfidential;
+    }
+
+    public Boolean isConfigPropertyIgnore() {
+        return configPropertyIgnore;
+    }
+
+    public void setConfigPropertyIgnore(Boolean configPropertyIgnore) {
+        this.configPropertyIgnore = configPropertyIgnore;
+    }
+
+    public Boolean isConfigPropertySupportsDynamicUpdates() {
+        return configPropertySupportsDynamicUpdates;
+    }
+
+    public void setConfigPropertySupportsDynamicUpdates(Boolean configPropertySupportsDynamicUpdates) {
+        this.configPropertySupportsDynamicUpdates = configPropertySupportsDynamicUpdates;
+    }
+
     public String getId() {
         return id;
     }

Modified: 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=924973&r1=924972&r2=924973&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/Connector.java Thu Mar 18 20:11:51 2010
@@ -26,7 +26,9 @@ import javax.xml.bind.annotation.XmlTran
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -35,6 +37,7 @@ import java.util.Map;
 @XmlRootElement(name = "connector")
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "connectorType", propOrder = {
+        "moduleName",
         "descriptions",
         "displayNames",
         "icon",
@@ -42,10 +45,13 @@ import java.util.Map;
         "eisType",
         "resourceAdapterVersion",
         "license",
-        "resourceAdapter"
+        "resourceAdapter",
+        "requiredWorkContext"
 })
 public class Connector {
 
+    @XmlElement(name = "module-name")
+    protected String moduleName;
     @XmlTransient
     protected TextMap description = new TextMap();
     @XmlTransient
@@ -53,21 +59,25 @@ public class Connector {
     @XmlElement(name = "icon", required = true)
     protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
 
-    @XmlElement(name = "vendor-name", required = true)
-    protected String vendorName;
-    @XmlElement(name = "eis-type", required = true)
-    protected String eisType;
-    @XmlElement(name = "resourceadapter-version", required = true)
-    protected String resourceAdapterVersion;
+    @XmlElement(name = "vendor-name")
+    protected String vendorName = "";
+    @XmlElement(name = "eis-type")
+    protected String eisType = "";
+    @XmlElement(name = "resourceadapter-version")
+    protected String resourceAdapterVersion = "";
     protected License license;
     @XmlElement(name = "resourceadapter", required = true)
     protected ResourceAdapter resourceAdapter;
+    @XmlElement(name = "required-work-context")
+    protected List<String> requiredWorkContext;
     @XmlAttribute
     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
     @XmlID
     protected String id;
     @XmlAttribute(required = true)
     protected String version;
+    @XmlAttribute(name = "metadata-complete")
+    protected Boolean metadataComplete;
 
     public Connector() {
     }
@@ -76,6 +86,14 @@ public class Connector {
         this.id = id;
     }
 
+    public String getModuleName() {
+        return moduleName;
+    }
+
+    public void setModuleName(String moduleName) {
+        this.moduleName = moduleName;
+    }
+
     @XmlElement(name = "description", required = true)
     public Text[] getDescriptions() {
         return description.toArray();
@@ -164,6 +182,13 @@ public class Connector {
         return resourceAdapter;
     }
 
+    public List<String> getRequiredWorkContext() {
+        if (requiredWorkContext == null) {
+            requiredWorkContext = new ArrayList<String>();
+        }
+        return requiredWorkContext;
+    }
+
     public String getId() {
         return id;
     }
@@ -174,7 +199,7 @@ public class Connector {
 
     public String getVersion() {
         if (version == null) {
-            return "1.5";
+            return "1.6";
         } else {
             return version;
         }
@@ -184,4 +209,11 @@ public class Connector {
         this.version = value;
     }
 
+    public Boolean isMetadataComplete() {
+        return metadataComplete;
+    }
+
+    public void setMetadataComplete(Boolean metadataComplete) {
+        this.metadataComplete = metadataComplete;
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/OutboundResourceAdapter.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/OutboundResourceAdapter.java?rev=924973&r1=924972&r2=924973&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/OutboundResourceAdapter.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/OutboundResourceAdapter.java Thu Mar 18 20:11:51 2010
@@ -51,9 +51,9 @@ import java.util.List;
 })
 public class OutboundResourceAdapter {
 
-    @XmlElement(name = "connection-definition", required = true)
+    @XmlElement(name = "connection-definition")
     protected List<ConnectionDefinition> connectionDefinition;
-    @XmlElement(name = "transaction-support", required = true)
+    @XmlElement(name = "transaction-support")
     protected TransactionSupportType transactionSupport;
     @XmlElement(name = "authentication-mechanism")
     protected List<AuthenticationMechanism> authenticationMechanism;

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=924973&r1=924972&r2=924973&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 Thu Mar 18 20:11:51 2010
@@ -133,8 +133,12 @@ public class JeeTest extends TestCase {
         marshalAndUnmarshal(TldTaglib.class, "tld-example.xml");
     }
 
-    public void testRar() throws Exception {
-        marshalAndUnmarshal(Connector.class, "connector-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");
     }
 
     /**

Propchange: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.5-example.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author Id Revision HeadURL

Added: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.6-example.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.6-example.xml?rev=924973&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.6-example.xml (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.6-example.xml Thu Mar 18 20:11:51 2010
@@ -0,0 +1,159 @@
+<?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: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/javaee" version="1.6" id="ID001">
+    <module-name>module-name0</module-name>
+    <description xml:lang="">description0</description>
+    <display-name xml:lang="en-US">display-name0</display-name>
+    <icon xml:lang="" id="ID007">
+        <small-icon>small-icon0</small-icon>
+        <large-icon>large-icon0</large-icon>
+    </icon>
+    <vendor-name>vendor-name0</vendor-name>
+    <eis-type>eis-type0</eis-type>
+    <resourceadapter-version>resourceadapter-version0</resourceadapter-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">
+                <managedconnectionfactory-class>managedconnectionfactory-class0</managedconnectionfactory-class>
+                <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-ignore>true</config-property-ignore>
+                    <config-property-supports-dynamic-updates>true</config-property-supports-dynamic-updates>
+                    <config-property-confidential>true</config-property-confidential>
+                </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>
+            <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>
+                    </activationspec>
+                </messagelistener>
+                <messagelistener id="ID137">
+                    <messagelistener-type>messagelistener-type1</messagelistener-type>
+                    <activationspec id="ID141">
+                        <activationspec-class>activationspec-class1</activationspec-class>
+                        <required-config-property id="ID142">
+                            <description xml:lang="en-US" id="ID143">description7</description>
+                            <config-property-name>config-property-name4</config-property-name>
+                        </required-config-property>
+                        <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>
+                        <config-property id="ID160">
+                            <description xml:lang="en-US" id="ID161">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>
+                        <config-property id="ID162">
+                            <description xml:lang="en-US" id="ID163">description5</description>
+                            <config-property-name>config-property-name4</config-property-name>
+                            <config-property-type>java.lang.Boolean</config-property-type>
+                            <config-property-value>config-property-value3</config-property-value>
+                        </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>
+        <security-permission id="ID181">
+            <description xml:lang="" id="ID183">description11</description>
+            <security-permission-spec>security-permission-spec0</security-permission-spec>
+        </security-permission>
+    </resourceadapter>
+    <required-work-context>required-work-context0</required-work-context>
+    <required-work-context>required-work-context1</required-work-context>
+</connector>

Propchange: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/connector-1.6-example.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml