You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2011/10/29 06:54:42 UTC

svn commit: r1190757 [5/15] - in /openejb/trunk/openejb/examples: access-timeout-meta/src/main/java/org/superbiz/accesstimeout/ alternate-descriptors/ application-composer/ applicationexception/ applicationexception/src/test/java/org/superbiz/appexcept...

Added: openejb/trunk/openejb/examples/injection-of-env-entry/README.md
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/injection-of-env-entry/README.md?rev=1190757&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/injection-of-env-entry/README.md (added)
+++ openejb/trunk/openejb/examples/injection-of-env-entry/README.md Sat Oct 29 04:54:40 2011
@@ -0,0 +1,239 @@
+[INFO] Scanning for projects...
+[INFO]                                                                         
+[INFO] ------------------------------------------------------------------------
+[INFO] Building OpenEJB :: Examples :: @Resource env-entry Injection 1.0
+[INFO] ------------------------------------------------------------------------
+[INFO] 
+[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ injection-of-env-entry ---
+[INFO] Deleting /Users/dblevins/examples/injection-of-env-entry/target
+[INFO] 
+[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ injection-of-env-entry ---
+[INFO] Using 'UTF-8' encoding to copy filtered resources.
+[INFO] Copying 1 resource
+[INFO] 
+[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ injection-of-env-entry ---
+[INFO] Compiling 3 source files to /Users/dblevins/examples/injection-of-env-entry/target/classes
+[INFO] 
+[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ injection-of-env-entry ---
+[INFO] Using 'UTF-8' encoding to copy filtered resources.
+[INFO] skip non existing resourceDirectory /Users/dblevins/examples/injection-of-env-entry/src/test/resources
+[INFO] 
+[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ injection-of-env-entry ---
+[INFO] Compiling 1 source file to /Users/dblevins/examples/injection-of-env-entry/target/test-classes
+[INFO] 
+[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ injection-of-env-entry ---
+[INFO] Surefire report directory: /Users/dblevins/examples/injection-of-env-entry/target/surefire-reports
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.injection.enventry.ConfigurationTest
+Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
+http://openejb.apache.org/
+INFO - openejb.home = /Users/dblevins/examples/injection-of-env-entry
+INFO - openejb.base = /Users/dblevins/examples/injection-of-env-entry
+INFO - Using 'javax.ejb.embeddable.EJBContainer=true'
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Found EjbModule in classpath: /Users/dblevins/examples/injection-of-env-entry/target/classes
+INFO - Beginning load: /Users/dblevins/examples/injection-of-env-entry/target/classes
+INFO - Configuring enterprise application: /Users/dblevins/examples/injection-of-env-entry
+WARN - Method 'lookup' is not available for 'javax.annotation.Resource'. Probably using an older Runtime.
+INFO - Configuring Service(id=Default Singleton Container, type=Container, provider-id=Default Singleton Container)
+INFO - Auto-creating a container for bean Configuration: Container(type=SINGLETON, id=Default Singleton Container)
+INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
+INFO - Auto-creating a container for bean org.superbiz.injection.enventry.ConfigurationTest: Container(type=MANAGED, id=Default Managed Container)
+INFO - Enterprise application "/Users/dblevins/examples/injection-of-env-entry" loaded.
+INFO - Assembling app: /Users/dblevins/examples/injection-of-env-entry
+INFO - Jndi(name="java:global/injection-of-env-entry/Configuration!org.superbiz.injection.enventry.Configuration")
+INFO - Jndi(name="java:global/injection-of-env-entry/Configuration")
+INFO - Jndi(name="java:global/EjbModule1046388151/org.superbiz.injection.enventry.ConfigurationTest!org.superbiz.injection.enventry.ConfigurationTest")
+INFO - Jndi(name="java:global/EjbModule1046388151/org.superbiz.injection.enventry.ConfigurationTest")
+INFO - Created Ejb(deployment-id=org.superbiz.injection.enventry.ConfigurationTest, ejb-name=org.superbiz.injection.enventry.ConfigurationTest, container=Default Managed Container)
+INFO - Created Ejb(deployment-id=Configuration, ejb-name=Configuration, container=Default Singleton Container)
+INFO - Started Ejb(deployment-id=org.superbiz.injection.enventry.ConfigurationTest, ejb-name=org.superbiz.injection.enventry.ConfigurationTest, container=Default Managed Container)
+INFO - Started Ejb(deployment-id=Configuration, ejb-name=Configuration, container=Default Singleton Container)
+INFO - Deployed Application(path=/Users/dblevins/examples/injection-of-env-entry)
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.456 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+[INFO] 
+[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ injection-of-env-entry ---
+[INFO] Building jar: /Users/dblevins/examples/injection-of-env-entry/target/injection-of-env-entry-1.0.jar
+[INFO] 
+[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ injection-of-env-entry ---
+[INFO] Installing /Users/dblevins/examples/injection-of-env-entry/target/injection-of-env-entry-1.0.jar to /Users/dblevins/.m2/repository/org/superbiz/injection-of-env-entry/1.0/injection-of-env-entry-1.0.jar
+[INFO] Installing /Users/dblevins/examples/injection-of-env-entry/pom.xml to /Users/dblevins/.m2/repository/org/superbiz/injection-of-env-entry/1.0/injection-of-env-entry-1.0.pom
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 4.491s
+[INFO] Finished at: Fri Oct 28 17:02:29 PDT 2011
+[INFO] Final Memory: 14M/81M
+[INFO] ------------------------------------------------------------------------
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+    package org.superbiz.injection.enventry;
+    
+    import javax.annotation.Resource;
+    import javax.ejb.Singleton;
+    import java.util.Date;
+    
+    /**
+     * This example demostrates the use of the injection of environment entries
+     * using <b>Resource</b> annotation.
+     * <p/>
+     * "EJB Core Contracts and Requirements" specification section 16.4.1.1.
+     *
+     * @version $Rev: 1090807 $ $Date: 2011-04-10 07:12:31 -0700 (Sun, 10 Apr 2011) $
+     */
+    //START SNIPPET: code
+    @Singleton
+    public class Configuration {
+    
+        @Resource
+        private String color;
+    
+        @Resource
+        private Shape shape;
+    
+        @Resource
+        private Class strategy;
+    
+        @Resource(name = "date")
+        private long date;
+    
+        public String getColor() {
+            return color;
+        }
+    
+        public Shape getShape() {
+            return shape;
+        }
+    
+        public Class getStrategy() {
+            return strategy;
+        }
+    
+        public Date getDate() {
+            return new Date(date);
+        }
+    }
+    //END SNIPPET: code
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+        * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+    package org.superbiz.injection.enventry;
+    
+    /**
+     * @version $Revision$ $Date$
+     */
+    public enum Shape {
+    
+        CIRCLE,
+        TRIANGLE,
+        SQUARE
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.injection.enventry;
+    
+    /**
+     * Exists to show that any class object can be injected and does
+     * not need to be loaded directly in app code.
+     *
+     * @version $Revision$ $Date$
+     */
+    public class Widget {
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+    package org.superbiz.injection.enventry;
+    
+    import junit.framework.TestCase;
+    
+    import javax.ejb.embeddable.EJBContainer;
+    import javax.naming.Context;
+    import java.util.Date;
+    
+    //START SNIPPET: code
+    public class ConfigurationTest extends TestCase {
+    
+    
+        public void test() throws Exception {
+            final Context context = EJBContainer.createEJBContainer().getContext();
+    
+            final Configuration configuration = (Configuration) context.lookup("java:global/injection-of-env-entry/Configuration");
+    
+            assertEquals("orange", configuration.getColor());
+    
+            assertEquals(Shape.TRIANGLE, configuration.getShape());
+    
+            assertEquals(Widget.class, configuration.getStrategy());
+    
+            assertEquals(new Date(123456789), configuration.getDate());
+        }
+    }
+    //END SNIPPET: code
+     
+    
+    

Added: openejb/trunk/openejb/examples/interceptors/README.md
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/interceptors/README.md?rev=1190757&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/interceptors/README.md (added)
+++ openejb/trunk/openejb/examples/interceptors/README.md Sat Oct 29 04:54:40 2011
@@ -0,0 +1,1063 @@
+[INFO] Scanning for projects...
+[INFO]                                                                         
+[INFO] ------------------------------------------------------------------------
+[INFO] Building OpenEJB :: Examples :: Interceptors 1.0
+[INFO] ------------------------------------------------------------------------
+[INFO] 
+[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ interceptors ---
+[INFO] Deleting /Users/dblevins/examples/interceptors/target
+[INFO] 
+[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ interceptors ---
+[INFO] Using 'UTF-8' encoding to copy filtered resources.
+[INFO] Copying 1 resource
+[INFO] 
+[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ interceptors ---
+[INFO] Compiling 20 source files to /Users/dblevins/examples/interceptors/target/classes
+[INFO] 
+[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ interceptors ---
+[INFO] Using 'UTF-8' encoding to copy filtered resources.
+[INFO] skip non existing resourceDirectory /Users/dblevins/examples/interceptors/src/test/resources
+[INFO] 
+[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ interceptors ---
+[INFO] Compiling 4 source files to /Users/dblevins/examples/interceptors/target/test-classes
+[INFO] 
+[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ interceptors ---
+[INFO] Surefire report directory: /Users/dblevins/examples/interceptors/target/surefire-reports
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.interceptors.FullyInterceptedTest
+Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
+http://openejb.apache.org/
+INFO - openejb.home = /Users/dblevins/examples/interceptors
+INFO - openejb.base = /Users/dblevins/examples/interceptors
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Using 'openejb.deployments.classpath.include=.*interceptors/target/classes.*'
+INFO - Found EjbModule in classpath: /Users/dblevins/examples/interceptors/target/classes
+INFO - Beginning load: /Users/dblevins/examples/interceptors/target/classes
+INFO - Configuring enterprise application: /Users/dblevins/examples/interceptors/classpath.ear
+INFO - Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container)
+INFO - Auto-creating a container for bean FullyInterceptedBean: Container(type=STATELESS, id=Default Stateless Container)
+INFO - Enterprise application "/Users/dblevins/examples/interceptors/classpath.ear" loaded.
+INFO - Assembling app: /Users/dblevins/examples/interceptors/classpath.ear
+INFO - Jndi(name=FullyInterceptedBeanLocal) --> Ejb(deployment-id=FullyInterceptedBean)
+INFO - Jndi(name=global/classpath.ear/interceptors/FullyInterceptedBean!org.superbiz.interceptors.FullyIntercepted) --> Ejb(deployment-id=FullyInterceptedBean)
+INFO - Jndi(name=global/classpath.ear/interceptors/FullyInterceptedBean) --> Ejb(deployment-id=FullyInterceptedBean)
+INFO - Jndi(name=ThirdSLSBeanLocal) --> Ejb(deployment-id=ThirdSLSBean)
+INFO - Jndi(name=global/classpath.ear/interceptors/ThirdSLSBean!org.superbiz.interceptors.ThirdSLSBeanLocal) --> Ejb(deployment-id=ThirdSLSBean)
+INFO - Jndi(name=global/classpath.ear/interceptors/ThirdSLSBean) --> Ejb(deployment-id=ThirdSLSBean)
+INFO - Jndi(name=SecondStatelessInterceptedBeanLocal) --> Ejb(deployment-id=SecondStatelessInterceptedBean)
+INFO - Jndi(name=global/classpath.ear/interceptors/SecondStatelessInterceptedBean!org.superbiz.interceptors.SecondStatelessInterceptedLocal) --> Ejb(deployment-id=SecondStatelessInterceptedBean)
+INFO - Jndi(name=global/classpath.ear/interceptors/SecondStatelessInterceptedBean) --> Ejb(deployment-id=SecondStatelessInterceptedBean)
+INFO - Jndi(name=MethodLevelInterceptorOnlySLSBeanLocal) --> Ejb(deployment-id=MethodLevelInterceptorOnlySLSBean)
+INFO - Jndi(name=global/classpath.ear/interceptors/MethodLevelInterceptorOnlySLSBean!org.superbiz.interceptors.MethodLevelInterceptorOnlyParent) --> Ejb(deployment-id=MethodLevelInterceptorOnlySLSBean)
+INFO - Jndi(name=global/classpath.ear/interceptors/MethodLevelInterceptorOnlySLSBean) --> Ejb(deployment-id=MethodLevelInterceptorOnlySLSBean)
+INFO - Created Ejb(deployment-id=ThirdSLSBean, ejb-name=ThirdSLSBean, container=Default Stateless Container)
+INFO - Created Ejb(deployment-id=SecondStatelessInterceptedBean, ejb-name=SecondStatelessInterceptedBean, container=Default Stateless Container)
+INFO - Created Ejb(deployment-id=FullyInterceptedBean, ejb-name=FullyInterceptedBean, container=Default Stateless Container)
+INFO - Created Ejb(deployment-id=MethodLevelInterceptorOnlySLSBean, ejb-name=MethodLevelInterceptorOnlySLSBean, container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=ThirdSLSBean, ejb-name=ThirdSLSBean, container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=SecondStatelessInterceptedBean, ejb-name=SecondStatelessInterceptedBean, container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=FullyInterceptedBean, ejb-name=FullyInterceptedBean, container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=MethodLevelInterceptorOnlySLSBean, ejb-name=MethodLevelInterceptorOnlySLSBean, container=Default Stateless Container)
+INFO - Deployed Application(path=/Users/dblevins/examples/interceptors/classpath.ear)
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.603 sec
+Running org.superbiz.interceptors.MethodLevelInterceptorOnlyTest
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec
+Running org.superbiz.interceptors.SecondStatelessInterceptedTest
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec
+Running org.superbiz.interceptors.ThirdSLSBeanTest
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec
+
+Results :
+
+Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
+
+[INFO] 
+[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ interceptors ---
+[INFO] Building jar: /Users/dblevins/examples/interceptors/target/interceptors-1.0.jar
+[INFO] 
+[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ interceptors ---
+[INFO] Installing /Users/dblevins/examples/interceptors/target/interceptors-1.0.jar to /Users/dblevins/.m2/repository/org/superbiz/interceptors/1.0/interceptors-1.0.jar
+[INFO] Installing /Users/dblevins/examples/interceptors/pom.xml to /Users/dblevins/.m2/repository/org/superbiz/interceptors/1.0/interceptors-1.0.pom
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 4.931s
+[INFO] Finished at: Fri Oct 28 17:02:54 PDT 2011
+[INFO] Final Memory: 14M/81M
+[INFO] ------------------------------------------------------------------------
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.InvocationContext;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class ClassLevelInterceptorOne {
+    
+        @AroundInvoke
+        protected Object businessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.InvocationContext;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class ClassLevelInterceptorSuperClassOne {
+    
+        @AroundInvoke
+        protected Object businessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.InvocationContext;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class ClassLevelInterceptorSuperClassTwo extends SuperClassOfClassLevelInterceptor {
+    
+        @AroundInvoke
+        protected Object businessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.InvocationContext;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class ClassLevelInterceptorTwo {
+    
+        @AroundInvoke
+        protected Object businessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.annotation.PostConstruct;
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.InvocationContext;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class DefaultInterceptorOne {
+    
+        @AroundInvoke
+        protected Object businessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    
+        @PostConstruct
+        protected void postConstructInterceptor(InvocationContext ic) throws Exception {
+            Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.InvocationContext;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class DefaultInterceptorTwo {
+    
+        @AroundInvoke
+        protected Object businessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import java.util.List;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public interface FullyIntercepted {
+    
+        List<String> businessMethod();
+    
+        List<String> methodWithDefaultInterceptorsExcluded();
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.ejb.Local;
+    import javax.ejb.Stateless;
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.Interceptors;
+    import javax.interceptor.InvocationContext;
+    import java.util.ArrayList;
+    import java.util.List;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    @Stateless
+    @Local
+    @Interceptors({ClassLevelInterceptorOne.class, ClassLevelInterceptorTwo.class})
+    public class FullyInterceptedBean extends FullyInterceptedSuperClass implements FullyIntercepted {
+    
+        @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class})
+        public List<String> businessMethod() {
+            List<String> list = new ArrayList<String>();
+            list.add("businessMethod");
+            return list;
+        }
+    
+        @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class})
+        public List<String> methodWithDefaultInterceptorsExcluded() {
+            List<String> list = new ArrayList<String>();
+            list.add("methodWithDefaultInterceptorsExcluded");
+            return list;
+        }
+    
+        @AroundInvoke
+        protected Object beanClassBusinessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, "beanClassBusinessMethodInterceptor");
+        }
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.interceptor.Interceptors;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    @Interceptors({ClassLevelInterceptorSuperClassOne.class, ClassLevelInterceptorSuperClassTwo.class})
+    public class FullyInterceptedSuperClass {
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.InvocationContext;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class MethodLevelInterceptorOne {
+    
+        @AroundInvoke
+        protected Object businessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import java.io.Serializable;
+    import java.util.List;
+    
+    public interface MethodLevelInterceptorOnlyIntf<T extends Serializable> {
+        public List<T> makePersistent(T entity);
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import java.util.List;
+    
+    public interface MethodLevelInterceptorOnlyParent extends MethodLevelInterceptorOnlyIntf<String> {
+    
+        public List<String> makePersistent(String entity);
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.ejb.Local;
+    import javax.ejb.Stateless;
+    import javax.interceptor.Interceptors;
+    import java.util.ArrayList;
+    import java.util.List;
+    
+    @Local(MethodLevelInterceptorOnlyParent.class)
+    @Stateless
+    public class MethodLevelInterceptorOnlySLSBean implements MethodLevelInterceptorOnlyParent {
+    
+        @Interceptors(MethodLevelInterceptorOne.class)
+        public List<String> makePersistent(String entity) {
+            List<String> list = new ArrayList<String>();
+            list.add("makePersistent");
+            return list;
+        }
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.InvocationContext;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class MethodLevelInterceptorTwo {
+    
+        @AroundInvoke
+        protected Object businessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.ejb.Stateless;
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.Interceptors;
+    import javax.interceptor.InvocationContext;
+    import java.util.ArrayList;
+    import java.util.List;
+    
+    /**
+     * @version $Rev: 808273 $ $Date: 2009-08-26 20:42:06 -0700 (Wed, 26 Aug 2009) $
+     */
+    @Stateless
+    @Interceptors({ClassLevelInterceptorOne.class, ClassLevelInterceptorTwo.class})
+    public class SecondStatelessInterceptedBean implements SecondStatelessInterceptedLocal {
+    
+        @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class})
+        public List<String> methodWithDefaultInterceptorsExcluded() {
+            List<String> list = new ArrayList<String>();
+            list.add("methodWithDefaultInterceptorsExcluded");
+            return list;
+    
+        }
+    
+        @AroundInvoke
+        protected Object beanClassBusinessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import java.util.List;
+    
+    /**
+     * @version $Rev: 808273 $ $Date: 2009-08-26 20:42:06 -0700 (Wed, 26 Aug 2009) $
+     */
+    public interface SecondStatelessInterceptedLocal {
+        List<String> methodWithDefaultInterceptorsExcluded();
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.annotation.PostConstruct;
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.InvocationContext;
+    
+    /**
+     * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class SuperClassOfClassLevelInterceptor {
+    
+        @AroundInvoke
+        protected Object businessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    
+        @PostConstruct
+        protected void postConstructInterceptor(InvocationContext ic) throws Exception {
+            Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.ejb.Stateless;
+    import javax.interceptor.AroundInvoke;
+    import javax.interceptor.ExcludeClassInterceptors;
+    import javax.interceptor.ExcludeDefaultInterceptors;
+    import javax.interceptor.Interceptors;
+    import javax.interceptor.InvocationContext;
+    import java.util.ArrayList;
+    import java.util.List;
+    
+    /**
+     * @version $Rev: 1090810 $ $Date: 2011-04-10 07:49:26 -0700 (Sun, 10 Apr 2011) $
+     */
+    @Stateless
+    @Interceptors({ClassLevelInterceptorOne.class, ClassLevelInterceptorTwo.class})
+    @ExcludeDefaultInterceptors
+    public class ThirdSLSBean implements ThirdSLSBeanLocal {
+    
+        @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class})
+        public List<String> businessMethod() {
+            List<String> list = new ArrayList<String>();
+            list.add("businessMethod");
+            return list;
+        }
+    
+        @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class})
+        @ExcludeClassInterceptors
+        public List<String> anotherBusinessMethod() {
+            List<String> list = new ArrayList<String>();
+            list.add("anotherBusinessMethod");
+            return list;
+        }
+    
+    
+        @AroundInvoke
+        protected Object beanClassBusinessMethodInterceptor(InvocationContext ic) throws Exception {
+            return Utils.addClassSimpleName(ic, this.getClass().getSimpleName());
+        }
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import java.util.List;
+    
+    /**
+     * @version $Rev: 607320 $ $Date: 2007-12-28 12:15:06 -0800 (Fri, 28 Dec 2007) $
+     */
+    public interface ThirdSLSBeanLocal {
+        List<String> businessMethod();
+    
+        List<String> anotherBusinessMethod();
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import javax.interceptor.InvocationContext;
+    import java.util.ArrayList;
+    import java.util.List;
+    
+    /**
+     * @version $Rev: 808273 $ $Date: 2009-08-26 20:42:06 -0700 (Wed, 26 Aug 2009) $
+     */
+    public class Utils {
+    
+        public static List<String> addClassSimpleName(InvocationContext ic, String classSimpleName) throws Exception {
+            List<String> list = new ArrayList<String>();
+            list.add(classSimpleName);
+            List<String> listOfStrings = (List<String>) ic.proceed();
+            if (listOfStrings != null) {
+                list.addAll(listOfStrings);
+            }
+            return list;
+        }
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import junit.framework.TestCase;
+    import org.junit.After;
+    import org.junit.Before;
+    import org.junit.Test;
+    
+    import javax.naming.Context;
+    import javax.naming.InitialContext;
+    import java.util.ArrayList;
+    import java.util.List;
+    import java.util.Properties;
+    
+    /**
+     * @version $Rev: 1090810 $ $Date: 2011-04-10 07:49:26 -0700 (Sun, 10 Apr 2011) $
+     */
+    public class FullyInterceptedTest extends TestCase {
+    
+        private InitialContext initCtx;
+    
+        @Before
+        public void setUp() throws Exception {
+            Properties properties = new Properties();
+            properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+            properties.setProperty("openejb.deployments.classpath.include", ".*interceptors/target/classes.*");
+    
+            initCtx = new InitialContext(properties);
+        }
+    
+        @Test
+        public void testBusinessMethod() throws Exception {
+    
+            FullyIntercepted fullyIntercepted = (FullyIntercepted) initCtx.lookup("FullyInterceptedBeanLocal");
+    
+            assert fullyIntercepted != null;
+    
+            List<String> expected = new ArrayList<String>();
+            expected.add("DefaultInterceptorOne");
+            expected.add("DefaultInterceptorTwo");
+            expected.add("ClassLevelInterceptorSuperClassOne");
+            expected.add("ClassLevelInterceptorSuperClassTwo");
+            expected.add("ClassLevelInterceptorOne");
+            expected.add("ClassLevelInterceptorTwo");
+            expected.add("MethodLevelInterceptorOne");
+            expected.add("MethodLevelInterceptorTwo");
+            expected.add("beanClassBusinessMethodInterceptor");
+            expected.add("businessMethod");
+    
+            List<String> actual = fullyIntercepted.businessMethod();
+            assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
+        }
+    
+        @Test
+        public void testMethodWithDefaultInterceptorsExcluded() throws Exception {
+    
+            FullyIntercepted fullyIntercepted = (FullyIntercepted) initCtx.lookup("FullyInterceptedBeanLocal");
+    
+            assert fullyIntercepted != null;
+    
+            List<String> expected = new ArrayList<String>();
+            expected.add("ClassLevelInterceptorSuperClassOne");
+            expected.add("ClassLevelInterceptorSuperClassTwo");
+            expected.add("ClassLevelInterceptorOne");
+            expected.add("ClassLevelInterceptorTwo");
+            expected.add("MethodLevelInterceptorOne");
+            expected.add("MethodLevelInterceptorTwo");
+            expected.add("beanClassBusinessMethodInterceptor");
+            expected.add("methodWithDefaultInterceptorsExcluded");
+    
+            List<String> actual = fullyIntercepted.methodWithDefaultInterceptorsExcluded();
+            assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
+        }
+    
+        @After
+        public void tearDown() throws Exception {
+            initCtx.close();
+        }
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import junit.framework.TestCase;
+    import org.junit.Before;
+    import org.junit.Test;
+    
+    import javax.naming.Context;
+    import javax.naming.InitialContext;
+    import java.util.ArrayList;
+    import java.util.List;
+    import java.util.Properties;
+    
+    /**
+     * @version $Rev: 895825 $ $Date: 2010-01-04 15:35:22 -0800 (Mon, 04 Jan 2010) $
+     */
+    public class MethodLevelInterceptorOnlyTest extends TestCase {
+        private InitialContext initCtx;
+    
+        @Before
+        public void setUp() throws Exception {
+            Properties properties = new Properties();
+            properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+            properties.setProperty("openejb.deployments.classpath.include", ".*interceptors/target/classes.*");
+    
+            initCtx = new InitialContext(properties);
+        }
+    
+        @Test
+        public void testInterceptedGenerifiedBusinessIntfMethod() throws Exception {
+            MethodLevelInterceptorOnlyParent bean = (MethodLevelInterceptorOnlyParent) initCtx.lookup("MethodLevelInterceptorOnlySLSBeanLocal");
+    
+            assert bean != null;
+    
+            List<String> expected = new ArrayList<String>();
+            expected.add("MethodLevelInterceptorOne");
+            expected.add("makePersistent");
+    
+            List<String> actual = bean.makePersistent(null);
+            assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
+        }
+    }/**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import junit.framework.TestCase;
+    import org.junit.Before;
+    import org.junit.Test;
+    
+    import javax.naming.Context;
+    import javax.naming.InitialContext;
+    import java.util.ArrayList;
+    import java.util.List;
+    import java.util.Properties;
+    
+    /**
+     * @version $Rev: 1090810 $ $Date: 2011-04-10 07:49:26 -0700 (Sun, 10 Apr 2011) $
+     */
+    public class SecondStatelessInterceptedTest extends TestCase {
+    
+        private InitialContext initCtx;
+    
+        @Before
+        public void setUp() throws Exception {
+            Properties properties = new Properties();
+            properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+            properties.setProperty("openejb.deployments.classpath.include", ".*interceptors/target/classes.*");
+    
+            initCtx = new InitialContext(properties);
+        }
+    
+        @Test
+        public void testMethodWithDefaultInterceptorsExcluded() throws Exception {
+            SecondStatelessInterceptedLocal bean =
+                    (SecondStatelessInterceptedLocal) initCtx.lookup("SecondStatelessInterceptedBeanLocal");
+    
+            assert bean != null;
+    
+            List<String> expected = new ArrayList<String>();
+            expected.add("ClassLevelInterceptorOne");
+            expected.add("ClassLevelInterceptorTwo");
+            expected.add("MethodLevelInterceptorOne");
+            expected.add("MethodLevelInterceptorTwo");
+            expected.add("SecondStatelessInterceptedBean");
+            expected.add("methodWithDefaultInterceptorsExcluded");
+    
+            List<String> actual = bean.methodWithDefaultInterceptorsExcluded();
+            assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
+        }
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.interceptors;
+    
+    import junit.framework.TestCase;
+    import org.junit.Before;
+    import org.junit.Test;
+    
+    import javax.naming.Context;
+    import javax.naming.InitialContext;
+    import java.util.ArrayList;
+    import java.util.List;
+    import java.util.Properties;
+    
+    /**
+     * @version $Rev: 1090810 $ $Date: 2011-04-10 07:49:26 -0700 (Sun, 10 Apr 2011) $
+     */
+    public class ThirdSLSBeanTest extends TestCase {
+        private InitialContext initCtx;
+    
+        @Before
+        public void setUp() throws Exception {
+            Properties properties = new Properties();
+            properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+            properties.setProperty("openejb.deployments.classpath.include", ".*interceptors/target/classes.*");
+    
+            initCtx = new InitialContext(properties);
+        }
+    
+        @Test
+        public void testMethodWithDefaultInterceptorsExcluded() throws Exception {
+            ThirdSLSBeanLocal bean = (ThirdSLSBeanLocal) initCtx.lookup("ThirdSLSBeanLocal");
+    
+            assert bean != null;
+    
+            List<String> expected = new ArrayList<String>();
+            expected.add("ClassLevelInterceptorOne");
+            expected.add("ClassLevelInterceptorTwo");
+            expected.add("MethodLevelInterceptorOne");
+            expected.add("MethodLevelInterceptorTwo");
+            expected.add("ThirdSLSBean");
+            expected.add("businessMethod");
+    
+            List<String> actual = bean.businessMethod();
+            assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
+        }
+    
+        @Test
+        public void testMethodWithDefaultAndClassInterceptorsExcluded() throws Exception {
+            ThirdSLSBeanLocal bean = (ThirdSLSBeanLocal) initCtx.lookup("ThirdSLSBeanLocal");
+    
+            assert bean != null;
+    
+            List<String> expected = new ArrayList<String>();
+            expected.add("MethodLevelInterceptorOne");
+            expected.add("MethodLevelInterceptorTwo");
+            expected.add("ThirdSLSBean");
+            expected.add("anotherBusinessMethod");
+    
+            List<String> actual = bean.anotherBusinessMethod();
+            assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
+        }
+    }

Added: openejb/trunk/openejb/examples/jpa-eclipselink/README.md
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/jpa-eclipselink/README.md?rev=1190757&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/jpa-eclipselink/README.md (added)
+++ openejb/trunk/openejb/examples/jpa-eclipselink/README.md Sat Oct 29 04:54:40 2011
@@ -0,0 +1,252 @@
+[INFO] Scanning for projects...
+[INFO]                                                                         
+[INFO] ------------------------------------------------------------------------
+[INFO] Building OpenEJB :: Examples :: JPA with EclipseLink 1.0
+[INFO] ------------------------------------------------------------------------
+[INFO] 
+[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jpa-eclipselink ---
+[INFO] Deleting /Users/dblevins/examples/jpa-eclipselink/target
+[INFO] 
+[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ jpa-eclipselink ---
+[INFO] Using 'UTF-8' encoding to copy filtered resources.
+[INFO] Copying 1 resource
+[INFO] 
+[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ jpa-eclipselink ---
+[INFO] Compiling 2 source files to /Users/dblevins/examples/jpa-eclipselink/target/classes
+[INFO] 
+[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ jpa-eclipselink ---
+[INFO] Using 'UTF-8' encoding to copy filtered resources.
+[INFO] skip non existing resourceDirectory /Users/dblevins/examples/jpa-eclipselink/src/test/resources
+[INFO] 
+[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ jpa-eclipselink ---
+[INFO] Compiling 1 source file to /Users/dblevins/examples/jpa-eclipselink/target/test-classes
+[INFO] 
+[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ jpa-eclipselink ---
+[INFO] Surefire report directory: /Users/dblevins/examples/jpa-eclipselink/target/surefire-reports
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.eclipselink.MoviesTest
+Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
+http://openejb.apache.org/
+INFO - openejb.home = /Users/dblevins/examples/jpa-eclipselink
+INFO - openejb.base = /Users/dblevins/examples/jpa-eclipselink
+INFO - Using 'javax.ejb.embeddable.EJBContainer=true'
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Configuring Service(id=movieDatabase, type=Resource, provider-id=Default JDBC Database)
+INFO - Found EjbModule in classpath: /Users/dblevins/examples/jpa-eclipselink/target/classes
+INFO - Searched 6 classpath urls in 1053 milliseconds.  Average 175 milliseconds per url.
+INFO - Beginning load: /Users/dblevins/examples/jpa-eclipselink/target/classes
+INFO - Configuring enterprise application: /Users/dblevins/examples/jpa-eclipselink
+INFO - Configuring Service(id=Default Stateful Container, type=Container, provider-id=Default Stateful Container)
+INFO - Auto-creating a container for bean Movies: Container(type=STATEFUL, id=Default Stateful Container)
+INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
+INFO - Auto-creating a container for bean org.superbiz.eclipselink.MoviesTest: Container(type=MANAGED, id=Default Managed Container)
+INFO - Configuring PersistenceUnit(name=movie-unit, provider=org.eclipse.persistence.jpa.PersistenceProvider)
+INFO - Auto-creating a Resource with id 'movieDatabaseNonJta' of type 'DataSource for 'movie-unit'.
+INFO - Configuring Service(id=movieDatabaseNonJta, type=Resource, provider-id=movieDatabase)
+INFO - Adjusting PersistenceUnit movie-unit <non-jta-data-source> to Resource ID 'movieDatabaseNonJta' from 'movieDatabaseUnmanaged'
+INFO - Enterprise application "/Users/dblevins/examples/jpa-eclipselink" loaded.
+INFO - Assembling app: /Users/dblevins/examples/jpa-eclipselink
+INFO - PersistenceUnit(name=movie-unit, provider=org.eclipse.persistence.jpa.PersistenceProvider) - provider time 535ms
+INFO - Jndi(name="java:global/jpa-eclipselink/Movies!org.superbiz.eclipselink.Movies")
+INFO - Jndi(name="java:global/jpa-eclipselink/Movies")
+INFO - Jndi(name="java:global/EjbModule900256864/org.superbiz.eclipselink.MoviesTest!org.superbiz.eclipselink.MoviesTest")
+INFO - Jndi(name="java:global/EjbModule900256864/org.superbiz.eclipselink.MoviesTest")
+INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+INFO - Created Ejb(deployment-id=org.superbiz.eclipselink.MoviesTest, ejb-name=org.superbiz.eclipselink.MoviesTest, container=Default Managed Container)
+INFO - Started Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+INFO - Started Ejb(deployment-id=org.superbiz.eclipselink.MoviesTest, ejb-name=org.superbiz.eclipselink.MoviesTest, container=Default Managed Container)
+INFO - Deployed Application(path=/Users/dblevins/examples/jpa-eclipselink)
+[EL Info]: 2011-10-28 17:05:52.461--ServerSession(1920842039)--EclipseLink, version: Eclipse Persistence Services - 2.1.1.v20100817-r8050
+[EL Info]: 2011-10-28 17:05:52.624--ServerSession(1920842039)--file:/Users/dblevins/examples/jpa-eclipselink/target/classes/_movie-unit login successful
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.428 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+[INFO] 
+[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ jpa-eclipselink ---
+[INFO] Building jar: /Users/dblevins/examples/jpa-eclipselink/target/jpa-eclipselink-1.0.jar
+[INFO] 
+[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ jpa-eclipselink ---
+[INFO] Installing /Users/dblevins/examples/jpa-eclipselink/target/jpa-eclipselink-1.0.jar to /Users/dblevins/.m2/repository/org/superbiz/jpa-eclipselink/1.0/jpa-eclipselink-1.0.jar
+[INFO] Installing /Users/dblevins/examples/jpa-eclipselink/pom.xml to /Users/dblevins/.m2/repository/org/superbiz/jpa-eclipselink/1.0/jpa-eclipselink-1.0.pom
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 6.548s
+[INFO] Finished at: Fri Oct 28 17:05:53 PDT 2011
+[INFO] Final Memory: 14M/81M
+[INFO] ------------------------------------------------------------------------
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.eclipselink;
+    
+    import javax.persistence.Entity;
+    import javax.persistence.GeneratedValue;
+    import javax.persistence.GenerationType;
+    import javax.persistence.Id;
+    
+    @Entity
+    public class Movie {
+    
+        @Id
+        @GeneratedValue(strategy = GenerationType.AUTO)
+        private long id;
+    
+        private String director;
+        private String title;
+        private int year;
+    
+        public Movie() {
+        }
+    
+        public Movie(String director, String title, int year) {
+            this.director = director;
+            this.title = title;
+            this.year = year;
+        }
+    
+        public String getDirector() {
+            return director;
+        }
+    
+        public void setDirector(String director) {
+            this.director = director;
+        }
+    
+        public String getTitle() {
+            return title;
+        }
+    
+        public void setTitle(String title) {
+            this.title = title;
+        }
+    
+        public int getYear() {
+            return year;
+        }
+    
+        public void setYear(int year) {
+            this.year = year;
+        }
+    
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.eclipselink;
+    
+    import javax.ejb.Stateful;
+    import javax.persistence.EntityManager;
+    import javax.persistence.PersistenceContext;
+    import javax.persistence.PersistenceContextType;
+    import javax.persistence.Query;
+    import java.util.List;
+    
+    @Stateful
+    public class Movies {
+    
+        @PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.EXTENDED)
+        private EntityManager entityManager;
+    
+        public void addMovie(Movie movie) throws Exception {
+            entityManager.persist(movie);
+        }
+    
+        public void deleteMovie(Movie movie) throws Exception {
+            entityManager.remove(movie);
+        }
+    
+        public List<Movie> getMovies() throws Exception {
+            Query query = entityManager.createQuery("SELECT m from Movie as m");
+            return query.getResultList();
+        }
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.eclipselink;
+    
+    import junit.framework.TestCase;
+    
+    import javax.ejb.embeddable.EJBContainer;
+    import javax.naming.Context;
+    import java.util.List;
+    import java.util.Properties;
+    
+    /**
+     * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class MoviesTest extends TestCase {
+    
+        public void test() throws Exception {
+            Properties p = new Properties();
+            p.put("movieDatabase", "new://Resource?type=DataSource");
+            p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+            p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+    
+            final Context context = EJBContainer.createEJBContainer(p).getContext();
+    
+            Movies movies = (Movies) context.lookup("java:global/jpa-eclipselink/Movies");
+    
+            movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+            movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
+            movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
+    
+            List<Movie> list = movies.getMovies();
+            assertEquals("List.size()", 3, list.size());
+    
+            for (Movie movie : list) {
+                movies.deleteMovie(movie);
+            }
+    
+            assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
+        }
+    }

Added: openejb/trunk/openejb/examples/jpa-hibernate/README.md
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/jpa-hibernate/README.md?rev=1190757&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/jpa-hibernate/README.md (added)
+++ openejb/trunk/openejb/examples/jpa-hibernate/README.md Sat Oct 29 04:54:40 2011
@@ -0,0 +1,248 @@
+[INFO] Scanning for projects...
+[INFO]                                                                         
+[INFO] ------------------------------------------------------------------------
+[INFO] Building OpenEJB :: Examples :: JPA with Hibernate 1.0
+[INFO] ------------------------------------------------------------------------
+[INFO] 
+[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jpa-hibernate ---
+[INFO] Deleting /Users/dblevins/examples/jpa-hibernate/target
+[INFO] 
+[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ jpa-hibernate ---
+[INFO] Using 'UTF-8' encoding to copy filtered resources.
+[INFO] Copying 1 resource
+[INFO] 
+[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ jpa-hibernate ---
+[INFO] Compiling 2 source files to /Users/dblevins/examples/jpa-hibernate/target/classes
+[INFO] 
+[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ jpa-hibernate ---
+[INFO] Using 'UTF-8' encoding to copy filtered resources.
+[INFO] skip non existing resourceDirectory /Users/dblevins/examples/jpa-hibernate/src/test/resources
+[INFO] 
+[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ jpa-hibernate ---
+[INFO] Compiling 1 source file to /Users/dblevins/examples/jpa-hibernate/target/test-classes
+[INFO] 
+[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ jpa-hibernate ---
+[INFO] Surefire report directory: /Users/dblevins/examples/jpa-hibernate/target/surefire-reports
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.injection.h3jpa.MoviesTest
+Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
+http://openejb.apache.org/
+INFO - openejb.home = /Users/dblevins/examples/jpa-hibernate
+INFO - openejb.base = /Users/dblevins/examples/jpa-hibernate
+INFO - Using 'javax.ejb.embeddable.EJBContainer=true'
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Configuring Service(id=movieDatabase, type=Resource, provider-id=Default JDBC Database)
+INFO - Found EjbModule in classpath: /Users/dblevins/examples/jpa-hibernate/target/classes
+INFO - Beginning load: /Users/dblevins/examples/jpa-hibernate/target/classes
+INFO - Configuring enterprise application: /Users/dblevins/examples/jpa-hibernate
+INFO - Configuring Service(id=Default Stateful Container, type=Container, provider-id=Default Stateful Container)
+INFO - Auto-creating a container for bean Movies: Container(type=STATEFUL, id=Default Stateful Container)
+INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
+INFO - Auto-creating a container for bean org.superbiz.injection.h3jpa.MoviesTest: Container(type=MANAGED, id=Default Managed Container)
+INFO - Configuring PersistenceUnit(name=movie-unit, provider=org.hibernate.ejb.HibernatePersistence)
+INFO - Auto-creating a Resource with id 'movieDatabaseNonJta' of type 'DataSource for 'movie-unit'.
+INFO - Configuring Service(id=movieDatabaseNonJta, type=Resource, provider-id=movieDatabase)
+INFO - Adjusting PersistenceUnit movie-unit <non-jta-data-source> to Resource ID 'movieDatabaseNonJta' from 'movieDatabaseUnmanaged'
+INFO - Enterprise application "/Users/dblevins/examples/jpa-hibernate" loaded.
+INFO - Assembling app: /Users/dblevins/examples/jpa-hibernate
+INFO - PersistenceUnit(name=movie-unit, provider=org.hibernate.ejb.HibernatePersistence) - provider time 642ms
+INFO - Jndi(name="java:global/jpa-hibernate/Movies!org.superbiz.injection.h3jpa.Movies")
+INFO - Jndi(name="java:global/jpa-hibernate/Movies")
+INFO - Jndi(name="java:global/EjbModule1623810826/org.superbiz.injection.h3jpa.MoviesTest!org.superbiz.injection.h3jpa.MoviesTest")
+INFO - Jndi(name="java:global/EjbModule1623810826/org.superbiz.injection.h3jpa.MoviesTest")
+INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+INFO - Created Ejb(deployment-id=org.superbiz.injection.h3jpa.MoviesTest, ejb-name=org.superbiz.injection.h3jpa.MoviesTest, container=Default Managed Container)
+INFO - Started Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+INFO - Started Ejb(deployment-id=org.superbiz.injection.h3jpa.MoviesTest, ejb-name=org.superbiz.injection.h3jpa.MoviesTest, container=Default Managed Container)
+INFO - Deployed Application(path=/Users/dblevins/examples/jpa-hibernate)
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.251 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+[INFO] 
+[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ jpa-hibernate ---
+[INFO] Building jar: /Users/dblevins/examples/jpa-hibernate/target/jpa-hibernate-1.0.jar
+[INFO] 
+[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ jpa-hibernate ---
+[INFO] Installing /Users/dblevins/examples/jpa-hibernate/target/jpa-hibernate-1.0.jar to /Users/dblevins/.m2/repository/org/superbiz/jpa-hibernate/1.0/jpa-hibernate-1.0.jar
+[INFO] Installing /Users/dblevins/examples/jpa-hibernate/pom.xml to /Users/dblevins/.m2/repository/org/superbiz/jpa-hibernate/1.0/jpa-hibernate-1.0.pom
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 5.066s
+[INFO] Finished at: Fri Oct 28 17:11:31 PDT 2011
+[INFO] Final Memory: 14M/81M
+[INFO] ------------------------------------------------------------------------
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.injection.h3jpa;
+    
+    import javax.persistence.Entity;
+    import javax.persistence.GeneratedValue;
+    import javax.persistence.GenerationType;
+    import javax.persistence.Id;
+    
+    @Entity
+    public class Movie {
+    
+        @Id
+        @GeneratedValue(strategy = GenerationType.AUTO)
+        private long id;
+    
+        private String director;
+        private String title;
+        private int year;
+    
+        public Movie() {
+        }
+    
+        public Movie(String director, String title, int year) {
+            this.director = director;
+            this.title = title;
+            this.year = year;
+        }
+    
+        public String getDirector() {
+            return director;
+        }
+    
+        public void setDirector(String director) {
+            this.director = director;
+        }
+    
+        public String getTitle() {
+            return title;
+        }
+    
+        public void setTitle(String title) {
+            this.title = title;
+        }
+    
+        public int getYear() {
+            return year;
+        }
+    
+        public void setYear(int year) {
+            this.year = year;
+        }
+    
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.injection.h3jpa;
+    
+    import javax.ejb.Stateful;
+    import javax.persistence.EntityManager;
+    import javax.persistence.PersistenceContext;
+    import javax.persistence.PersistenceContextType;
+    import javax.persistence.Query;
+    import java.util.List;
+    
+    @Stateful
+    public class Movies {
+    
+        @PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.EXTENDED)
+        private EntityManager entityManager;
+    
+        public void addMovie(Movie movie) throws Exception {
+            entityManager.persist(movie);
+        }
+    
+        public void deleteMovie(Movie movie) throws Exception {
+            entityManager.remove(movie);
+        }
+    
+        public List<Movie> getMovies() throws Exception {
+            Query query = entityManager.createQuery("SELECT m from Movie as m");
+            return query.getResultList();
+        }
+    
+    }
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     *  Unless required by applicable law or agreed to in writing, software
+     *  distributed under the License is distributed on an "AS IS" BASIS,
+     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     *  See the License for the specific language governing permissions and
+     *  limitations under the License.
+     */
+    package org.superbiz.injection.h3jpa;
+    
+    import junit.framework.TestCase;
+    
+    import javax.ejb.embeddable.EJBContainer;
+    import javax.naming.Context;
+    import java.util.List;
+    import java.util.Properties;
+    
+    /**
+     * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+     */
+    public class MoviesTest extends TestCase {
+    
+        public void test() throws Exception {
+            final Properties p = new Properties();
+            p.put("movieDatabase", "new://Resource?type=DataSource");
+            p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+            p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+    
+            final Context context = EJBContainer.createEJBContainer(p).getContext();
+            Movies movies = (Movies) context.lookup("java:global/jpa-hibernate/Movies");
+    
+            movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+            movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
+            movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
+    
+            List<Movie> list = movies.getMovies();
+            assertEquals("List.size()", 3, list.size());
+    
+            for (Movie movie : list) {
+                movies.deleteMovie(movie);
+            }
+    
+            assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
+        }
+    }