tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r662623 - in /openejb/trunk/openejb3/container: openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/ openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ openejb-jee/src/test/resources/
Date Tue, 03 Jun 2008 02:05:38 GMT
Author: dblevins
Date: Mon Jun  2 19:05:38 2008
New Revision: 662623

URL: http://svn.apache.org/viewvc?rev=662623&view=rev
Log:
OPENEJB-785: EJBd protocol over SSL
Based on a patch by Kazem Naderi.  Thanks Kazem!

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/itest-2.2-ejb-jar.xml
    openejb/trunk/openejb3/container/openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/itest-2.2-orm.xml
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MappedSuperclass.java
    openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/itest-2.2-ejb-jar.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/itest-2.2-ejb-jar.xml?rev=662623&r1=662622&r2=662623&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/itest-2.2-ejb-jar.xml
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/itest-2.2-ejb-jar.xml
Mon Jun  2 19:05:38 2008
@@ -15,8 +15,8 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-
-<!-- $Rev$ $Date$ -->
+
+<!-- $Rev$ $Date$ -->
 
 <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -408,6 +408,9 @@
             <cmp-field>
                 <field-name>lastName</field-name>
             </cmp-field>
+            <cmp-field>
+                <field-name>number</field-name>
+            </cmp-field>
             <primkey-field>id</primkey-field>
             <env-entry>
                 <env-entry-name>entity/references/JNDI_access_to_java_comp_env</env-entry-name>
@@ -1377,7 +1380,7 @@
             <prim-key-class>org.apache.openejb.test.entity.cmp2.cmrmapping.CompoundPK</prim-key-class>
             <reentrant>false</reentrant>
             <cmp-version>2.x</cmp-version>
-            <abstract-schema-name>Order</abstract-schema-name>
+            <abstract-schema-name>OneOwningSideBean</abstract-schema-name>
             <cmp-field>
                 <field-name>id</field-name>
             </cmp-field>
@@ -1395,7 +1398,7 @@
             <prim-key-class>java.lang.Integer</prim-key-class>
             <reentrant>false</reentrant>
             <cmp-version>2.x</cmp-version>
-            <abstract-schema-name>Order</abstract-schema-name>
+            <abstract-schema-name>OneInverseSideBean</abstract-schema-name>
             <cmp-field>
                 <field-name>id</field-name>
             </cmp-field>
@@ -1411,7 +1414,7 @@
             <prim-key-class>org.apache.openejb.test.entity.cmp2.cmrmapping.CompoundPK</prim-key-class>
             <reentrant>false</reentrant>
             <cmp-version>2.x</cmp-version>
-            <abstract-schema-name>Order</abstract-schema-name>
+            <abstract-schema-name>ManyOwningSideBean</abstract-schema-name>
             <cmp-field>
                 <field-name>id</field-name>
             </cmp-field>
@@ -1425,7 +1428,7 @@
                         <method-param>java.lang.Integer</method-param>
                     </method-params>
                 </query-method>
-                <ejb-ql>SELECT m.oneInverseSide FROM Order m WHERE m.id = ?1</ejb-ql>
+                <ejb-ql>SELECT m.oneInverseSide FROM ManyOwningSideBean m WHERE m.id
= ?1</ejb-ql>
             </query>
         </entity>
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/itest-2.2-orm.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/itest-2.2-orm.xml?rev=662623&r1=662622&r2=662623&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/itest-2.2-orm.xml
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/resources/convert/oej2/cmp/itest-2.2/itest-2.2-orm.xml
Mon Jun  2 19:05:38 2008
@@ -1,22 +1,22 @@
-<?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$ -->
+<?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$ -->
 
 <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
     <mapped-superclass class="org.apache.openejb.test.entity.cmp.AllowedOperationsCmpBean">
@@ -192,6 +192,7 @@
             <basic name="lastName">
                 <column name="last_name"/>
             </basic>
+            <basic name="number"/>
         </attributes>
     </entity>
     <entity name="EncCmp2" class="openejb.org.apache.openejb.test.entity.cmp.EncCmp2">
@@ -232,7 +233,7 @@
             </basic>
         </attributes>
     </entity>
-    <entity name="Order" class="openejb.org.apache.openejb.test.entity.cmp2.cmrmapping.Order">
+    <entity name="OneOwningSideBean" class="openejb.org.apache.openejb.test.entity.cmp2.cmrmapping.OneOwningSideBean">
         <description>TestModule#OneOwningSideBean</description>
         <table name="OneOwning"/>
         <attributes>
@@ -247,7 +248,7 @@
             </one-to-one>
         </attributes>
     </entity>
-    <entity name="Order" class="openejb.org.apache.openejb.test.entity.cmp2.cmrmapping.Order">
+    <entity name="OneInverseSideBean" class="openejb.org.apache.openejb.test.entity.cmp2.cmrmapping.OneInverseSideBean">
         <description>TestModule#OneInverseSideBean</description>
         <table name="OneInverse"/>
         <attributes>
@@ -258,11 +259,11 @@
             <one-to-one name="oneOwningSide" mapped-by="oneInverseSide"/>
         </attributes>
     </entity>
-    <entity name="Order" class="openejb.org.apache.openejb.test.entity.cmp2.cmrmapping.Order">
+    <entity name="ManyOwningSideBean" class="openejb.org.apache.openejb.test.entity.cmp2.cmrmapping.ManyOwningSideBean">
         <description>TestModule#ManyOwningSideBean</description>
         <table name="ManyOwning"/>
-        <named-query name="Order.ejbSelectSomething(java.lang.Integer)">
-            <query>SELECT m.oneInverseSide FROM Order m WHERE m.id = ?1</query>
+        <named-query name="ManyOwningSideBean.ejbSelectSomething(java.lang.Integer)">
+            <query>SELECT m.oneInverseSide FROM ManyOwningSideBean m WHERE m.id = ?1</query>
         </named-query>
         <attributes>
             <basic name="id">

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java?rev=662623&r1=662622&r2=662623&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
Mon Jun  2 19:05:38 2008
@@ -17,6 +17,8 @@
 
 package org.apache.openejb.jee.jpa;
 
+import org.apache.openejb.jee.Keyable;
+
 import java.util.ArrayList;
 import java.util.List;
 import javax.xml.bind.annotation.XmlAccessType;
@@ -120,7 +122,7 @@
     "associationOverride",
     "attributes"
 })
-public class Entity implements Mapping {
+public class Entity implements Mapping, Keyable<String> {
 
     protected String description;
     protected Table table;
@@ -952,4 +954,8 @@
             throw new IllegalArgumentException("Unknown field type " + field.getClass());
         }
     }
+
+    public String getKey() {
+        return this.clazz;
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java?rev=662623&r1=662622&r2=662623&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
Mon Jun  2 19:05:38 2008
@@ -17,8 +17,12 @@
 
 package org.apache.openejb.jee.jpa;
 
+import org.apache.openejb.jee.KeyedCollection;
+
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Collection;
+import java.util.Map;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
@@ -130,8 +134,8 @@
     @XmlElement(name = "sql-result-set-mapping")
     protected List<SqlResultSetMapping> sqlResultSetMapping;
     @XmlElement(name = "mapped-superclass")
-    protected List<MappedSuperclass> mappedSuperclass;
-    protected List<Entity> entity;
+    protected KeyedCollection<String, MappedSuperclass> mappedSuperclass;
+    protected KeyedCollection<String, Entity> entity;
     protected List<Embeddable> embeddable;
     @XmlAttribute(required = true)
     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@@ -448,13 +452,17 @@
      * 
      * 
      */
-    public List<MappedSuperclass> getMappedSuperclass() {
+    public Collection<MappedSuperclass> getMappedSuperclass() {
         if (mappedSuperclass == null) {
-            mappedSuperclass = new ArrayList<MappedSuperclass>();
+            mappedSuperclass = new KeyedCollection<String, MappedSuperclass>();
         }
         return this.mappedSuperclass;
     }
 
+    public Map<String, MappedSuperclass> getMappedSuperclassMap() {
+        return ((KeyedCollection)getMappedSuperclass()).toMap();
+    }
+
     /**
      * Gets the value of the entity property.
      * 
@@ -477,13 +485,17 @@
      * 
      * 
      */
-    public List<Entity> getEntity() {
+    public Collection<Entity> getEntity() {
         if (entity == null) {
-            entity = new ArrayList<Entity>();
+            entity = new KeyedCollection<String, Entity>();
         }
         return this.entity;
     }
 
+    public Map<String, Entity> getEntityMap() {
+        return ((KeyedCollection)getEntity()).toMap();
+    }
+
     /**
      * Gets the value of the embeddable property.
      * 

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MappedSuperclass.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MappedSuperclass.java?rev=662623&r1=662622&r2=662623&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MappedSuperclass.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MappedSuperclass.java
Mon Jun  2 19:05:38 2008
@@ -17,6 +17,8 @@
 
 package org.apache.openejb.jee.jpa;
 
+import org.apache.openejb.jee.Keyable;
+
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
@@ -88,7 +90,7 @@
     "postLoad",
     "attributes"
 })
-public class MappedSuperclass implements Mapping {
+public class MappedSuperclass implements Mapping, Keyable<String> {
 
     protected String description;
     @XmlElement(name = "id-class")
@@ -530,4 +532,8 @@
             throw new IllegalArgumentException("Unknown field type " + field.getClass());
         }
     }
+
+    public String getKey() {
+        return this.clazz;
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml?rev=662623&r1=662622&r2=662623&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml Mon
Jun  2 19:05:38 2008
@@ -1,24 +1,24 @@
 <?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$ -->
-
+<!--
+
+    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$ -->
+
 <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
     <description>String</description>
     <persistence-unit-metadata>
@@ -29,7 +29,7 @@
             <access>PROPERTY</access>
             <cascade-persist/>
             <entity-listeners>
-                <entity-listener class="String">
+                <entity-listener class="MyClass">
                     <pre-persist method-name="String"/>
                     <post-persist method-name="String"/>
                     <pre-remove method-name="String"/>
@@ -38,7 +38,7 @@
                     <post-update method-name="String"/>
                     <post-load method-name="String"/>
                 </entity-listener>
-                <entity-listener class="String">
+                <entity-listener class="MyClass1">
                     <pre-persist method-name="String"/>
                     <post-persist method-name="String"/>
                     <pre-remove method-name="String"/>
@@ -120,13 +120,13 @@
         <column-result name="String"/>
         <column-result name="String"/>
     </sql-result-set-mapping>
-    <mapped-superclass metadata-complete="true" class="String" access="PROPERTY">
+    <mapped-superclass metadata-complete="true" class="MyClass2" access="PROPERTY">
         <description>String</description>
         <id-class class="String"/>
         <exclude-default-listeners/>
         <exclude-superclass-listeners/>
         <entity-listeners>
-            <entity-listener class="String">
+            <entity-listener class="MyClass3">
                 <pre-persist method-name="String"/>
                 <post-persist method-name="String"/>
                 <pre-remove method-name="String"/>
@@ -135,7 +135,7 @@
                 <post-update method-name="String"/>
                 <post-load method-name="String"/>
             </entity-listener>
-            <entity-listener class="String">
+            <entity-listener class="MyClass4">
                 <pre-persist method-name="String"/>
                 <post-persist method-name="String"/>
                 <pre-remove method-name="String"/>
@@ -365,13 +365,13 @@
             <transient name="String"/>
         </attributes>
     </mapped-superclass>
-    <mapped-superclass metadata-complete="true" class="String" access="PROPERTY">
+    <mapped-superclass metadata-complete="true" class="MyClass5" access="PROPERTY">
         <description>String</description>
         <id-class class="String"/>
         <exclude-default-listeners/>
         <exclude-superclass-listeners/>
         <entity-listeners>
-            <entity-listener class="String">
+            <entity-listener class="MyClass6">
                 <pre-persist method-name="String"/>
                 <post-persist method-name="String"/>
                 <pre-remove method-name="String"/>
@@ -380,7 +380,7 @@
                 <post-update method-name="String"/>
                 <post-load method-name="String"/>
             </entity-listener>
-            <entity-listener class="String">
+            <entity-listener class="MyClass7">
                 <pre-persist method-name="String"/>
                 <post-persist method-name="String"/>
                 <pre-remove method-name="String"/>
@@ -610,7 +610,7 @@
             <transient name="String"/>
         </attributes>
     </mapped-superclass>
-    <entity name="String" metadata-complete="true" class="String" access="PROPERTY">
+    <entity name="String" metadata-complete="true" class="MyClass8" access="PROPERTY">
         <description>String</description>
         <table schema="String" name="String" catalog="String">
             <unique-constraint>
@@ -710,7 +710,7 @@
         <exclude-default-listeners/>
         <exclude-superclass-listeners/>
         <entity-listeners>
-            <entity-listener class="String">
+            <entity-listener class="MyClass9">
                 <pre-persist method-name="String"/>
                 <post-persist method-name="String"/>
                 <pre-remove method-name="String"/>
@@ -719,7 +719,7 @@
                 <post-update method-name="String"/>
                 <post-load method-name="String"/>
             </entity-listener>
-            <entity-listener class="String">
+            <entity-listener class="MyClass10">
                 <pre-persist method-name="String"/>
                 <post-persist method-name="String"/>
                 <pre-remove method-name="String"/>
@@ -963,7 +963,7 @@
             <transient name="String"/>
         </attributes>
     </entity>
-    <entity name="String" metadata-complete="true" class="String" access="PROPERTY">
+    <entity name="String" metadata-complete="true" class="MyClass11" access="PROPERTY">
         <description>String</description>
         <table schema="String" name="String" catalog="String">
             <unique-constraint>
@@ -1063,7 +1063,7 @@
         <exclude-default-listeners/>
         <exclude-superclass-listeners/>
         <entity-listeners>
-            <entity-listener class="String">
+            <entity-listener class="MyClass12">
                 <pre-persist method-name="String"/>
                 <post-persist method-name="String"/>
                 <pre-remove method-name="String"/>
@@ -1072,7 +1072,7 @@
                 <post-update method-name="String"/>
                 <post-load method-name="String"/>
             </entity-listener>
-            <entity-listener class="String">
+            <entity-listener class="MyClass13">
                 <pre-persist method-name="String"/>
                 <post-persist method-name="String"/>
                 <pre-remove method-name="String"/>



Mime
View raw message