You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by da...@apache.org on 2007/01/26 02:57:14 UTC
svn commit: r500087 [2/2] - in
/incubator/openejb/trunk/openejb3/container/openejb-jee/src:
main/java/org/apache/openejb/jee/ test/java/org/apache/openejb/jee/jpa/
test/resources/ test/resources/oej2/ test/resources/oej2/cmp/
test/resources/oej2/cmp/cm...
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/oej2/cmp/onetoone/simplepk/unidirectional-ejb-jar.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/oej2/cmp/onetoone/simplepk/unidirectional-ejb-jar.xml?view=auto&rev=500087
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/oej2/cmp/onetoone/simplepk/unidirectional-ejb-jar.xml (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/oej2/cmp/onetoone/simplepk/unidirectional-ejb-jar.xml Thu Jan 25 17:57:12 2007
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!--
+ 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.
+-->
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
+ version="2.1">
+
+ <enterprise-beans>
+ <entity>
+ <ejb-name>A</ejb-name>
+ <local-home>org.apache.openejb.deployment.entity.cmp.cmr.onetoone.ALocalHome</local-home>
+ <local>org.apache.openejb.deployment.entity.cmp.cmr.onetoone.ALocal</local>
+ <ejb-class>org.apache.openejb.deployment.entity.cmp.cmr.onetoone.ABean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>false</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>OneToOneA</abstract-schema-name>
+ <cmp-field>
+ <field-name>field1</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>field2</field-name>
+ </cmp-field>
+ <primkey-field>field1</primkey-field>
+ <query>
+ <!-- CompondPK one-to-one shares the local home interface so we need to declare this useless finder -->
+ <query-method>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>org.apache.openejb.deployment.entity.cmp.cmr.CompoundPK</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>SELECT OBJECT(A) FROM OneToOneA A</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <ejb-name>B</ejb-name>
+ <local-home>org.apache.openejb.deployment.entity.cmp.cmr.onetoone.BLocalHome</local-home>
+ <local>org.apache.openejb.deployment.entity.cmp.cmr.onetoone.BLocal</local>
+ <ejb-class>org.apache.openejb.deployment.entity.cmp.cmr.onetoone.BBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>false</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>OneToOneB</abstract-schema-name>
+ <cmp-field>
+ <field-name>field1</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>field2</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>field3</field-name>
+ </cmp-field>
+ <primkey-field>field1</primkey-field>
+ <query>
+ <!-- CompondPK one-to-one shares the local home interface so we need to declare this useless finder -->
+ <query-method>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>org.apache.openejb.deployment.entity.cmp.cmr.CompoundPK</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>SELECT OBJECT(B) FROM OneToOneB B</ejb-ql>
+ </query>
+ </entity>
+ </enterprise-beans>
+ <relationships>
+ <ejb-relation>
+ <ejb-relation-name>relation</ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>ASide</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <cascade-delete/>
+ <relationship-role-source>
+ <ejb-name>A</ejb-name>
+ </relationship-role-source>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>BSide</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>B</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>a</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ </relationships>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>A</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>B</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+
+</ejb-jar>
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/oej2/cmp/onetoone/simplepk/unidirectional-orm.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/oej2/cmp/onetoone/simplepk/unidirectional-orm.xml?view=auto&rev=500087
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/oej2/cmp/onetoone/simplepk/unidirectional-orm.xml (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/oej2/cmp/onetoone/simplepk/unidirectional-orm.xml Thu Jan 25 17:57:12 2007
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm">
+ <entity name="OneToOneA" class="org.apache.openejb.deployment.entity.cmp.cmr.onetoone.ABean">
+ <description>A</description>
+ <table name="A"/>
+ <attributes>
+ <id name="field1">
+ <column name="a1"/>
+ </id>
+ <basic name="field2">
+ <column name="a2"/>
+ </basic>
+ </attributes>
+ </entity>
+ <entity name="OneToOneB" class="org.apache.openejb.deployment.entity.cmp.cmr.onetoone.BBean">
+ <description>B</description>
+ <table name="B"/>
+ <attributes>
+ <id name="field1">
+ <column name="b1"/>
+ </id>
+ <basic name="field2">
+ <column name="b2"/>
+ </basic>
+ <basic name="field3">
+ <column name="fka1"/>
+ </basic>
+ <one-to-one name="a">
+ <join-column referenced-column-name="a1" name="fka1"/>
+ </one-to-one>
+ </attributes>
+ </entity>
+</entity-mappings>