tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlaskow...@apache.org
Subject svn commit: r607045 [2/3] - in /openejb/trunk/openejb3: container/openejb-core/src/main/java/org/apache/openejb/ container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ container/openejb-core/src/main/java/org/apache/openejb/config/ ...
Date Thu, 27 Dec 2007 12:10:25 GMT
Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/ejb-jar.xml?rev=607045&r1=607044&r2=607045&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/ejb-jar.xml (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/ejb-jar.xml Thu Dec 27 04:10:23 2007
@@ -22,50 +22,13 @@
 
 <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                  http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
          version="3.0" metadata-complete="false">
 
   <description>
     This ejb-jar file contains assembled enterprise beans that are
     part of employee self-service application.
   </description>
-  
-  <interceptors>
-  <interceptor>
-  	<interceptor-class>
-  		org.apache.openejb.test.interceptor.SecondClassInterceptor
-  	</interceptor-class>
-  </interceptor>
-  <interceptor>
-  		<interceptor-class>
-  			org.apache.openejb.test.interceptor.DDInterceptor
-  		</interceptor-class>
-  		<around-invoke>
-  			<method-name>ddInterceptor</method-name>
-  		</around-invoke>
-  		<post-construct>
-  			<lifecycle-callback-method>
-  				ddInterceptorPostConstruct
-  			</lifecycle-callback-method>
-  		</post-construct>
-  		<post-activate>
-  			<lifecycle-callback-method>
-  				ddInterceptorPostActivate
-  			</lifecycle-callback-method>
-  		</post-activate>
-  		<pre-passivate>
-  			<lifecycle-callback-method>
-  				ddInterceptorPrePassivate
-  			</lifecycle-callback-method>
-  		</pre-passivate>
-  		<pre-destroy>
-  			<lifecycle-callback-method>
-  				ddInterceptorPreDestroy
-  			</lifecycle-callback-method>
-  		</pre-destroy>
-  	</interceptor>
-  </interceptors>  
 
   <enterprise-beans>
     <!--
@@ -95,11 +58,10 @@
       <remote>org.apache.openejb.test.entity.cmp.BasicCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.BasicCmpBean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>1.x</cmp-version>
-      <abstract-schema-name>BasicCmpBeanX</abstract-schema-name>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>false</reentrant>
-      <primkey-field>primaryKey</primkey-field>
+      <cmp-version>1.x</cmp-version>
+      <abstract-schema-name>BasicCmpBeanX</abstract-schema-name>
       <cmp-field>
         <field-name>primaryKey</field-name>
       </cmp-field>
@@ -109,6 +71,7 @@
       <cmp-field>
         <field-name>lastName</field-name>
       </cmp-field>
+      <primkey-field>primaryKey</primkey-field>
       <resource-ref>
         <description>This is a reference to a JDBC database.</description>
         <res-ref-name>jdbc/basic/entityDatabase</res-ref-name>
@@ -127,10 +90,10 @@
       <remote>org.apache.openejb.test.entity.cmp.ComplexCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.ComplexCmpBean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>1.x</cmp-version>
-      <abstract-schema-name>ComplexCmpBeanX</abstract-schema-name>
       <prim-key-class>org.apache.openejb.test.entity.cmp.ComplexCmpBeanPk</prim-key-class>
       <reentrant>false</reentrant>
+      <cmp-version>1.x</cmp-version>
+      <abstract-schema-name>ComplexCmpBeanX</abstract-schema-name>
       <cmp-field>
         <field-name>firstName</field-name>
       </cmp-field>
@@ -155,10 +118,10 @@
       <remote>org.apache.openejb.test.entity.cmp.UnknownCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.UnknownCmpBean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>1.x</cmp-version>
-      <abstract-schema-name>UnknownCmpBeanX</abstract-schema-name>
       <prim-key-class>java.lang.Object</prim-key-class>
       <reentrant>false</reentrant>
+      <cmp-version>1.x</cmp-version>
+      <abstract-schema-name>UnknownCmpBeanX</abstract-schema-name>
       <cmp-field>
         <field-name>firstName</field-name>
       </cmp-field>
@@ -189,11 +152,10 @@
       <remote>org.apache.openejb.test.entity.cmp.BasicCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.BasicCmp2Bean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>2.x</cmp-version>
-      <abstract-schema-name>BasicCmp2Bean</abstract-schema-name>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>false</reentrant>
-      <primkey-field>id</primkey-field>
+      <cmp-version>2.x</cmp-version>
+      <abstract-schema-name>BasicCmp2Bean</abstract-schema-name>
       <cmp-field>
         <field-name>id</field-name>
       </cmp-field>
@@ -203,6 +165,7 @@
       <cmp-field>
         <field-name>lastName</field-name>
       </cmp-field>
+      <primkey-field>id</primkey-field>
       <resource-ref>
         <description>This is a reference to a JDBC database.</description>
         <res-ref-name>jdbc/basic/entityDatabase</res-ref-name>
@@ -221,10 +184,10 @@
       <remote>org.apache.openejb.test.entity.cmp.ComplexCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.ComplexCmp2Bean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>2.x</cmp-version>
-      <abstract-schema-name>ComplexCmp2Bean</abstract-schema-name>
       <prim-key-class>org.apache.openejb.test.entity.cmp.ComplexCmpBeanPk</prim-key-class>
       <reentrant>false</reentrant>
+      <cmp-version>2.x</cmp-version>
+      <abstract-schema-name>ComplexCmp2Bean</abstract-schema-name>
       <cmp-field>
         <field-name>firstName</field-name>
       </cmp-field>
@@ -249,10 +212,10 @@
       <remote>org.apache.openejb.test.entity.cmp.UnknownCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.UnknownCmp2Bean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>2.x</cmp-version>
-      <abstract-schema-name>UnknownCmp2Bean</abstract-schema-name>
       <prim-key-class>java.lang.Object</prim-key-class>
       <reentrant>false</reentrant>
+      <cmp-version>2.x</cmp-version>
+      <abstract-schema-name>UnknownCmp2Bean</abstract-schema-name>
       <cmp-field>
         <field-name>firstName</field-name>
       </cmp-field>
@@ -286,10 +249,9 @@
       <remote>org.apache.openejb.test.entity.cmp.BasicCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.AllowedOperationsCmpBean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>1.x</cmp-version>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>false</reentrant>
-      <primkey-field>primaryKey</primkey-field>
+      <cmp-version>1.x</cmp-version>
       <cmp-field>
         <field-name>primaryKey</field-name>
       </cmp-field>
@@ -302,6 +264,7 @@
       <cmp-field>
         <field-name>number</field-name>
       </cmp-field>
+      <primkey-field>primaryKey</primkey-field>
       <env-entry>
         <env-entry-name>stateless/references/JNDI_access_to_java_comp_env</env-entry-name>
         <env-entry-type>java.lang.String</env-entry-type>
@@ -351,27 +314,10 @@
       <remote>org.apache.openejb.test.entity.cmp.BasicCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.AllowedOperationsCmp2Bean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>2.x</cmp-version>
-      <abstract-schema-name>AllowedOperationsCmp2Bean</abstract-schema-name>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>false</reentrant>
-      <primkey-field>id</primkey-field>
-      <query>
-        <query-method>
-          <method-name>findByLastName</method-name>
-          <method-params>
-            <method-param>java.lang.String</method-param>
-          </method-params>
-        </query-method>
-        <ejb-ql>SELECT o FROM AllowedOperationsCmp2Bean o WHERE o.lastName = ?1</ejb-ql>
-      </query>
-      <query>
-        <query-method>
-          <method-name>findEmptyCollection</method-name>
-          <method-params/>
-        </query-method>
-        <ejb-ql>SELECT o FROM AllowedOperationsCmp2Bean o WHERE 'true' = 'false'</ejb-ql>
-      </query>
+      <cmp-version>2.x</cmp-version>
+      <abstract-schema-name>AllowedOperationsCmp2Bean</abstract-schema-name>
       <cmp-field>
         <field-name>id</field-name>
       </cmp-field>
@@ -384,6 +330,7 @@
       <cmp-field>
         <field-name>number</field-name>
       </cmp-field>
+      <primkey-field>id</primkey-field>
       <env-entry>
         <env-entry-name>stateless/references/JNDI_access_to_java_comp_env</env-entry-name>
         <env-entry-type>java.lang.String</env-entry-type>
@@ -416,6 +363,22 @@
         <role-name>TheMan</role-name>
         <role-link>Executive</role-link>
       </security-role-ref>
+      <query>
+        <query-method>
+          <method-name>findByLastName</method-name>
+          <method-params>
+            <method-param>java.lang.String</method-param>
+          </method-params>
+        </query-method>
+        <ejb-ql>SELECT o FROM AllowedOperationsCmp2Bean o WHERE o.lastName = ?1</ejb-ql>
+      </query>
+      <query>
+        <query-method>
+          <method-name>findEmptyCollection</method-name>
+          <method-params/>
+        </query-method>
+        <ejb-ql>SELECT o FROM AllowedOperationsCmp2Bean o WHERE 'true' = 'false'</ejb-ql>
+      </query>
     </entity>
 
     <!--
@@ -433,10 +396,9 @@
       <remote>org.apache.openejb.test.entity.cmp.EncCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.EncCmpBean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>1.x</cmp-version>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>false</reentrant>
-      <primkey-field>primaryKey</primkey-field>
+      <cmp-version>1.x</cmp-version>
       <cmp-field>
         <field-name>primaryKey</field-name>
       </cmp-field>
@@ -446,6 +408,7 @@
       <cmp-field>
         <field-name>lastName</field-name>
       </cmp-field>
+      <primkey-field>primaryKey</primkey-field>
       <env-entry>
         <env-entry-name>entity/cmp/references/Boolean</env-entry-name>
         <env-entry-type>java.lang.Boolean</env-entry-type>
@@ -512,30 +475,30 @@
         <remote>org.apache.openejb.test.stateless.BasicStatelessObject</remote>
         <ejb-link>BasicStatelessBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>entity/cmp/beanReferences/stateless-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>entity/cmp/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>entity/cmp/beanReferences/stateful-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>entity/cmp/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
       </ejb-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>entity/cmp/beanReferences/stateless-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
+      </ejb-local-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>entity/cmp/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
+      </ejb-local-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -561,13 +524,6 @@
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
       </resource-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -575,6 +531,13 @@
         <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
     </entity>
 
     <!--
@@ -592,10 +555,9 @@
       <remote>org.apache.openejb.test.entity.cmp.EncCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.EncCmp2Bean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>2.x</cmp-version>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>false</reentrant>
-      <primkey-field>id</primkey-field>
+      <cmp-version>2.x</cmp-version>
       <cmp-field>
         <field-name>id</field-name>
       </cmp-field>
@@ -605,6 +567,7 @@
       <cmp-field>
         <field-name>lastName</field-name>
       </cmp-field>
+      <primkey-field>id</primkey-field>
       <env-entry>
         <env-entry-name>entity/cmp/references/Boolean</env-entry-name>
         <env-entry-type>java.lang.Boolean</env-entry-type>
@@ -666,30 +629,30 @@
         <remote>org.apache.openejb.test.stateless.BasicStatelessObject</remote>
         <ejb-link>BasicStatelessBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>entity/cmp/beanReferences/stateless-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>entity/cmp/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>entity/cmp/beanReferences/stateful-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>entity/cmp/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
       </ejb-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>entity/cmp/beanReferences/stateless-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
+      </ejb-local-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>entity/cmp/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
+      </ejb-local-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -715,13 +678,6 @@
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
       </resource-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -729,6 +685,13 @@
         <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
     </entity>
 
     <!--
@@ -747,9 +710,8 @@
       <ejb-class>org.apache.openejb.test.entity.cmp.ContextLookupCmpBean</ejb-class>
       <persistence-type>Container</persistence-type>
       <prim-key-class>java.lang.Integer</prim-key-class>
-      <cmp-version>1.x</cmp-version>
       <reentrant>false</reentrant>
-      <primkey-field>primaryKey</primkey-field>
+      <cmp-version>1.x</cmp-version>
       <cmp-field>
         <field-name>primaryKey</field-name>
       </cmp-field>
@@ -759,6 +721,7 @@
       <cmp-field>
         <field-name>lastName</field-name>
       </cmp-field>
+      <primkey-field>primaryKey</primkey-field>
       <env-entry>
         <env-entry-name>entity/cmp/references/Boolean</env-entry-name>
         <env-entry-type>java.lang.Boolean</env-entry-type>
@@ -850,13 +813,6 @@
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
       </resource-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -864,6 +820,13 @@
         <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
     </entity>
 
     <!--
@@ -881,10 +844,9 @@
       <remote>org.apache.openejb.test.entity.cmp.RmiIiopCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.RmiIiopCmpBean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>1.x</cmp-version>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>false</reentrant>
-      <primkey-field>primaryKey</primkey-field>
+      <cmp-version>1.x</cmp-version>
       <cmp-field>
         <field-name>primaryKey</field-name>
       </cmp-field>
@@ -894,6 +856,7 @@
       <cmp-field>
         <field-name>lastName</field-name>
       </cmp-field>
+      <primkey-field>primaryKey</primkey-field>
       <ejb-ref>
         <ejb-ref-name>cmp/rmi-iiop/home</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
@@ -922,10 +885,9 @@
       <remote>org.apache.openejb.test.entity.cmp.RmiIiopCmpObject</remote>
       <ejb-class>org.apache.openejb.test.entity.cmp.RmiIiopCmp2Bean</ejb-class>
       <persistence-type>Container</persistence-type>
-      <cmp-version>2.x</cmp-version>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>false</reentrant>
-      <primkey-field>id</primkey-field>
+      <cmp-version>2.x</cmp-version>
       <cmp-field>
         <field-name>id</field-name>
       </cmp-field>
@@ -935,6 +897,7 @@
       <cmp-field>
         <field-name>lastName</field-name>
       </cmp-field>
+      <primkey-field>id</primkey-field>
       <ejb-ref>
         <ejb-ref-name>cmp/rmi-iiop/home</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
@@ -1833,34 +1796,30 @@
         <remote>org.apache.openejb.test.stateless.BasicStatelessObject</remote>
         <ejb-link>BasicStatelessBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateful/beanReferences/stateless-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>stateful/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateful/beanReferences/stateful-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>stateful/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
       </ejb-ref>
-      <security-role-ref>
-        <role-name>TheMan</role-name>
-        <role-link>Executive</role-link>
-      </security-role-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>stateful/beanReferences/stateless-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
+      </ejb-local-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>stateful/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
+      </ejb-local-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -1885,13 +1844,6 @@
         <resource-env-ref-name>sessioncontext</resource-env-ref-name>
         <resource-env-ref-type>javax.ejb.SessionContext</resource-env-ref-type>
       </resource-env-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -1907,6 +1859,17 @@
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <persistence-context-type>Extended</persistence-context-type>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
+      <security-role-ref>
+        <role-name>TheMan</role-name>
+        <role-link>Executive</role-link>
+      </security-role-ref>
     </session>
 
     <!--
@@ -2036,27 +1999,37 @@
           <injection-target-name>statelessHome</injection-target-name>
         </injection-target>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateful/beanReferences/stateless-business-local</ejb-ref-name>
+      <ejb-ref>
+        <ejb-ref-name>stateful/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateful.FieldInjectionStatefulBean</injection-target-class>
-          <injection-target-name>statelessBusinessLocal</injection-target-name>
+          <injection-target-name>statelessBusinessRemote</injection-target-name>
         </injection-target>
-      </ejb-local-ref>
+      </ejb-ref>
       <ejb-ref>
-        <ejb-ref-name>stateful/beanReferences/stateless-business-remote</ejb-ref-name>
+        <ejb-ref-name>stateful/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
+        <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateful.FieldInjectionStatefulBean</injection-target-class>
-          <injection-target-name>statelessBusinessRemote</injection-target-name>
+          <injection-target-name>statefulBusinessRemote</injection-target-name>
         </injection-target>
       </ejb-ref>
       <ejb-local-ref>
+        <ejb-ref-name>stateful/beanReferences/stateless-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
+        <injection-target>
+          <injection-target-class>org.apache.openejb.test.stateful.FieldInjectionStatefulBean</injection-target-class>
+          <injection-target-name>statelessBusinessLocal</injection-target-name>
+        </injection-target>
+      </ejb-local-ref>
+      <ejb-local-ref>
         <ejb-ref-name>stateful/beanReferences/stateful-business-local</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
@@ -2066,16 +2039,6 @@
           <injection-target-name>statefulBusinessLocal</injection-target-name>
         </injection-target>
       </ejb-local-ref>
-      <ejb-ref>
-        <ejb-ref-name>stateful/beanReferences/stateful-business-remote</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
-        <injection-target>
-          <injection-target-class>org.apache.openejb.test.stateful.FieldInjectionStatefulBean</injection-target-class>
-          <injection-target-name>statefulBusinessRemote</injection-target-name>
-        </injection-target>
-      </ejb-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -2120,28 +2083,28 @@
           <injection-target-name>ejbContext</injection-target-name>
         </injection-target>
       </resource-env-ref>
-      <persistence-unit-ref>
+      <persistence-context-ref>
         <description>
-          Persistence unit for testing the functionality.
+          Persistence context for testing the functionality.
         </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateful.FieldInjectionStatefulBean</injection-target-class>
-          <injection-target-name>emf</injection-target-name>
+          <injection-target-name>em</injection-target-name>
         </injection-target>
-      </persistence-unit-ref>
-      <persistence-context-ref>
+      </persistence-context-ref>
+      <persistence-unit-ref>
         <description>
-          Persistence context for testing the functionality.
+          Persistence unit for testing the functionality.
         </description>
-        <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateful.FieldInjectionStatefulBean</injection-target-class>
-          <injection-target-name>em</injection-target-name>
+          <injection-target-name>emf</injection-target-name>
         </injection-target>
-      </persistence-context-ref>
+      </persistence-unit-ref>
     </session>
 
 
@@ -2272,46 +2235,46 @@
           <injection-target-name>statelessHome</injection-target-name>
         </injection-target>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateful/beanReferences/stateless-business-local</ejb-ref-name>
+      <ejb-ref>
+        <ejb-ref-name>stateful/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateful.SetterInjectionStatefulBean</injection-target-class>
-          <injection-target-name>statelessBusinessLocal</injection-target-name>
+          <injection-target-name>statelessBusinessRemote</injection-target-name>
         </injection-target>
-      </ejb-local-ref>
+      </ejb-ref>
       <ejb-ref>
-        <ejb-ref-name>stateful/beanReferences/stateless-business-remote</ejb-ref-name>
+        <ejb-ref-name>stateful/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
+        <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateful.SetterInjectionStatefulBean</injection-target-class>
-          <injection-target-name>statelessBusinessRemote</injection-target-name>
+          <injection-target-name>statefulBusinessRemote</injection-target-name>
         </injection-target>
       </ejb-ref>
       <ejb-local-ref>
-        <ejb-ref-name>stateful/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-name>stateful/beanReferences/stateless-business-local</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateful.SetterInjectionStatefulBean</injection-target-class>
-          <injection-target-name>statefulBusinessLocal</injection-target-name>
+          <injection-target-name>statelessBusinessLocal</injection-target-name>
         </injection-target>
       </ejb-local-ref>
-      <ejb-ref>
-        <ejb-ref-name>stateful/beanReferences/stateful-business-remote</ejb-ref-name>
+      <ejb-local-ref>
+        <ejb-ref-name>stateful/beanReferences/stateful-business-local</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateful.SetterInjectionStatefulBean</injection-target-class>
-          <injection-target-name>statefulBusinessRemote</injection-target-name>
+          <injection-target-name>statefulBusinessLocal</injection-target-name>
         </injection-target>
-      </ejb-ref>
+      </ejb-local-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -2356,28 +2319,28 @@
           <injection-target-name>ejbContext</injection-target-name>
         </injection-target>
       </resource-env-ref>
-      <persistence-unit-ref>
+      <persistence-context-ref>
         <description>
-          Persistence unit for testing the functionality.
+          Persistence context for testing the functionality.
         </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateful.SetterInjectionStatefulBean</injection-target-class>
-          <injection-target-name>emf</injection-target-name>
+          <injection-target-name>em</injection-target-name>
         </injection-target>
-      </persistence-unit-ref>
-      <persistence-context-ref>
+      </persistence-context-ref>
+      <persistence-unit-ref>
         <description>
-          Persistence context for testing the functionality.
+          Persistence unit for testing the functionality.
         </description>
-        <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateful.SetterInjectionStatefulBean</injection-target-class>
-          <injection-target-name>em</injection-target-name>
+          <injection-target-name>emf</injection-target-name>
         </injection-target>
-      </persistence-context-ref>
+      </persistence-unit-ref>
     </session>
 
     <!--
@@ -3228,46 +3191,46 @@
           <injection-target-name>statelessHome</injection-target-name>
         </injection-target>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateless/beanReferences/stateless-business-local</ejb-ref-name>
+      <ejb-ref>
+        <ejb-ref-name>stateless/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.FieldInjectionStatelessBean</injection-target-class>
-          <injection-target-name>statelessBusinessLocal</injection-target-name>
+          <injection-target-name>statelessBusinessRemote</injection-target-name>
         </injection-target>
-      </ejb-local-ref>
+      </ejb-ref>
       <ejb-ref>
-        <ejb-ref-name>stateless/beanReferences/stateless-business-remote</ejb-ref-name>
+        <ejb-ref-name>stateless/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
+        <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.FieldInjectionStatelessBean</injection-target-class>
-          <injection-target-name>statelessBusinessRemote</injection-target-name>
+          <injection-target-name>statefulBusinessRemote</injection-target-name>
         </injection-target>
       </ejb-ref>
       <ejb-local-ref>
-        <ejb-ref-name>stateless/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-name>stateless/beanReferences/stateless-business-local</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.FieldInjectionStatelessBean</injection-target-class>
-          <injection-target-name>statefulBusinessLocal</injection-target-name>
+          <injection-target-name>statelessBusinessLocal</injection-target-name>
         </injection-target>
       </ejb-local-ref>
-      <ejb-ref>
-        <ejb-ref-name>stateless/beanReferences/stateful-business-remote</ejb-ref-name>
+      <ejb-local-ref>
+        <ejb-ref-name>stateless/beanReferences/stateful-business-local</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.FieldInjectionStatelessBean</injection-target-class>
-          <injection-target-name>statefulBusinessRemote</injection-target-name>
+          <injection-target-name>statefulBusinessLocal</injection-target-name>
         </injection-target>
-      </ejb-ref>
+      </ejb-local-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -3312,28 +3275,28 @@
           <injection-target-name>ejbContext</injection-target-name>
         </injection-target>
       </resource-env-ref>
-      <persistence-unit-ref>
+      <persistence-context-ref>
         <description>
-          Persistence unit for testing the functionality.
+          Persistence context for testing the functionality.
         </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.FieldInjectionStatelessBean</injection-target-class>
-          <injection-target-name>emf</injection-target-name>
+          <injection-target-name>em</injection-target-name>
         </injection-target>
-      </persistence-unit-ref>
-      <persistence-context-ref>
+      </persistence-context-ref>
+      <persistence-unit-ref>
         <description>
-          Persistence context for testing the functionality.
+          Persistence unit for testing the functionality.
         </description>
-        <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.FieldInjectionStatelessBean</injection-target-class>
-          <injection-target-name>em</injection-target-name>
+          <injection-target-name>emf</injection-target-name>
         </injection-target>
-      </persistence-context-ref>
+      </persistence-unit-ref>
     </session>
 
 
@@ -3464,46 +3427,46 @@
           <injection-target-name>statelessHome</injection-target-name>
         </injection-target>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateless/beanReferences/stateless-business-local</ejb-ref-name>
+      <ejb-ref>
+        <ejb-ref-name>stateless/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.SetterInjectionStatelessBean</injection-target-class>
-          <injection-target-name>statelessBusinessLocal</injection-target-name>
+          <injection-target-name>statelessBusinessRemote</injection-target-name>
         </injection-target>
-      </ejb-local-ref>
+      </ejb-ref>
       <ejb-ref>
-        <ejb-ref-name>stateless/beanReferences/stateless-business-remote</ejb-ref-name>
+        <ejb-ref-name>stateless/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
+        <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.SetterInjectionStatelessBean</injection-target-class>
-          <injection-target-name>statelessBusinessRemote</injection-target-name>
+          <injection-target-name>statefulBusinessRemote</injection-target-name>
         </injection-target>
       </ejb-ref>
       <ejb-local-ref>
-        <ejb-ref-name>stateless/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-name>stateless/beanReferences/stateless-business-local</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.SetterInjectionStatelessBean</injection-target-class>
-          <injection-target-name>statefulBusinessLocal</injection-target-name>
+          <injection-target-name>statelessBusinessLocal</injection-target-name>
         </injection-target>
       </ejb-local-ref>
-      <ejb-ref>
-        <ejb-ref-name>stateless/beanReferences/stateful-business-remote</ejb-ref-name>
+      <ejb-local-ref>
+        <ejb-ref-name>stateless/beanReferences/stateful-business-local</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.SetterInjectionStatelessBean</injection-target-class>
-          <injection-target-name>statefulBusinessRemote</injection-target-name>
+          <injection-target-name>statefulBusinessLocal</injection-target-name>
         </injection-target>
-      </ejb-ref>
+      </ejb-local-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -3548,28 +3511,28 @@
           <injection-target-name>ejbContext</injection-target-name>
         </injection-target>
       </resource-env-ref>
-      <persistence-unit-ref>
+      <persistence-context-ref>
         <description>
-          Persistence unit for testing the functionality.
+          Persistence context for testing the functionality.
         </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.SetterInjectionStatelessBean</injection-target-class>
-          <injection-target-name>emf</injection-target-name>
+          <injection-target-name>em</injection-target-name>
         </injection-target>
-      </persistence-unit-ref>
-      <persistence-context-ref>
+      </persistence-context-ref>
+      <persistence-unit-ref>
         <description>
-          Persistence context for testing the functionality.
+          Persistence unit for testing the functionality.
         </description>
-        <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.stateless.SetterInjectionStatelessBean</injection-target-class>
-          <injection-target-name>em</injection-target-name>
+          <injection-target-name>emf</injection-target-name>
         </injection-target>
-      </persistence-context-ref>
+      </persistence-unit-ref>
     </session>
 
     <!--
@@ -3668,10 +3631,6 @@
         <remote>org.apache.openejb.test.stateless.BasicStatelessObject</remote>
         <ejb-link>BasicStatelessBean</ejb-link>
       </ejb-ref>
-      <security-role-ref>
-        <role-name>TheMan</role-name>
-        <role-link>Executive</role-link>
-      </security-role-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -3696,13 +3655,6 @@
         <resource-env-ref-name>sessioncontext</resource-env-ref-name>
         <resource-env-ref-type>javax.ejb.SessionContext</resource-env-ref-type>
       </resource-env-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -3710,6 +3662,17 @@
         <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
+      <security-role-ref>
+        <role-name>TheMan</role-name>
+        <role-link>Executive</role-link>
+      </security-role-ref>
     </session>
 
     <!--
@@ -3808,10 +3771,6 @@
         <remote>org.apache.openejb.test.stateless.BasicStatelessObject</remote>
         <ejb-link>BasicStatelessBean</ejb-link>
       </ejb-ref>
-      <security-role-ref>
-        <role-name>TheMan</role-name>
-        <role-link>Executive</role-link>
-      </security-role-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -3836,13 +3795,6 @@
         <resource-env-ref-name>sessioncontext</resource-env-ref-name>
         <resource-env-ref-type>javax.ejb.SessionContext</resource-env-ref-type>
       </resource-env-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -3850,6 +3802,17 @@
         <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
+      <security-role-ref>
+        <role-name>TheMan</role-name>
+        <role-link>Executive</role-link>
+      </security-role-ref>
     </session>
 
     <!--
@@ -4060,32 +4023,32 @@
         <remote>org.apache.openejb.test.stateless.BasicStatelessObject</remote>
         <ejb-link>BasicStatelessBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>entity/bmp/beanReferences/stateless-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>entity/bmp/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>entity/bmp/beanReferences/stateful-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>entity/bmp/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
       </ejb-ref>
-      <resource-ref>
-        <res-ref-name>datasource</res-ref-name>
+      <ejb-local-ref>
+        <ejb-ref-name>entity/bmp/beanReferences/stateless-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
+      </ejb-local-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>entity/bmp/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
+      </ejb-local-ref>
+      <resource-ref>
+        <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
       </resource-ref>
@@ -4109,13 +4072,6 @@
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
       </resource-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -4123,6 +4079,13 @@
         <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
     </entity>
 
     <!--
@@ -4234,13 +4197,6 @@
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
       </resource-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -4248,6 +4204,13 @@
         <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
     </entity>
 
     <!--
@@ -4311,11 +4274,6 @@
           <activation-config-property-value>BasicMdb</activation-config-property-value>
         </activation-config-property>
       </activation-config>
-      <resource-ref>
-        <res-ref-name>jms</res-ref-name>
-        <res-type>javax.jms.ConnectionFactory</res-type>
-        <res-auth>Container</res-auth>
-      </resource-ref>
       <env-entry>
         <env-entry-name>stateless/references/JNDI_access_to_java_comp_env</env-entry-name>
         <env-entry-type>java.lang.String</env-entry-type>
@@ -4329,6 +4287,11 @@
         <ejb-link>BasicStatefulBean</ejb-link>
       </ejb-ref>
       <resource-ref>
+        <res-ref-name>jms</res-ref-name>
+        <res-type>javax.jms.ConnectionFactory</res-type>
+        <res-auth>Container</res-auth>
+      </resource-ref>
+      <resource-ref>
         <description>
           This is a reference to a JDBC database.
         </description>
@@ -4354,11 +4317,6 @@
           <activation-config-property-value>BasicBmtMdb</activation-config-property-value>
         </activation-config-property>
       </activation-config>
-      <resource-ref>
-        <res-ref-name>jms</res-ref-name>
-        <res-type>javax.jms.ConnectionFactory</res-type>
-        <res-auth>Container</res-auth>
-      </resource-ref>
       <env-entry>
         <env-entry-name>stateless/references/JNDI_access_to_java_comp_env</env-entry-name>
         <env-entry-type>java.lang.String</env-entry-type>
@@ -4372,6 +4330,11 @@
         <ejb-link>BasicStatefulBean</ejb-link>
       </ejb-ref>
       <resource-ref>
+        <res-ref-name>jms</res-ref-name>
+        <res-type>javax.jms.ConnectionFactory</res-type>
+        <res-auth>Container</res-auth>
+      </resource-ref>
+      <resource-ref>
         <description>
           This is a reference to a JDBC database.
         </description>
@@ -4477,30 +4440,30 @@
         <remote>org.apache.openejb.test.stateless.BasicStatelessObject</remote>
         <ejb-link>BasicStatelessBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateless/beanReferences/stateless-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>stateless/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateless/beanReferences/stateful-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>stateless/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
       </ejb-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>stateless/beanReferences/stateless-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
+      </ejb-local-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>stateless/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
+      </ejb-local-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -4525,13 +4488,6 @@
         <resource-env-ref-name>mdbcontext</resource-env-ref-name>
         <resource-env-ref-type>javax.ejb.MessageDrivenContext</resource-env-ref-type>
       </resource-env-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -4539,6 +4495,13 @@
         <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
     </message-driven>
 
     <message-driven>
@@ -4637,30 +4600,30 @@
         <remote>org.apache.openejb.test.stateless.BasicStatelessObject</remote>
         <ejb-link>BasicStatelessBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateless/beanReferences/stateless-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>stateless/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateless/beanReferences/stateful-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>stateless/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
       </ejb-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>stateless/beanReferences/stateless-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
+      </ejb-local-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>stateless/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
+      </ejb-local-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -4685,13 +4648,6 @@
         <resource-env-ref-name>mdbcontext</resource-env-ref-name>
         <resource-env-ref-type>javax.ejb.MessageDrivenContext</resource-env-ref-type>
       </resource-env-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -4699,6 +4655,13 @@
         <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
     </message-driven>
 
     <message-driven>
@@ -4797,30 +4760,30 @@
         <remote>org.apache.openejb.test.stateless.BasicStatelessObject</remote>
         <ejb-link>BasicStatelessBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateless/beanReferences/stateless-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>stateless/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateless/beanReferences/stateful-business-local</ejb-ref-name>
-        <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
-      </ejb-local-ref>
       <ejb-ref>
         <ejb-ref-name>stateless/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
       </ejb-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>stateless/beanReferences/stateless-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
+      </ejb-local-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>stateless/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
+      </ejb-local-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -4845,13 +4808,6 @@
         <resource-env-ref-name>mdbcontext</resource-env-ref-name>
         <resource-env-ref-type>javax.ejb.MessageDrivenContext</resource-env-ref-type>
       </resource-env-ref>
-      <persistence-unit-ref>
-        <description>
-          Persistence unit for testing the functionality.
-        </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
-        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
-      </persistence-unit-ref>
       <persistence-context-ref>
         <description>
           Persistence context for testing the functionality.
@@ -4859,6 +4815,13 @@
         <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
       </persistence-context-ref>
+      <persistence-unit-ref>
+        <description>
+          Persistence unit for testing the functionality.
+        </description>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+      </persistence-unit-ref>
     </message-driven>
 
     <message-driven>
@@ -4876,12 +4839,6 @@
         </activation-config-property>
       </activation-config>
 
-      <resource-ref>
-        <res-ref-name>jms</res-ref-name>
-        <res-type>javax.jms.ConnectionFactory</res-type>
-        <res-auth>Container</res-auth>
-      </resource-ref>
-
       <env-entry>
         <env-entry-name>stateful/references/Boolean</env-entry-name>
         <env-entry-type>java.lang.Boolean</env-entry-type>
@@ -5037,6 +4994,11 @@
         </injection-target>
       </ejb-ref>
       <resource-ref>
+        <res-ref-name>jms</res-ref-name>
+        <res-type>javax.jms.ConnectionFactory</res-type>
+        <res-auth>Container</res-auth>
+      </resource-ref>
+      <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
@@ -5118,13 +5080,6 @@
           <activation-config-property-value>SetterInjectionMdbBean</activation-config-property-value>
         </activation-config-property>
       </activation-config>
-
-      <resource-ref>
-        <res-ref-name>jms</res-ref-name>
-        <res-type>javax.jms.ConnectionFactory</res-type>
-        <res-auth>Container</res-auth>
-      </resource-ref>
-
       <env-entry>
         <env-entry-name>stateful/references/Boolean</env-entry-name>
         <env-entry-type>java.lang.Boolean</env-entry-type>
@@ -5239,46 +5194,51 @@
           <injection-target-name>statelessHome</injection-target-name>
         </injection-target>
       </ejb-ref>
-      <ejb-local-ref>
-        <ejb-ref-name>stateful/beanReferences/stateless-business-local</ejb-ref-name>
+      <ejb-ref>
+        <ejb-ref-name>stateful/beanReferences/stateless-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
         <ejb-link>BasicStatelessPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.mdb.SetterInjectionMdbBean</injection-target-class>
-          <injection-target-name>statelessBusinessLocal</injection-target-name>
+          <injection-target-name>statelessBusinessRemote</injection-target-name>
         </injection-target>
-      </ejb-local-ref>
+      </ejb-ref>
       <ejb-ref>
-        <ejb-ref-name>stateful/beanReferences/stateless-business-remote</ejb-ref-name>
+        <ejb-ref-name>stateful/beanReferences/stateful-business-remote</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <remote>org.apache.openejb.test.stateless.BasicStatelessBusinessRemote</remote>
-        <ejb-link>BasicStatelessPojoBean</ejb-link>
+        <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
+        <ejb-link>BasicStatefulPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.mdb.SetterInjectionMdbBean</injection-target-class>
-          <injection-target-name>statelessBusinessRemote</injection-target-name>
+          <injection-target-name>statefulBusinessRemote</injection-target-name>
         </injection-target>
       </ejb-ref>
       <ejb-local-ref>
-        <ejb-ref-name>stateful/beanReferences/stateful-business-local</ejb-ref-name>
+        <ejb-ref-name>stateful/beanReferences/stateless-business-local</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
-        <ejb-link>BasicStatefulPojoBean</ejb-link>
+        <local>org.apache.openejb.test.stateless.BasicStatelessBusinessLocal</local>
+        <ejb-link>BasicStatelessPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.mdb.SetterInjectionMdbBean</injection-target-class>
-          <injection-target-name>statefulBusinessLocal</injection-target-name>
+          <injection-target-name>statelessBusinessLocal</injection-target-name>
         </injection-target>
       </ejb-local-ref>
-      <ejb-ref>
-        <ejb-ref-name>stateful/beanReferences/stateful-business-remote</ejb-ref-name>
+      <ejb-local-ref>
+        <ejb-ref-name>stateful/beanReferences/stateful-business-local</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <remote>org.apache.openejb.test.stateful.BasicStatefulBusinessRemote</remote>
+        <local>org.apache.openejb.test.stateful.BasicStatefulBusinessLocal</local>
         <ejb-link>BasicStatefulPojoBean</ejb-link>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.mdb.SetterInjectionMdbBean</injection-target-class>
-          <injection-target-name>statefulBusinessRemote</injection-target-name>
+          <injection-target-name>statefulBusinessLocal</injection-target-name>
         </injection-target>
-      </ejb-ref>
+      </ejb-local-ref>
+      <resource-ref>
+        <res-ref-name>jms</res-ref-name>
+        <res-type>javax.jms.ConnectionFactory</res-type>
+        <res-auth>Container</res-auth>
+      </resource-ref>
       <resource-ref>
         <res-ref-name>datasource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
@@ -5323,32 +5283,68 @@
           <injection-target-name>ejbContext</injection-target-name>
         </injection-target>
       </resource-env-ref>
-      <persistence-unit-ref>
+      <persistence-context-ref>
         <description>
-          Persistence unit for testing the functionality.
+          Persistence context for testing the functionality.
         </description>
-        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+        <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.mdb.SetterInjectionMdbBean</injection-target-class>
-          <injection-target-name>emf</injection-target-name>
+          <injection-target-name>em</injection-target-name>
         </injection-target>
-      </persistence-unit-ref>
-      <persistence-context-ref>
+      </persistence-context-ref>
+      <persistence-unit-ref>
         <description>
-          Persistence context for testing the functionality.
+          Persistence unit for testing the functionality.
         </description>
-        <persistence-context-ref-name>persistence/TestContext</persistence-context-ref-name>
+        <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
         <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
         <injection-target>
           <injection-target-class>org.apache.openejb.test.mdb.SetterInjectionMdbBean</injection-target-class>
-          <injection-target-name>em</injection-target-name>
+          <injection-target-name>emf</injection-target-name>
         </injection-target>
-      </persistence-context-ref>
+      </persistence-unit-ref>
     </message-driven>
 
   </enterprise-beans>
 
+  <interceptors>
+    <interceptor>
+      <interceptor-class>
+        org.apache.openejb.test.interceptor.SecondClassInterceptor
+      </interceptor-class>
+    </interceptor>
+    <interceptor>
+      <interceptor-class>
+        org.apache.openejb.test.interceptor.DDInterceptor
+      </interceptor-class>
+      <around-invoke>
+        <method-name>ddInterceptor</method-name>
+      </around-invoke>
+      <post-construct>
+        <lifecycle-callback-method>
+          ddInterceptorPostConstruct
+        </lifecycle-callback-method>
+      </post-construct>
+      <pre-destroy>
+        <lifecycle-callback-method>
+          ddInterceptorPreDestroy
+        </lifecycle-callback-method>
+      </pre-destroy>
+      <post-activate>
+        <lifecycle-callback-method>
+          ddInterceptorPostActivate
+        </lifecycle-callback-method>
+      </post-activate>
+      <pre-passivate>
+        <lifecycle-callback-method>
+          ddInterceptorPrePassivate
+        </lifecycle-callback-method>
+      </pre-passivate>
+    </interceptor>
+  </interceptors>
+
   <relationships>
 
     <!-- One to One -->
@@ -5826,6 +5822,58 @@
       </method>
       <trans-attribute>Required</trans-attribute>
     </container-transaction>
+
+    <!-- test01_interceptorChaining
+    to test specifying an interceptor from a DD at the method level.
+    It should be invoked only after any method level interceptors defined by annotations on that method.
+    -->
+    <interceptor-binding>
+      <ejb-name>BasicStatefulIntercepted</ejb-name>
+      <interceptor-class>
+        org.apache.openejb.test.interceptor.DDInterceptor
+      </interceptor-class>
+      <method>
+        <method-name>reverse</method-name>
+      </method>
+    </interceptor-binding>
+
+    <!-- test04_excludeClassInterceptors_02 to test exclude-class-interceptor on a method level -->
+    <interceptor-binding>
+      <ejb-name>BasicStatefulIntercepted</ejb-name>
+      <exclude-class-interceptors>true</exclude-class-interceptors>
+      <method>
+        <method-name>concat</method-name>
+      </method>
+    </interceptor-binding>
+
+
+    <!--  test01_interceptorChaining
+    This interceptor applies and also changes the order of class level interceptors invoked on BasicStatelessIntercepted.
+    -->
+    <interceptor-binding>
+      <ejb-name>BasicStatelessIntercepted</ejb-name>
+      <interceptor-order>
+        <interceptor-class>
+          org.apache.openejb.test.interceptor.DDInterceptor
+        </interceptor-class>
+        <interceptor-class>
+          org.apache.openejb.test.interceptor.SecondClassInterceptor
+        </interceptor-class>
+        <interceptor-class>
+          org.apache.openejb.test.interceptor.ClassInterceptor
+        </interceptor-class>
+      </interceptor-order>
+    </interceptor-binding>
+
+    <!-- test04_excludeClassInterceptors_02 to test exclude-class-interceptor on a method level -->
+    <interceptor-binding>
+      <ejb-name>BasicStatelessIntercepted</ejb-name>
+      <exclude-class-interceptors>true</exclude-class-interceptors>
+      <method>
+        <method-name>concat</method-name>
+      </method>
+    </interceptor-binding>
+
     <message-destination>
       <message-destination-name>BasicMdb</message-destination-name>
     </message-destination>
@@ -5847,58 +5895,5 @@
     <message-destination>
       <message-destination-name>SetterInjectionMdbBean</message-destination-name>
     </message-destination>
-    
-     <!-- test01_interceptorChaining   
-     to test specifying an interceptor from a DD at the method level.
-     It should be invoked only after any method level interceptors defined by annotations on that method.
-     -->
-     <interceptor-binding>
-     	<ejb-name>BasicStatefulIntercepted</ejb-name>
-     	<interceptor-class>
-     		org.apache.openejb.test.interceptor.DDInterceptor
-     	</interceptor-class>
-     	<method>
-     		<method-name>reverse</method-name>
-     	</method>
-     </interceptor-binding>
- 
-      <!-- test04_excludeClassInterceptors_02
-        to test exclude-class-interceptor on a method level -->        
-     <interceptor-binding>
-     	<ejb-name>BasicStatefulIntercepted</ejb-name>
-     	<exclude-class-interceptors>true</exclude-class-interceptors>
-     	<method>
-     		<method-name>concat</method-name>
-     	</method>
-     </interceptor-binding>
-     
-         
-     <!--  test01_interceptorChaining  
-     This interceptor applies and also changes the order of class level interceptors invoked on BasicStatelessIntercepted.
-     -->
-     <interceptor-binding>
-     	<ejb-name>BasicStatelessIntercepted</ejb-name>
-     	<interceptor-order>    	
-     	    <interceptor-class>
-     			org.apache.openejb.test.interceptor.DDInterceptor
-     		</interceptor-class>    		
-     		<interceptor-class>
-     			org.apache.openejb.test.interceptor.SecondClassInterceptor
-     		</interceptor-class>
-     		<interceptor-class>
-     			org.apache.openejb.test.interceptor.ClassInterceptor
-     		</interceptor-class>
-     	</interceptor-order>
-     </interceptor-binding>
-     
-     <!-- test04_excludeClassInterceptors_02
-     to test exclude-class-interceptor on a method level -->        
-     <interceptor-binding>
-     	<ejb-name>BasicStatelessIntercepted</ejb-name>
-     	<exclude-class-interceptors>true</exclude-class-interceptors>
-     	<method>
-     		<method-name>concat</method-name>
-     	</method>
-     </interceptor-binding>       
   </assembly-descriptor>
 </ejb-jar>

Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/HsqldbTestDatabase.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/HsqldbTestDatabase.java?rev=607045&r1=607044&r2=607045&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/HsqldbTestDatabase.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/HsqldbTestDatabase.java Thu Dec 27 04:10:23 2007
@@ -172,11 +172,7 @@
     public void start() throws IllegalStateException {
         try {
             TestServer server = TestManager.getServer();
-            System.out.println("test server = " + server.getClass().getName());
             Properties properties = server.getContextEnvironment();
-            for (Map.Entry<Object, Object> entry : properties.entrySet()) {
-                System.out.println("entry = " + entry.getKey() +":"+entry.getValue());
-            }
             initialContext = new InitialContext(properties);
         } catch (Exception e) {
             throw (IllegalStateException) new IllegalStateException("Cannot create initial context: " + e.getClass().getName() + " " + e.getMessage()).initCause(e);

Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java?rev=607045&r1=607044&r2=607045&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java Thu Dec 27 04:10:23 2007
@@ -32,7 +32,6 @@
 import org.apache.xbean.finder.ClassFinder;
 
 /**
- * 
  * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
  * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
  */

Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessLocalBusinessIntfcTests.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessLocalBusinessIntfcTests.java?rev=607045&r1=607044&r2=607045&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessLocalBusinessIntfcTests.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessLocalBusinessIntfcTests.java Thu Dec 27 04:10:23 2007
@@ -128,11 +128,7 @@
     //=================================
     
     public void test06_testRemove(){
-        Object obj =businessLocal.remove();
+        Object obj = businessLocal.remove();
         assertNotNull(obj);
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
     }
 }

Modified: openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/SecondStatefulInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/SecondStatefulInterceptedBean.java?rev=607045&r1=607044&r2=607045&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/SecondStatefulInterceptedBean.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/SecondStatefulInterceptedBean.java Thu Dec 27 04:10:23 2007
@@ -36,8 +36,6 @@
 import org.apache.openejb.test.interceptor.SecondClassInterceptor;
 
 /**
- * 
- *
  * @version $Rev$ $Date$
  */
 @Stateful(name="SecondStatefulIntercepted")
@@ -49,7 +47,6 @@
 
     /**
      * A simple dummy business method to concat 2 strings
-     * @see org.apache.openejb.test.Stateful.fulInterceptedLocal#concat(java.lang.String, java.lang.String)
      */
     public String concat(String str1, String str2) {
         return str1.concat(str2);
@@ -57,11 +54,9 @@
 
     /**
      * A simple dummy busines method to reverse a string
-     * @see org.apache.openejb.test.Stateful.fulInterceptedLocal#reverse(java.lang.String)
      */
     @Interceptors({MethodInterceptor.class})
     public String reverse(String str) {
-        System.out.println("Reversing " + str);
         StringBuffer b = new StringBuffer(str);
         return b.reverse().toString();
     }
@@ -77,7 +72,7 @@
     }
 
     /**
-     * @param contextData the contextData to set
+     * @param ctxData the contextData to set
      */
     private void setContextData(Map<String, Object> ctxData) {
         SecondStatefulInterceptedBean.contextData.putAll(ctxData);
@@ -95,13 +90,12 @@
      * the invocation of proceed in the last interceptor method in the chain is a no-op, and null is returned. 
      * If there is more than one such interceptor method, the invocation of proceed causes the container to execute those methods in order.
      * 
-     * @throws runtime exceptions or application exceptions that are allowed in the throws clause of the business method.
+     * @throws Exception runtime exceptions or application exceptions that are allowed in the throws clause of the business method.
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
         Map<String, Object> ctxData = Interceptor.profile(ctx, "inBeanInterceptor");
         setContextData(ctxData);
-    
         return ctx.proceed();
     }
 
@@ -109,13 +103,12 @@
      * The interceptor method. 
      * This should intercept postConstruct of the bean
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
         Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostConstruct");
         setContextData(ctxData);
-        return;
     }
     
     
@@ -123,39 +116,36 @@
      * The interceptor method. 
      * This should intercept postActivate of the bean
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PostActivate
     public void inBeanInterceptorPostActivate() throws Exception {
         Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostActivate");
         setContextData(ctxData);
-        return;
     }
     
     /**
      * The interceptor method. 
      * This should intercept prePassivate of the bean.
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PrePassivate
     public void inBeanInterceptorPrePassivate() throws Exception {
         Map<String, Object> ctxData = Interceptor.profile(this, Thread.currentThread().getStackTrace()[4].getMethodName());
         setContextData(ctxData);
-        return;
     }
     
     /**
      * The interceptor method. 
      * This should intercept preDestroy of the bean.
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {
         Map<String, Object> ctxData = Interceptor.profile(this, Thread.currentThread().getStackTrace()[4].getMethodName());
         setContextData(ctxData);
-        return;
     }
     
     

Modified: openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptedBean.java?rev=607045&r1=607044&r2=607045&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptedBean.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptedBean.java Thu Dec 27 04:10:23 2007
@@ -57,7 +57,6 @@
      */
     @Interceptors({MethodInterceptor.class})
     public String reverse(String str) {
-        System.out.println("Reversing " + str);
         StringBuffer b = new StringBuffer(str);
         return b.reverse().toString();
     }



Mime
View raw message