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 [6/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/ c...
Modified: openejb/trunk/openejb/examples/injection-of-entitymanager/README.md
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/injection-of-entitymanager/README.md?rev=1195109&r1=1195108&r2=1195109&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/injection-of-entitymanager/README.md (original)
+++ openejb/trunk/openejb/examples/injection-of-entitymanager/README.md Sun Oct 30 03:44:33 2011
@@ -1,100 +1,9 @@
-[INFO] Scanning for projects...
-[INFO]
-[INFO] ------------------------------------------------------------------------
-[INFO] Building OpenEJB :: Examples :: @PersistenceContext EntityManager Injection 1.0
-[INFO] ------------------------------------------------------------------------
-[INFO]
-[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ injection-of-entitymanager ---
-[INFO] Deleting /Users/dblevins/examples/injection-of-entitymanager/target
-[INFO]
-[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ injection-of-entitymanager ---
-[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-entitymanager ---
-[INFO] Compiling 2 source files to /Users/dblevins/examples/injection-of-entitymanager/target/classes
-[INFO]
-[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ injection-of-entitymanager ---
-[INFO] Using 'UTF-8' encoding to copy filtered resources.
-[INFO] skip non existing resourceDirectory /Users/dblevins/examples/injection-of-entitymanager/src/test/resources
-[INFO]
-[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ injection-of-entitymanager ---
-[INFO] Compiling 1 source file to /Users/dblevins/examples/injection-of-entitymanager/target/test-classes
-[INFO]
-[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ injection-of-entitymanager ---
-[INFO] Surefire report directory: /Users/dblevins/examples/injection-of-entitymanager/target/surefire-reports
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running org.superbiz.injection.jpa.MoviesTest
-Apache OpenEJB 4.0.0-beta-1 build: 20111002-04:06
-http://openejb.apache.org/
-INFO - openejb.home = /Users/dblevins/examples/injection-of-entitymanager
-INFO - openejb.base = /Users/dblevins/examples/injection-of-entitymanager
-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/injection-of-entitymanager/target/classes
-INFO - Beginning load: /Users/dblevins/examples/injection-of-entitymanager/target/classes
-INFO - Configuring enterprise application: /Users/dblevins/examples/injection-of-entitymanager
-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.jpa.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/injection-of-entitymanager" loaded.
-INFO - Assembling app: /Users/dblevins/examples/injection-of-entitymanager
-INFO - PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 413ms
-INFO - Jndi(name="java:global/injection-of-entitymanager/Movies!org.superbiz.injection.jpa.Movies")
-INFO - Jndi(name="java:global/injection-of-entitymanager/Movies")
-INFO - Jndi(name="java:global/EjbModule221571972/org.superbiz.injection.jpa.MoviesTest!org.superbiz.injection.jpa.MoviesTest")
-INFO - Jndi(name="java:global/EjbModule221571972/org.superbiz.injection.jpa.MoviesTest")
-INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
-INFO - Created Ejb(deployment-id=org.superbiz.injection.jpa.MoviesTest, ejb-name=org.superbiz.injection.jpa.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.jpa.MoviesTest, ejb-name=org.superbiz.injection.jpa.MoviesTest, container=Default Managed Container)
-INFO - Deployed Application(path=/Users/dblevins/examples/injection-of-entitymanager)
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.211 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-[INFO]
-[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ injection-of-entitymanager ---
-[INFO] Building jar: /Users/dblevins/examples/injection-of-entitymanager/target/injection-of-entitymanager-1.0.jar
-[INFO]
-[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ injection-of-entitymanager ---
-[INFO] Installing /Users/dblevins/examples/injection-of-entitymanager/target/injection-of-entitymanager-1.0.jar to /Users/dblevins/.m2/repository/org/superbiz/injection-of-entitymanager/1.0/injection-of-entitymanager-1.0.jar
-[INFO] Installing /Users/dblevins/examples/injection-of-entitymanager/pom.xml to /Users/dblevins/.m2/repository/org/superbiz/injection-of-entitymanager/1.0/injection-of-entitymanager-1.0.pom
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 5.094s
-[INFO] Finished at: Fri Oct 28 17:10:24 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: Injection Of Entitymanager
+
+*Help us document this example! Source available in [svn](http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/injection-of-entitymanager) or [git](https://github.com/apache/openejb/tree/trunk/openejb/examples/injection-of-entitymanager). Open a [JIRA](https://issues.apache.org/jira/browse/TOMEE) with patch or pull request*
+
+## Movie
+
package org.superbiz.injection.jpa;
//START SNIPPET: code
@@ -140,23 +49,9 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
this.year = year;
}
}
- //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.
- */
+
+## Movies
+
package org.superbiz.injection.jpa;
//START SNIPPET: code
@@ -186,25 +81,27 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
Query query = entityManager.createQuery("SELECT m from Movie as m");
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.jpa.Movie</class>
+
+ <properties>
+ <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+ </properties>
+ </persistence-unit>
+ </persistence>
+ <!-- END SNIPPET: code -->
+
+
+## MoviesTest
+
package org.superbiz.injection.jpa;
import junit.framework.TestCase;
@@ -242,4 +139,48 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
}
}
- //END SNIPPET: code
+
+# Running
+
+
+ -------------------------------------------------------
+ T E S T S
+ -------------------------------------------------------
+ Running org.superbiz.injection.jpa.MoviesTest
+ Apache OpenEJB 4.0.0-beta-1 build: 20111002-04:06
+ http://openejb.apache.org/
+ INFO - openejb.home = /Users/dblevins/examples/injection-of-entitymanager
+ INFO - openejb.base = /Users/dblevins/examples/injection-of-entitymanager
+ 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/injection-of-entitymanager/target/classes
+ INFO - Beginning load: /Users/dblevins/examples/injection-of-entitymanager/target/classes
+ INFO - Configuring enterprise application: /Users/dblevins/examples/injection-of-entitymanager
+ 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.jpa.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/injection-of-entitymanager" loaded.
+ INFO - Assembling app: /Users/dblevins/examples/injection-of-entitymanager
+ INFO - PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 462ms
+ INFO - Jndi(name="java:global/injection-of-entitymanager/Movies!org.superbiz.injection.jpa.Movies")
+ INFO - Jndi(name="java:global/injection-of-entitymanager/Movies")
+ INFO - Jndi(name="java:global/EjbModule1461341140/org.superbiz.injection.jpa.MoviesTest!org.superbiz.injection.jpa.MoviesTest")
+ INFO - Jndi(name="java:global/EjbModule1461341140/org.superbiz.injection.jpa.MoviesTest")
+ INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+ INFO - Created Ejb(deployment-id=org.superbiz.injection.jpa.MoviesTest, ejb-name=org.superbiz.injection.jpa.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.jpa.MoviesTest, ejb-name=org.superbiz.injection.jpa.MoviesTest, container=Default Managed Container)
+ INFO - Deployed Application(path=/Users/dblevins/examples/injection-of-entitymanager)
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.301 sec
+
+ Results :
+
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
Modified: 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=1195109&r1=1195108&r2=1195109&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/injection-of-env-entry/README.md (original)
+++ openejb/trunk/openejb/examples/injection-of-env-entry/README.md Sun Oct 30 03:44:33 2011
@@ -1,95 +1,9 @@
-[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.
- */
+Title: Injection Of Env Entry
+
+*Help us document this example! Source available in [svn](http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/injection-of-env-entry) or [git](https://github.com/apache/openejb/tree/trunk/openejb/examples/injection-of-env-entry). Open a [JIRA](https://issues.apache.org/jira/browse/TOMEE) with patch or pull request*
+
+## Configuration
+
package org.superbiz.injection.enventry;
import javax.annotation.Resource;
@@ -136,23 +50,9 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
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.
- */
+
+## Shape
+
package org.superbiz.injection.enventry;
/**
@@ -163,24 +63,10 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
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.
- */
+
+## Widget
+
package org.superbiz.injection.enventry;
/**
@@ -191,22 +77,42 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
*/
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.
- */
+
+## ejb-jar.xml
+
+ <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.0" metadata-complete="false">
+ <enterprise-beans>
+ <session>
+ <ejb-name>Configuration</ejb-name>
+ <env-entry>
+ <env-entry-name>org.superbiz.injection.enventry.Configuration/color</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>orange</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>org.superbiz.injection.enventry.Configuration/shape</env-entry-name>
+ <env-entry-type>org.superbiz.injection.enventry.Shape</env-entry-type>
+ <env-entry-value>TRIANGLE</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>org.superbiz.injection.enventry.Configuration/strategy</env-entry-name>
+ <env-entry-type>java.lang.Class</env-entry-type>
+ <env-entry-value>org.superbiz.injection.enventry.Widget</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <description>The name was explicitly set in the annotation so the classname prefix isn't required</description>
+ <env-entry-name>date</env-entry-name>
+ <env-entry-type>java.lang.Long</env-entry-type>
+ <env-entry-value>123456789</env-entry-value>
+ </env-entry>
+ </session>
+ </enterprise-beans>
+ </ejb-jar>
+ <!-- END SNIPPET: code -->
+
+
+## ConfigurationTest
+
package org.superbiz.injection.enventry;
import junit.framework.TestCase;
@@ -233,7 +139,43 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
assertEquals(new Date(123456789), configuration.getDate());
}
}
- //END SNIPPET: code
-
+
+# Running
+
+
+ -------------------------------------------------------
+ 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/EjbModule1355224018/org.superbiz.injection.enventry.ConfigurationTest!org.superbiz.injection.enventry.ConfigurationTest")
+ INFO - Jndi(name="java:global/EjbModule1355224018/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.664 sec
+
+ Results :
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
Modified: openejb/trunk/openejb/examples/interceptors/README.md
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/interceptors/README.md?rev=1195109&r1=1195108&r2=1195109&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/interceptors/README.md (original)
+++ openejb/trunk/openejb/examples/interceptors/README.md Sun Oct 30 03:44:33 2011
@@ -1,110 +1,9 @@
-[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.
- */
+Title: Interceptors
+
+*Help us document this example! Source available in [svn](http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/interceptors) or [git](https://github.com/apache/openejb/tree/trunk/openejb/examples/interceptors). Open a [JIRA](https://issues.apache.org/jira/browse/TOMEE) with patch or pull request*
+
+## ClassLevelInterceptorOne
+
package org.superbiz.interceptors;
import javax.interceptor.AroundInvoke;
@@ -119,24 +18,10 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## ClassLevelInterceptorSuperClassOne
+
package org.superbiz.interceptors;
import javax.interceptor.AroundInvoke;
@@ -151,24 +36,10 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## ClassLevelInterceptorSuperClassTwo
+
package org.superbiz.interceptors;
import javax.interceptor.AroundInvoke;
@@ -183,24 +54,10 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## ClassLevelInterceptorTwo
+
package org.superbiz.interceptors;
import javax.interceptor.AroundInvoke;
@@ -215,24 +72,10 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## DefaultInterceptorOne
+
package org.superbiz.interceptors;
import javax.annotation.PostConstruct;
@@ -254,22 +97,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## DefaultInterceptorTwo
+
package org.superbiz.interceptors;
import javax.interceptor.AroundInvoke;
@@ -284,24 +114,10 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## FullyIntercepted
+
package org.superbiz.interceptors;
import java.util.List;
@@ -314,24 +130,10 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## FullyInterceptedBean
+
package org.superbiz.interceptors;
import javax.ejb.Local;
@@ -369,22 +171,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## FullyInterceptedSuperClass
+
package org.superbiz.interceptors;
import javax.interceptor.Interceptors;
@@ -394,24 +183,10 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
*/
@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.
- */
+
+## MethodLevelInterceptorOne
+
package org.superbiz.interceptors;
import javax.interceptor.AroundInvoke;
@@ -427,22 +202,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## MethodLevelInterceptorOnlyIntf
+
package org.superbiz.interceptors;
import java.io.Serializable;
@@ -451,22 +213,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## MethodLevelInterceptorOnlyParent
+
package org.superbiz.interceptors;
import java.util.List;
@@ -475,22 +224,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## MethodLevelInterceptorOnlySLSBean
+
package org.superbiz.interceptors;
import javax.ejb.Local;
@@ -510,22 +246,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## MethodLevelInterceptorTwo
+
package org.superbiz.interceptors;
import javax.interceptor.AroundInvoke;
@@ -541,22 +264,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## SecondStatelessInterceptedBean
+
package org.superbiz.interceptors;
import javax.ejb.Stateless;
@@ -578,7 +288,6 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
List<String> list = new ArrayList<String>();
list.add("methodWithDefaultInterceptorsExcluded");
return list;
-
}
@AroundInvoke
@@ -586,22 +295,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## SecondStatelessInterceptedLocal
+
package org.superbiz.interceptors;
import java.util.List;
@@ -612,22 +308,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## SuperClassOfClassLevelInterceptor
+
package org.superbiz.interceptors;
import javax.annotation.PostConstruct;
@@ -649,22 +332,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## ThirdSLSBean
+
package org.superbiz.interceptors;
import javax.ejb.Stateless;
@@ -705,22 +375,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## ThirdSLSBeanLocal
+
package org.superbiz.interceptors;
import java.util.List;
@@ -733,22 +390,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## Utils
+
package org.superbiz.interceptors;
import javax.interceptor.InvocationContext;
@@ -769,24 +413,51 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
}
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.
- */
+
+## ejb-jar.xml
+
+ <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+ version="3.0">
+ <interceptors>
+ <interceptor>
+ <interceptor-class>org.superbiz.interceptors.DefaultInterceptorOne</interceptor-class>
+ </interceptor>
+ <interceptor>
+ <interceptor-class>org.superbiz.interceptors.DefaultInterceptorTwo</interceptor-class>
+ </interceptor>
+ </interceptors>
+ <assembly-descriptor>
+ <interceptor-binding>
+ <ejb-name>*</ejb-name>
+ <interceptor-class>org.superbiz.interceptors.DefaultInterceptorOne</interceptor-class>
+ </interceptor-binding>
+ <interceptor-binding>
+ <ejb-name>*</ejb-name>
+ <interceptor-class>org.superbiz.interceptors.DefaultInterceptorTwo</interceptor-class>
+ </interceptor-binding>
+ <interceptor-binding>
+ <ejb-name>FullyInterceptedBean</ejb-name>
+ <exclude-default-interceptors>true</exclude-default-interceptors>
+ <method>
+ <method-name>methodWithDefaultInterceptorsExcluded</method-name>
+ </method>
+ </interceptor-binding>
+ <interceptor-binding>
+ <ejb-name>SecondStatelessInterceptedBean</ejb-name>
+ <exclude-default-interceptors>true</exclude-default-interceptors>
+ </interceptor-binding>
+ <interceptor-binding>
+ <ejb-name>MethodLevelInterceptorOnlySLSBean</ejb-name>
+ <exclude-default-interceptors>true</exclude-default-interceptors>
+ </interceptor-binding>
+ </assembly-descriptor>
+ </ejb-jar>
+
+## FullyInterceptedTest
+
package org.superbiz.interceptors;
import junit.framework.TestCase;
@@ -865,22 +536,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## MethodLevelInterceptorOnlyTest
+
package org.superbiz.interceptors;
import junit.framework.TestCase;
@@ -921,22 +579,10 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+ }
+
+## SecondStatelessInterceptedTest
+
package org.superbiz.interceptors;
import junit.framework.TestCase;
@@ -984,22 +630,9 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
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.
- */
+
+## ThirdSLSBeanTest
+
package org.superbiz.interceptors;
import junit.framework.TestCase;
@@ -1061,3 +694,58 @@ Tests run: 6, Failures: 0, Errors: 0, Sk
assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
}
}
+
+# Running
+
+
+ -------------------------------------------------------
+ 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.564 sec
+ Running org.superbiz.interceptors.MethodLevelInterceptorOnlyTest
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 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.004 sec
+
+ Results :
+
+ Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
+
Modified: openejb/trunk/openejb/examples/jpa-eclipselink/README.md
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/jpa-eclipselink/README.md?rev=1195109&r1=1195108&r2=1195109&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/jpa-eclipselink/README.md (original)
+++ openejb/trunk/openejb/examples/jpa-eclipselink/README.md Sun Oct 30 03:44:33 2011
@@ -1,103 +1,9 @@
-[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.
- */
+Title: JPA Eclipselink
+
+*Help us document this example! Source available in [svn](http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/jpa-eclipselink) or [git](https://github.com/apache/openejb/tree/trunk/openejb/examples/jpa-eclipselink). Open a [JIRA](https://issues.apache.org/jira/browse/TOMEE) with patch or pull request*
+
+## Movie
+
package org.superbiz.eclipselink;
import javax.persistence.Entity;
@@ -149,24 +55,10 @@ Tests run: 1, 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.eclipselink;
import javax.ejb.Stateful;
@@ -194,24 +86,29 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
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.
- */
+
+## persistence.xml
+
+ <persistence version="1.0"
+ xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
+ <persistence-unit name="movie-unit">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <jta-data-source>movieDatabase</jta-data-source>
+ <non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
+ <properties>
+ <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.HSQLPlatform"/>
+ <property name="eclipselink.ddl-generation" value="create-tables"/>
+ <property name="eclipselink.ddl-generation.output-mode" value="database"/>
+ </properties>
+ </persistence-unit>
+ </persistence>
+
+
+## MoviesTest
+
package org.superbiz.eclipselink;
import junit.framework.TestCase;
@@ -250,3 +147,48 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
}
}
+
+# Running
+
+
+ -------------------------------------------------------
+ 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 - 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 511ms
+ 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/EjbModule225280863/org.superbiz.eclipselink.MoviesTest!org.superbiz.eclipselink.MoviesTest")
+ INFO - Jndi(name="java:global/EjbModule225280863/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)
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.188 sec
+
+ Results :
+
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+