tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1208486 - /openejb/trunk/openejb/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java
Date Wed, 30 Nov 2011 16:17:00 GMT
Author: rmannibucau
Date: Wed Nov 30 16:16:59 2011
New Revision: 1208486

URL: http://svn.apache.org/viewvc?rev=1208486&view=rev
Log:
using the container in injection of entitymanager example to be able to close it

Modified:
    openejb/trunk/openejb/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java

Modified: openejb/trunk/openejb/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java?rev=1208486&r1=1208485&r2=1208486&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java
(original)
+++ openejb/trunk/openejb/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java
Wed Nov 30 16:16:59 2011
@@ -33,7 +33,8 @@ public class MoviesTest extends TestCase
         p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
         p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
 
-        final Context context = EJBContainer.createEJBContainer(p).getContext();
+        EJBContainer container = EJBContainer.createEJBContainer(p);
+        final Context context = container.getContext();
 
         Movies movies = (Movies) context.lookup("java:global/injection-of-entitymanager/Movies");
 
@@ -49,6 +50,8 @@ public class MoviesTest extends TestCase
         }
 
         assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
+
+        container.close();
     }
 }
 //END SNIPPET: code



Mime
View raw message