You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2012/11/07 11:25:40 UTC

svn commit: r1406520 - /openejb/trunk/openejb/examples/reload-persistence-unit-properties/src/test/java/org/superbiz/reloadable/pu/CacheActivationTest.java

Author: rmannibucau
Date: Wed Nov  7 10:25:39 2012
New Revision: 1406520

URL: http://svn.apache.org/viewvc?rev=1406520&view=rev
Log:
reloadable em example needs jmx

Modified:
    openejb/trunk/openejb/examples/reload-persistence-unit-properties/src/test/java/org/superbiz/reloadable/pu/CacheActivationTest.java

Modified: openejb/trunk/openejb/examples/reload-persistence-unit-properties/src/test/java/org/superbiz/reloadable/pu/CacheActivationTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/reload-persistence-unit-properties/src/test/java/org/superbiz/reloadable/pu/CacheActivationTest.java?rev=1406520&r1=1406519&r2=1406520&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/reload-persistence-unit-properties/src/test/java/org/superbiz/reloadable/pu/CacheActivationTest.java (original)
+++ openejb/trunk/openejb/examples/reload-persistence-unit-properties/src/test/java/org/superbiz/reloadable/pu/CacheActivationTest.java Wed Nov  7 10:25:39 2012
@@ -17,6 +17,7 @@
 
 package org.superbiz.reloadable.pu;
 
+import org.apache.openejb.monitoring.LocalMBeanServer;
 import org.apache.openjpa.persistence.StoreCacheImpl;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -33,6 +34,7 @@ import javax.naming.NamingException;
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.PersistenceUnit;
 import java.lang.management.ManagementFactory;
+import java.util.Properties;
 
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertNotNull;
@@ -51,7 +53,9 @@ public class CacheActivationTest {
 
     @BeforeClass
     public static void start() {
-        container = EJBContainer.createEJBContainer();
+        final Properties properties = new Properties();
+        properties.setProperty(LocalMBeanServer.OPENEJB_JMX_ACTIVE, Boolean.TRUE.toString());
+        container = EJBContainer.createEJBContainer(properties);
     }
 
     @Before