jlaskowski 2005/07/17 13:36:33
Added: modules/itests/src/cmp2/petstore ejb-jar.xml openejb-jar.xml
Log:
A testcase that shows the issue with running PetStore 1.3.2 in
Geronimo/OpenEJB.
To execute the testcase and see the issue do the following:
1. Check out the changes
2. Remove 'BUG_' from the method names of
org.openejb.test.entity.cmp2.PetstoreTests
+ BUG_test01_create()
+ BUG_test02_setterAfterCreate()
3. Go to modules/itests directory
4. Run itests
maven -Dmaven.itest.includes=**/Cmp2TestSuite.java
5. Look at
target/itest-reports/TEST-org.openejb.test.entity.cmp2.Cmp2TestSuite.txt
See http://docs.openejb.org/Creating+itests for more information about
OpenEJB itests module and how to create and run EJB tests
Revision Changes Path
1.1 openejb/modules/itests/src/cmp2/petstore/ejb-jar.xml
Index: ejb-jar.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
====================================================================
Redistribution and use of this software and associated documentation
("Software"), with or without modification, are permitted provided
that the following conditions are met:
1. Redistributions of source code must retain copyright
statements and notices. Redistributions must also contain a
copy of this document.
2. Redistributions in binary form must reproduce this list of
conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The name "OpenEJB" must not be used to endorse or promote
products derived from this Software without prior written
permission of The OpenEJB Group. For written permission,
please contact [EMAIL PROTECTED]
4. Products derived from this Software may not be called "OpenEJB"
nor may "OpenEJB" appear in their names without prior written
permission of The OpenEJB Group. OpenEJB is a registered
trademark of The OpenEJB Group.
5. Due credit should be given to the OpenEJB Project
(http://www.openejb.org/).
THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
====================================================================
This software consists of voluntary contributions made by many
individuals on behalf of the OpenEJB Project. For more information
please see <http://www.openejb.org/>.
====================================================================
-->
<!-- $Revision: 1.1 $ $Date: 2005/07/17 17:36:33 $ -->
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>AddressJAR</display-name>
<enterprise-beans>
<entity>
<display-name>AddressEJB</display-name>
<ejb-name>AddressEJB</ejb-name>
<local-home>org.openejb.test.entity.cmp2.petstore.AddressLocalHome</local-home>
<local>org.openejb.test.entity.cmp2.petstore.AddressLocal</local>
<ejb-class>org.openejb.test.entity.cmp2.petstore.AddressEJB</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Object</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Address</abstract-schema-name>
<cmp-field>
<description>no description</description>
<field-name>street</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>city</field-name>
</cmp-field>
<security-identity>
<description></description>
<use-caller-identity></use-caller-identity>
</security-identity>
</entity>
</enterprise-beans>
<assembly-descriptor>
<method-permission>
<unchecked />
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>getCity</method-name>
<method-params />
</method>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>getStreet</method-name>
<method-params />
</method>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>getPrimaryKey</method-name>
<method-params />
</method>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
</method>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>create</method-name>
<method-params />
</method>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>getEJBLocalHome</method-name>
<method-params />
</method>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBLocalObject</method-param>
</method-params>
</method>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>remove</method-name>
<method-params />
</method>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>setStreet</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>setCity</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>findByPrimaryKey</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
</method>
</method-permission>
<container-transaction>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>setStreet</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>getCity</method-name>
<method-params />
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>remove</method-name>
<method-params />
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>getStreet</method-name>
<method-params />
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>AddressEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>setCity</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
1.1 openejb/modules/itests/src/cmp2/petstore/openejb-jar.xml
Index: openejb-jar.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
====================================================================
Redistribution and use of this software and associated documentation
("Software"), with or without modification, are permitted provided
that the following conditions are met:
1. Redistributions of source code must retain copyright
statements and notices. Redistributions must also contain a
copy of this document.
2. Redistributions in binary form must reproduce this list of
conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The name "OpenEJB" must not be used to endorse or promote
products derived from this Software without prior written
permission of The OpenEJB Group. For written permission,
please contact [EMAIL PROTECTED]
4. Products derived from this Software may not be called "OpenEJB"
nor may "OpenEJB" appear in their names without prior written
permission of The OpenEJB Group. OpenEJB is a registered
trademark of The OpenEJB Group.
5. Due credit should be given to the OpenEJB Project
(http://www.openejb.org/).
THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
====================================================================
This software consists of voluntary contributions made by many
individuals on behalf of the OpenEJB Project. For more information
please see <http://www.openejb.org/>.
====================================================================
-->
<!-- $Revision: 1.1 $ $Date: 2005/07/17 17:36:33 $ -->
<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar"
configId="org/openejb/cmp2/petstore"
parentId="org/apache/geronimo/DefaultDatabase">
<dependency>
<uri>junit/jars/junit-3.8.1.jar</uri>
</dependency>
<cmp-connection-factory>
<application>null</application>
<module>org/apache/geronimo/DefaultDatabase</module>
<name>DefaultDatasource</name>
</cmp-connection-factory>
<enterprise-beans>
<entity>
<ejb-name>AddressEJB</ejb-name>
<jndi-name>client/tests/cmp2/petstore/Address</jndi-name>
<table-name>address</table-name>
<cmp-field-mapping>
<cmp-field-name>id</cmp-field-name>
<cmp-field-class>java.lang.Integer</cmp-field-class>
<table-column>id</table-column>
</cmp-field-mapping>
<cmp-field-mapping>
<cmp-field-name>street</cmp-field-name>
<table-column>street</table-column>
</cmp-field-mapping>
<cmp-field-mapping>
<cmp-field-name>city</cmp-field-name>
<table-column>city</table-column>
</cmp-field-mapping>
<primkey-field>id</primkey-field>
<key-generator xmlns="http://www.openejb.org/xml/ns/pkgen">
<auto-increment-table>
<sql>insert into sequence_table (dummy) values (1)</sql>
<return-type>java.lang.Integer</return-type>
</auto-increment-table>
</key-generator>
</entity>
</enterprise-beans>
</openejb-jar>