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/30 04:44:35 UTC

svn commit: r1195109 [12/18] - in /openejb/trunk/openejb/examples: access-timeout/ application-composer/ applicationexception/ async-methods/ bean-validation-design-by-contract/ cdi-basic/ cdi-interceptors/ cdi-produces-disposes/ component-interfaces/ ...

Modified: openejb/trunk/openejb/examples/testing-security-meta/README.md
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/testing-security-meta/README.md?rev=1195109&r1=1195108&r2=1195109&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/testing-security-meta/README.md (original)
+++ openejb/trunk/openejb/examples/testing-security-meta/README.md Sun Oct 30 03:44:33 2011
@@ -1,119 +1,12 @@
-[INFO] Scanning for projects...
-[INFO]                                                                         
-[INFO] ------------------------------------------------------------------------
-[INFO] Building OpenEJB :: Examples :: Testing Security (Meta) 1.0
-[INFO] ------------------------------------------------------------------------
-[INFO] 
-[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ testing-security-meta ---
-[INFO] Deleting /Users/dblevins/examples/testing-security-meta/target
-[INFO] 
-[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ testing-security-meta ---
-[INFO] Using 'UTF-8' encoding to copy filtered resources.
-[INFO] Copying 1 resource
-[INFO] 
-[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ testing-security-meta ---
-[INFO] Compiling 9 source files to /Users/dblevins/examples/testing-security-meta/target/classes
-[INFO] 
-[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ testing-security-meta ---
-[INFO] Using 'UTF-8' encoding to copy filtered resources.
-[INFO] skip non existing resourceDirectory /Users/dblevins/examples/testing-security-meta/src/test/resources
-[INFO] 
-[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ testing-security-meta ---
-[INFO] Compiling 1 source file to /Users/dblevins/examples/testing-security-meta/target/test-classes
-[INFO] 
-[INFO] --- maven-surefire-plugin:2.6:test (default-test) @ testing-security-meta ---
-[INFO] Surefire report directory: /Users/dblevins/examples/testing-security-meta/target/surefire-reports
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running org.superbiz.injection.secure.MovieTest
-Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
-http://openejb.apache.org/
-INFO - openejb.home = /Users/dblevins/examples/testing-security-meta
-INFO - openejb.base = /Users/dblevins/examples/testing-security-meta
-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/testing-security-meta/target/classes
-INFO - Found EjbModule in classpath: /Users/dblevins/examples/testing-security-meta/target/test-classes
-INFO - Beginning load: /Users/dblevins/examples/testing-security-meta/target/classes
-INFO - Beginning load: /Users/dblevins/examples/testing-security-meta/target/test-classes
-INFO - Configuring enterprise application: /Users/dblevins/examples/testing-security-meta
-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 Stateless Container, type=Container, provider-id=Default Stateless Container)
-INFO - Auto-creating a container for bean EmployeeBean: Container(type=STATELESS, id=Default Stateless 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.secure.MovieTest: Container(type=MANAGED, id=Default Managed Container)
-INFO - Configuring PersistenceUnit(name=movie-unit)
-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/testing-security-meta" loaded.
-INFO - Assembling app: /Users/dblevins/examples/testing-security-meta
-INFO - PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 411ms
-INFO - Jndi(name="java:global/testing-security-meta/Movies!org.superbiz.injection.secure.Movies")
-INFO - Jndi(name="java:global/testing-security-meta/Movies")
-INFO - Jndi(name="java:global/testing-security-meta/EmployeeBean!org.superbiz.injection.secure.MovieTest$Caller")
-INFO - Jndi(name="java:global/testing-security-meta/EmployeeBean")
-INFO - Jndi(name="java:global/testing-security-meta/ManagerBean!org.superbiz.injection.secure.MovieTest$Caller")
-INFO - Jndi(name="java:global/testing-security-meta/ManagerBean")
-INFO - Jndi(name="java:global/EjbModule837053032/org.superbiz.injection.secure.MovieTest!org.superbiz.injection.secure.MovieTest")
-INFO - Jndi(name="java:global/EjbModule837053032/org.superbiz.injection.secure.MovieTest")
-INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
-INFO - Created Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean, container=Default Stateless Container)
-INFO - Created Ejb(deployment-id=EmployeeBean, ejb-name=EmployeeBean, container=Default Stateless Container)
-INFO - Created Ejb(deployment-id=org.superbiz.injection.secure.MovieTest, ejb-name=org.superbiz.injection.secure.MovieTest, container=Default Managed Container)
-INFO - Started Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
-INFO - Started Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean, container=Default Stateless Container)
-INFO - Started Ejb(deployment-id=EmployeeBean, ejb-name=EmployeeBean, container=Default Stateless Container)
-INFO - Started Ejb(deployment-id=org.superbiz.injection.secure.MovieTest, ejb-name=org.superbiz.injection.secure.MovieTest, container=Default Managed Container)
-INFO - Deployed Application(path=/Users/dblevins/examples/testing-security-meta)
-INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
-INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
-Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.553 sec
-
-Results :
-
-Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
-
-[INFO] 
-[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ testing-security-meta ---
-[INFO] Building jar: /Users/dblevins/examples/testing-security-meta/target/testing-security-meta-1.0.jar
-[INFO] 
-[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ testing-security-meta ---
-[INFO] Installing /Users/dblevins/examples/testing-security-meta/target/testing-security-meta-1.0.jar to /Users/dblevins/.m2/repository/org/superbiz/testing-security-meta/1.0/testing-security-meta-1.0.jar
-[INFO] Installing /Users/dblevins/examples/testing-security-meta/pom.xml to /Users/dblevins/.m2/repository/org/superbiz/testing-security-meta/1.0/testing-security-meta-1.0.pom
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 5.542s
-[INFO] Finished at: Fri Oct 28 17:01:56 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.
-     */
+Title: Testing Security Meta
+
+*Help us document this example! Source available in [svn](http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/testing-security-meta) or [git](https://github.com/apache/openejb/tree/trunk/openejb/examples/testing-security-meta). Open a [JIRA](https://issues.apache.org/jira/browse/TOMEE) with patch or pull request*
+
+## AddPermission
+
     package org.superbiz.injection.secure.api;
     
     import javax.annotation.security.RolesAllowed;
-    import javax.persistence.PersistenceContext;
-    import javax.persistence.PersistenceContextType;
     import java.lang.annotation.ElementType;
     import java.lang.annotation.Retention;
     import java.lang.annotation.RetentionPolicy;
@@ -131,22 +24,10 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             @RolesAllowed({"Employee", "Manager"})
             public void method();
         }
-    }/**
-     * 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.
-     */
+    }
+
+## DeletePermission
+
     package org.superbiz.injection.secure.api;
     
     import javax.annotation.security.RolesAllowed;
@@ -167,22 +48,10 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             @RolesAllowed("Manager")
             public void method();
         }
-    }/**
-     * 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.
-     */
+    }
+
+## Metatype
+
     package org.superbiz.injection.secure.api;
     
     import java.lang.annotation.ElementType;
@@ -195,22 +64,9 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
     @Retention(RetentionPolicy.RUNTIME)
     public @interface Metatype {
     }
-    /**
-     * 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.
-     */
+
+## MovieUnit
+
     package org.superbiz.injection.secure.api;
     
     import javax.persistence.PersistenceContext;
@@ -225,29 +81,15 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
     @Target({ElementType.METHOD, ElementType.FIELD})
     @Retention(RetentionPolicy.RUNTIME)
     
-    @PersistenceContext(name ="movie-unit", unitName = "movie-unit", type = PersistenceContextType.EXTENDED)
+    @PersistenceContext(name = "movie-unit", unitName = "movie-unit", type = PersistenceContextType.EXTENDED)
     public @interface MovieUnit {
     }
-    /**
-     * 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.
-     */
+
+## ReadPermission
+
     package org.superbiz.injection.secure.api;
     
     import javax.annotation.security.PermitAll;
-    import javax.annotation.security.RolesAllowed;
     import javax.ejb.TransactionAttribute;
     import javax.ejb.TransactionAttributeType;
     import java.lang.annotation.ElementType;
@@ -268,22 +110,10 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             @TransactionAttribute(TransactionAttributeType.SUPPORTS)
             public void method();
         }
-    }/**
-     * 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.
-     */
+    }
+
+## RunAsEmployee
+
     package org.superbiz.injection.secure.api;
     
     import javax.annotation.security.RunAs;
@@ -299,22 +129,10 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
     
     @RunAs("Employee")
     public @interface RunAsEmployee {
-    }/**
-     * 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.
-     */
+    }
+
+## RunAsManager
+
     package org.superbiz.injection.secure.api;
     
     import javax.annotation.security.RunAs;
@@ -330,22 +148,10 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
     
     @RunAs("Manager")
     public @interface RunAsManager {
-    }/**
-     * 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.
-     */
+    }
+
+## Movie
+
     package org.superbiz.injection.secure;
     
     import javax.persistence.Entity;
@@ -390,24 +196,10 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             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.
-     */
+
+## Movies
+
     package org.superbiz.injection.secure;
     
     //START SNIPPET: code
@@ -417,14 +209,8 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
     import org.superbiz.injection.secure.api.MovieUnit;
     import org.superbiz.injection.secure.api.ReadPermission;
     
-    import javax.annotation.security.PermitAll;
-    import javax.annotation.security.RolesAllowed;
     import javax.ejb.Stateful;
-    import javax.ejb.TransactionAttribute;
-    import javax.ejb.TransactionAttributeType;
     import javax.persistence.EntityManager;
-    import javax.persistence.PersistenceContext;
-    import javax.persistence.PersistenceContextType;
     import javax.persistence.Query;
     import java.util.List;
     
@@ -450,23 +236,24 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             return query.getResultList();
         }
     }
-    //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.
-     */
+
+## persistence.xml
+
+    <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+    
+      <persistence-unit name="movie-unit">
+        <jta-data-source>movieDatabase</jta-data-source>
+        <non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
+        <class>org.superbiz.injection.secure.Movie</class>
+    
+        <properties>
+          <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+      </persistence-unit>
+    </persistence>
+
+## MovieTest
+
     package org.superbiz.injection.secure;
     
     import junit.framework.TestCase;
@@ -487,7 +274,7 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
     
         @EJB
         private Movies movies;
-        
+    
         @EJB(beanName = "ManagerBean")
         private Caller manager;
     
@@ -570,17 +357,15 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
                 // Read access should be allowed
     
                 List<Movie> list = movies.getMovies();
-    
             } catch (EJBAccessException e) {
                 fail("Read access should be allowed");
             }
-    
         }
     
         public interface Caller {
             public <V> V call(Callable<V> callable) throws Exception;
         }
-        
+    
         /**
          * This little bit of magic allows our test code to execute in
          * the desired security scope.
@@ -593,7 +378,6 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             public <V> V call(Callable<V> callable) throws Exception {
                 return callable.call();
             }
-    
         }
     
         @Stateless
@@ -603,8 +387,64 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             public <V> V call(Callable<V> callable) throws Exception {
                 return callable.call();
             }
-    
         }
-    
     }
-    //END SNIPPET: code
+
+# Running
+
+    
+    -------------------------------------------------------
+     T E S T S
+    -------------------------------------------------------
+    Running org.superbiz.injection.secure.MovieTest
+    Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
+    http://openejb.apache.org/
+    INFO - openejb.home = /Users/dblevins/examples/testing-security-meta
+    INFO - openejb.base = /Users/dblevins/examples/testing-security-meta
+    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/testing-security-meta/target/classes
+    INFO - Found EjbModule in classpath: /Users/dblevins/examples/testing-security-meta/target/test-classes
+    INFO - Beginning load: /Users/dblevins/examples/testing-security-meta/target/classes
+    INFO - Beginning load: /Users/dblevins/examples/testing-security-meta/target/test-classes
+    INFO - Configuring enterprise application: /Users/dblevins/examples/testing-security-meta
+    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 Stateless Container, type=Container, provider-id=Default Stateless Container)
+    INFO - Auto-creating a container for bean ManagerBean: Container(type=STATELESS, id=Default Stateless 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.secure.MovieTest: Container(type=MANAGED, id=Default Managed Container)
+    INFO - Configuring PersistenceUnit(name=movie-unit)
+    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/testing-security-meta" loaded.
+    INFO - Assembling app: /Users/dblevins/examples/testing-security-meta
+    INFO - PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 419ms
+    INFO - Jndi(name="java:global/testing-security-meta/Movies!org.superbiz.injection.secure.Movies")
+    INFO - Jndi(name="java:global/testing-security-meta/Movies")
+    INFO - Jndi(name="java:global/testing-security-meta/ManagerBean!org.superbiz.injection.secure.MovieTest$Caller")
+    INFO - Jndi(name="java:global/testing-security-meta/ManagerBean")
+    INFO - Jndi(name="java:global/testing-security-meta/EmployeeBean!org.superbiz.injection.secure.MovieTest$Caller")
+    INFO - Jndi(name="java:global/testing-security-meta/EmployeeBean")
+    INFO - Jndi(name="java:global/EjbModule53489605/org.superbiz.injection.secure.MovieTest!org.superbiz.injection.secure.MovieTest")
+    INFO - Jndi(name="java:global/EjbModule53489605/org.superbiz.injection.secure.MovieTest")
+    INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+    INFO - Created Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean, container=Default Stateless Container)
+    INFO - Created Ejb(deployment-id=EmployeeBean, ejb-name=EmployeeBean, container=Default Stateless Container)
+    INFO - Created Ejb(deployment-id=org.superbiz.injection.secure.MovieTest, ejb-name=org.superbiz.injection.secure.MovieTest, container=Default Managed Container)
+    INFO - Started Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+    INFO - Started Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean, container=Default Stateless Container)
+    INFO - Started Ejb(deployment-id=EmployeeBean, ejb-name=EmployeeBean, container=Default Stateless Container)
+    INFO - Started Ejb(deployment-id=org.superbiz.injection.secure.MovieTest, ejb-name=org.superbiz.injection.secure.MovieTest, container=Default Managed Container)
+    INFO - Deployed Application(path=/Users/dblevins/examples/testing-security-meta)
+    INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
+    INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
+    Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.754 sec
+    
+    Results :
+    
+    Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
+    

Modified: openejb/trunk/openejb/examples/testing-security/README.md
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/testing-security/README.md?rev=1195109&r1=1195108&r2=1195109&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/testing-security/README.md (original)
+++ openejb/trunk/openejb/examples/testing-security/README.md Sun Oct 30 03:44:33 2011
@@ -1,114 +1,9 @@
-[INFO] Scanning for projects...
-[INFO]                                                                         
-[INFO] ------------------------------------------------------------------------
-[INFO] Building OpenEJB :: Examples :: Testing Security 1.0
-[INFO] ------------------------------------------------------------------------
-[INFO] 
-[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ testing-security ---
-[INFO] Deleting /Users/dblevins/examples/testing-security/target
-[INFO] 
-[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ testing-security ---
-[INFO] Using 'UTF-8' encoding to copy filtered resources.
-[INFO] Copying 1 resource
-[INFO] 
-[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ testing-security ---
-[INFO] Compiling 2 source files to /Users/dblevins/examples/testing-security/target/classes
-[INFO] 
-[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ testing-security ---
-[INFO] Using 'UTF-8' encoding to copy filtered resources.
-[INFO] skip non existing resourceDirectory /Users/dblevins/examples/testing-security/src/test/resources
-[INFO] 
-[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ testing-security ---
-[INFO] Compiling 1 source file to /Users/dblevins/examples/testing-security/target/test-classes
-[INFO] 
-[INFO] --- maven-surefire-plugin:2.6:test (default-test) @ testing-security ---
-[INFO] Surefire report directory: /Users/dblevins/examples/testing-security/target/surefire-reports
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running org.superbiz.injection.secure.MovieTest
-Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
-http://openejb.apache.org/
-INFO - openejb.home = /Users/dblevins/examples/testing-security
-INFO - openejb.base = /Users/dblevins/examples/testing-security
-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/testing-security/target/classes
-INFO - Found EjbModule in classpath: /Users/dblevins/examples/testing-security/target/test-classes
-INFO - Beginning load: /Users/dblevins/examples/testing-security/target/classes
-INFO - Beginning load: /Users/dblevins/examples/testing-security/target/test-classes
-INFO - Configuring enterprise application: /Users/dblevins/examples/testing-security
-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 Stateless Container, type=Container, provider-id=Default Stateless Container)
-INFO - Auto-creating a container for bean ManagerBean: Container(type=STATELESS, id=Default Stateless 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.secure.MovieTest: Container(type=MANAGED, id=Default Managed Container)
-INFO - Configuring PersistenceUnit(name=movie-unit)
-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/testing-security" loaded.
-INFO - Assembling app: /Users/dblevins/examples/testing-security
-INFO - PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 414ms
-INFO - Jndi(name="java:global/testing-security/Movies!org.superbiz.injection.secure.Movies")
-INFO - Jndi(name="java:global/testing-security/Movies")
-INFO - Jndi(name="java:global/testing-security/ManagerBean!org.superbiz.injection.secure.MovieTest$Caller")
-INFO - Jndi(name="java:global/testing-security/ManagerBean")
-INFO - Jndi(name="java:global/testing-security/EmployeeBean!org.superbiz.injection.secure.MovieTest$Caller")
-INFO - Jndi(name="java:global/testing-security/EmployeeBean")
-INFO - Jndi(name="java:global/EjbModule1377851222/org.superbiz.injection.secure.MovieTest!org.superbiz.injection.secure.MovieTest")
-INFO - Jndi(name="java:global/EjbModule1377851222/org.superbiz.injection.secure.MovieTest")
-INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
-INFO - Created Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean, container=Default Stateless Container)
-INFO - Created Ejb(deployment-id=EmployeeBean, ejb-name=EmployeeBean, container=Default Stateless Container)
-INFO - Created Ejb(deployment-id=org.superbiz.injection.secure.MovieTest, ejb-name=org.superbiz.injection.secure.MovieTest, container=Default Managed Container)
-INFO - Started Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
-INFO - Started Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean, container=Default Stateless Container)
-INFO - Started Ejb(deployment-id=EmployeeBean, ejb-name=EmployeeBean, container=Default Stateless Container)
-INFO - Started Ejb(deployment-id=org.superbiz.injection.secure.MovieTest, ejb-name=org.superbiz.injection.secure.MovieTest, container=Default Managed Container)
-INFO - Deployed Application(path=/Users/dblevins/examples/testing-security)
-INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
-INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
-Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.518 sec
-
-Results :
-
-Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
-
-[INFO] 
-[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ testing-security ---
-[INFO] Building jar: /Users/dblevins/examples/testing-security/target/testing-security-1.0.jar
-[INFO] 
-[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ testing-security ---
-[INFO] Installing /Users/dblevins/examples/testing-security/target/testing-security-1.0.jar to /Users/dblevins/.m2/repository/org/superbiz/testing-security/1.0/testing-security-1.0.jar
-[INFO] Installing /Users/dblevins/examples/testing-security/pom.xml to /Users/dblevins/.m2/repository/org/superbiz/testing-security/1.0/testing-security-1.0.pom
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 5.412s
-[INFO] Finished at: Fri Oct 28 17:07:21 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.
-     */
+Title: Testing Security
+
+*Help us document this example! Source available in [svn](http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/testing-security) or [git](https://github.com/apache/openejb/tree/trunk/openejb/examples/testing-security). Open a [JIRA](https://issues.apache.org/jira/browse/TOMEE) with patch or pull request*
+
+## Movie
+
     package org.superbiz.injection.secure;
     
     import javax.persistence.Entity;
@@ -153,24 +48,10 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             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.
-     */
+
+## Movies
+
     package org.superbiz.injection.secure;
     
     //START SNIPPET: code
@@ -209,23 +90,24 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             return query.getResultList();
         }
     }
-    //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.
-     */
+
+## persistence.xml
+
+    <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+    
+      <persistence-unit name="movie-unit">
+        <jta-data-source>movieDatabase</jta-data-source>
+        <non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
+        <class>org.superbiz.injection.secure.Movie</class>
+    
+        <properties>
+          <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+      </persistence-unit>
+    </persistence>
+
+## MovieTest
+
     package org.superbiz.injection.secure;
     
     import junit.framework.TestCase;
@@ -245,7 +127,7 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
     
         @EJB
         private Movies movies;
-        
+    
         @EJB(name = "ManagerBean")
         private Caller manager;
     
@@ -328,11 +210,9 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
                 // Read access should be allowed
     
                 List<Movie> list = movies.getMovies();
-    
             } catch (EJBAccessException e) {
                 fail("Read access should be allowed");
             }
-    
         }
     
     
@@ -352,7 +232,6 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             public <V> V call(Callable<V> callable) throws Exception {
                 return callable.call();
             }
-    
         }
     
         @Stateless
@@ -362,8 +241,64 @@ Tests run: 3, Failures: 0, Errors: 0, Sk
             public <V> V call(Callable<V> callable) throws Exception {
                 return callable.call();
             }
-    
         }
-    
     }
-    //END SNIPPET: code
+
+# Running
+
+    
+    -------------------------------------------------------
+     T E S T S
+    -------------------------------------------------------
+    Running org.superbiz.injection.secure.MovieTest
+    Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
+    http://openejb.apache.org/
+    INFO - openejb.home = /Users/dblevins/examples/testing-security
+    INFO - openejb.base = /Users/dblevins/examples/testing-security
+    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/testing-security/target/classes
+    INFO - Found EjbModule in classpath: /Users/dblevins/examples/testing-security/target/test-classes
+    INFO - Beginning load: /Users/dblevins/examples/testing-security/target/classes
+    INFO - Beginning load: /Users/dblevins/examples/testing-security/target/test-classes
+    INFO - Configuring enterprise application: /Users/dblevins/examples/testing-security
+    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 Stateless Container, type=Container, provider-id=Default Stateless Container)
+    INFO - Auto-creating a container for bean ManagerBean: Container(type=STATELESS, id=Default Stateless 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.secure.MovieTest: Container(type=MANAGED, id=Default Managed Container)
+    INFO - Configuring PersistenceUnit(name=movie-unit)
+    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/testing-security" loaded.
+    INFO - Assembling app: /Users/dblevins/examples/testing-security
+    INFO - PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 405ms
+    INFO - Jndi(name="java:global/testing-security/Movies!org.superbiz.injection.secure.Movies")
+    INFO - Jndi(name="java:global/testing-security/Movies")
+    INFO - Jndi(name="java:global/testing-security/ManagerBean!org.superbiz.injection.secure.MovieTest$Caller")
+    INFO - Jndi(name="java:global/testing-security/ManagerBean")
+    INFO - Jndi(name="java:global/testing-security/EmployeeBean!org.superbiz.injection.secure.MovieTest$Caller")
+    INFO - Jndi(name="java:global/testing-security/EmployeeBean")
+    INFO - Jndi(name="java:global/EjbModule26174809/org.superbiz.injection.secure.MovieTest!org.superbiz.injection.secure.MovieTest")
+    INFO - Jndi(name="java:global/EjbModule26174809/org.superbiz.injection.secure.MovieTest")
+    INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+    INFO - Created Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean, container=Default Stateless Container)
+    INFO - Created Ejb(deployment-id=EmployeeBean, ejb-name=EmployeeBean, container=Default Stateless Container)
+    INFO - Created Ejb(deployment-id=org.superbiz.injection.secure.MovieTest, ejb-name=org.superbiz.injection.secure.MovieTest, container=Default Managed Container)
+    INFO - Started Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+    INFO - Started Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean, container=Default Stateless Container)
+    INFO - Started Ejb(deployment-id=EmployeeBean, ejb-name=EmployeeBean, container=Default Stateless Container)
+    INFO - Started Ejb(deployment-id=org.superbiz.injection.secure.MovieTest, ejb-name=org.superbiz.injection.secure.MovieTest, container=Default Managed Container)
+    INFO - Deployed Application(path=/Users/dblevins/examples/testing-security)
+    INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
+    INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
+    Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.574 sec
+    
+    Results :
+    
+    Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
+    

Modified: openejb/trunk/openejb/examples/testing-transactions/README.md
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/testing-transactions/README.md?rev=1195109&r1=1195108&r2=1195109&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/testing-transactions/README.md (original)
+++ openejb/trunk/openejb/examples/testing-transactions/README.md Sun Oct 30 03:44:33 2011
@@ -1,109 +1,9 @@
-[INFO] Scanning for projects...
-[INFO]                                                                         
-[INFO] ------------------------------------------------------------------------
-[INFO] Building OpenEJB :: Examples :: Testing Transactions 1.0
-[INFO] ------------------------------------------------------------------------
-[INFO] 
-[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ testing-transactions ---
-[INFO] Deleting /Users/dblevins/examples/testing-transactions/target
-[INFO] 
-[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ testing-transactions ---
-[INFO] Using 'UTF-8' encoding to copy filtered resources.
-[INFO] Copying 1 resource
-[INFO] 
-[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ testing-transactions ---
-[INFO] Compiling 2 source files to /Users/dblevins/examples/testing-transactions/target/classes
-[INFO] 
-[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ testing-transactions ---
-[INFO] Using 'UTF-8' encoding to copy filtered resources.
-[INFO] skip non existing resourceDirectory /Users/dblevins/examples/testing-transactions/src/test/resources
-[INFO] 
-[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ testing-transactions ---
-[INFO] Compiling 1 source file to /Users/dblevins/examples/testing-transactions/target/test-classes
-[INFO] 
-[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ testing-transactions ---
-[INFO] Surefire report directory: /Users/dblevins/examples/testing-transactions/target/surefire-reports
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running org.superbiz.injection.tx.MoviesTest
-Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
-http://openejb.apache.org/
-INFO - openejb.home = /Users/dblevins/examples/testing-transactions
-INFO - openejb.base = /Users/dblevins/examples/testing-transactions
-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/testing-transactions/target/classes
-INFO - Found EjbModule in classpath: /Users/dblevins/examples/testing-transactions/target/test-classes
-INFO - Beginning load: /Users/dblevins/examples/testing-transactions/target/classes
-INFO - Beginning load: /Users/dblevins/examples/testing-transactions/target/test-classes
-INFO - Configuring enterprise application: /Users/dblevins/examples/testing-transactions
-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 Stateless Container, type=Container, provider-id=Default Stateless Container)
-INFO - Auto-creating a container for bean TransactionBean: Container(type=STATELESS, id=Default Stateless 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.tx.MoviesTest: Container(type=MANAGED, id=Default Managed Container)
-INFO - Configuring PersistenceUnit(name=movie-unit)
-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/testing-transactions" loaded.
-INFO - Assembling app: /Users/dblevins/examples/testing-transactions
-INFO - PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 403ms
-INFO - Jndi(name="java:global/testing-transactions/Movies!org.superbiz.injection.tx.Movies")
-INFO - Jndi(name="java:global/testing-transactions/Movies")
-INFO - Jndi(name="java:global/testing-transactions/TransactionBean!org.superbiz.injection.tx.MoviesTest$Caller")
-INFO - Jndi(name="java:global/testing-transactions/TransactionBean")
-INFO - Jndi(name="java:global/EjbModule1945910404/org.superbiz.injection.tx.MoviesTest!org.superbiz.injection.tx.MoviesTest")
-INFO - Jndi(name="java:global/EjbModule1945910404/org.superbiz.injection.tx.MoviesTest")
-INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
-INFO - Created Ejb(deployment-id=TransactionBean, ejb-name=TransactionBean, container=Default Stateless Container)
-INFO - Created Ejb(deployment-id=org.superbiz.injection.tx.MoviesTest, ejb-name=org.superbiz.injection.tx.MoviesTest, container=Default Managed Container)
-INFO - Started Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
-INFO - Started Ejb(deployment-id=TransactionBean, ejb-name=TransactionBean, container=Default Stateless Container)
-INFO - Started Ejb(deployment-id=org.superbiz.injection.tx.MoviesTest, ejb-name=org.superbiz.injection.tx.MoviesTest, container=Default Managed Container)
-INFO - Deployed Application(path=/Users/dblevins/examples/testing-transactions)
-INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.393 sec
-
-Results :
-
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
-
-[INFO] 
-[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ testing-transactions ---
-[INFO] Building jar: /Users/dblevins/examples/testing-transactions/target/testing-transactions-1.0.jar
-[INFO] 
-[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ testing-transactions ---
-[INFO] Installing /Users/dblevins/examples/testing-transactions/target/testing-transactions-1.0.jar to /Users/dblevins/.m2/repository/org/superbiz/testing-transactions/1.0/testing-transactions-1.0.jar
-[INFO] Installing /Users/dblevins/examples/testing-transactions/pom.xml to /Users/dblevins/.m2/repository/org/superbiz/testing-transactions/1.0/testing-transactions-1.0.pom
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 5.342s
-[INFO] Finished at: Fri Oct 28 17:09:52 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.
-     */
+Title: Testing Transactions
+
+*Help us document this example! Source available in [svn](http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/testing-transactions) or [git](https://github.com/apache/openejb/tree/trunk/openejb/examples/testing-transactions). Open a [JIRA](https://issues.apache.org/jira/browse/TOMEE) with patch or pull request*
+
+## Movie
+
     package org.superbiz.injection.tx;
     
     import javax.persistence.Entity;
@@ -148,24 +48,10 @@ Tests run: 2, Failures: 0, Errors: 0, Sk
             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.
-     */
+
+## Movies
+
     package org.superbiz.injection.tx;
     
     import javax.ejb.Stateful;
@@ -199,23 +85,24 @@ Tests run: 2, Failures: 0, Errors: 0, Sk
             return query.getResultList();
         }
     }
-    //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.
-     */
+
+## persistence.xml
+
+    <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+    
+      <persistence-unit name="movie-unit">
+        <jta-data-source>movieDatabase</jta-data-source>
+        <non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
+        <class>org.superbiz.injection.tx.Movie</class>
+    
+        <properties>
+          <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+      </persistence-unit>
+    </persistence>
+
+## MoviesTest
+
     package org.superbiz.injection.tx;
     
     import junit.framework.TestCase;
@@ -302,8 +189,59 @@ Tests run: 2, Failures: 0, Errors: 0, Sk
             public <V> V call(Callable<V> callable) throws Exception {
                 return callable.call();
             }
-    
         }
-    
     }
-    //END SNIPPET: code
+
+# Running
+
+    
+    -------------------------------------------------------
+     T E S T S
+    -------------------------------------------------------
+    Running org.superbiz.injection.tx.MoviesTest
+    Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
+    http://openejb.apache.org/
+    INFO - openejb.home = /Users/dblevins/examples/testing-transactions
+    INFO - openejb.base = /Users/dblevins/examples/testing-transactions
+    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/testing-transactions/target/classes
+    INFO - Found EjbModule in classpath: /Users/dblevins/examples/testing-transactions/target/test-classes
+    INFO - Beginning load: /Users/dblevins/examples/testing-transactions/target/classes
+    INFO - Beginning load: /Users/dblevins/examples/testing-transactions/target/test-classes
+    INFO - Configuring enterprise application: /Users/dblevins/examples/testing-transactions
+    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 Stateless Container, type=Container, provider-id=Default Stateless Container)
+    INFO - Auto-creating a container for bean TransactionBean: Container(type=STATELESS, id=Default Stateless 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.tx.MoviesTest: Container(type=MANAGED, id=Default Managed Container)
+    INFO - Configuring PersistenceUnit(name=movie-unit)
+    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/testing-transactions" loaded.
+    INFO - Assembling app: /Users/dblevins/examples/testing-transactions
+    INFO - PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 406ms
+    INFO - Jndi(name="java:global/testing-transactions/Movies!org.superbiz.injection.tx.Movies")
+    INFO - Jndi(name="java:global/testing-transactions/Movies")
+    INFO - Jndi(name="java:global/testing-transactions/TransactionBean!org.superbiz.injection.tx.MoviesTest$Caller")
+    INFO - Jndi(name="java:global/testing-transactions/TransactionBean")
+    INFO - Jndi(name="java:global/EjbModule2036741132/org.superbiz.injection.tx.MoviesTest!org.superbiz.injection.tx.MoviesTest")
+    INFO - Jndi(name="java:global/EjbModule2036741132/org.superbiz.injection.tx.MoviesTest")
+    INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+    INFO - Created Ejb(deployment-id=TransactionBean, ejb-name=TransactionBean, container=Default Stateless Container)
+    INFO - Created Ejb(deployment-id=org.superbiz.injection.tx.MoviesTest, ejb-name=org.superbiz.injection.tx.MoviesTest, container=Default Managed Container)
+    INFO - Started Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+    INFO - Started Ejb(deployment-id=TransactionBean, ejb-name=TransactionBean, container=Default Stateless Container)
+    INFO - Started Ejb(deployment-id=org.superbiz.injection.tx.MoviesTest, ejb-name=org.superbiz.injection.tx.MoviesTest, container=Default Managed Container)
+    INFO - Deployed Application(path=/Users/dblevins/examples/testing-transactions)
+    INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
+    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.403 sec
+    
+    Results :
+    
+    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
+