dain        2005/01/26 18:28:02

  Modified:    modules/openejb-builder/src/test/org/openejb/deployment/entity
                        BasicBMPEntityContainerTest.java
                        BasicCMPEntityContainerTest.java
  Log:

  ENC is now passed around as a Map instead of a jndi Context.  This allows the 
ejb container to modify it and inject the kernel and class loader into 
references.
  Changed Stateless and MDB containers to use system chain for ejbCreate and 
ejbRemove invocations.
  Added test to verify that ejbRemove is propertly called from the cache code.
  
  Revision  Changes    Path
  1.4       +5 -5      
openejb/modules/openejb-builder/src/test/org/openejb/deployment/entity/BasicBMPEntityContainerTest.java
  
  Index: BasicBMPEntityContainerTest.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/openejb-builder/src/test/org/openejb/deployment/entity/BasicBMPEntityContainerTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BasicBMPEntityContainerTest.java  22 Jan 2005 00:39:15 -0000      1.3
  +++ BasicBMPEntityContainerTest.java  26 Jan 2005 23:28:02 -0000      1.4
  @@ -48,15 +48,15 @@
   package org.openejb.deployment.entity;
   
   import java.util.Collections;
  +import java.util.HashMap;
   import java.util.HashSet;
   import javax.ejb.EJBObject;
   import javax.management.ObjectName;
   
   import junit.framework.TestCase;
  +import org.apache.geronimo.gbean.GBeanData;
   import org.apache.geronimo.kernel.Kernel;
   import org.apache.geronimo.kernel.jmx.JMXUtil;
  -import org.apache.geronimo.naming.java.ReadOnlyContext;
  -import org.apache.geronimo.gbean.GBeanData;
   import org.openejb.deployment.BMPContainerBuilder;
   import org.openejb.deployment.DeploymentHelper;
   import org.openejb.dispatch.InterfaceMethodSignature;
  @@ -119,7 +119,7 @@
           MockLocalHome localHome = (MockLocalHome) 
kernel.getAttribute(CONTAINER_NAME, "ejbLocalHome");
           MockLocal local = localHome.create(new Integer(1), null);
           local.startTimer();
  -        Thread.currentThread().sleep(400L);
  +        Thread.sleep(400L);
           int timeoutCount = local.getTimeoutCount();
           assertEquals(1, timeoutCount);
       }
  @@ -156,7 +156,7 @@
               }
           });
           builder.setSecurityConfiguration(new SecurityConfiguration());
  -        builder.setComponentContext(new ReadOnlyContext());
  +        builder.setComponentContext(new HashMap());
           container = builder.createConfiguration();
   
           //start the ejb container
  
  
  
  1.5       +3 -3      
openejb/modules/openejb-builder/src/test/org/openejb/deployment/entity/BasicCMPEntityContainerTest.java
  
  Index: BasicCMPEntityContainerTest.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/openejb-builder/src/test/org/openejb/deployment/entity/BasicCMPEntityContainerTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BasicCMPEntityContainerTest.java  22 Jan 2005 00:39:15 -0000      1.4
  +++ BasicCMPEntityContainerTest.java  26 Jan 2005 23:28:02 -0000      1.5
  @@ -54,6 +54,7 @@
   import java.sql.Statement;
   import java.util.Collections;
   import java.util.HashSet;
  +import java.util.HashMap;
   
   import javax.ejb.NoSuchObjectLocalException;
   import javax.ejb.ObjectNotFoundException;
  @@ -68,7 +69,6 @@
   import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
   import org.apache.geronimo.kernel.Kernel;
   import org.apache.geronimo.kernel.jmx.JMXUtil;
  -import org.apache.geronimo.naming.java.ReadOnlyContext;
   import org.apache.geronimo.gbean.GBeanData;
   import org.axiondb.jdbc.AxionDataSource;
   import org.openejb.ContainerIndex;
  @@ -430,7 +430,7 @@
           builder.setEJBSchema(ejbSchema);
           builder.setSQLSchema(sqlSchema);
           builder.setGlobalSchema(globalSchema);
  -        builder.setComponentContext(new ReadOnlyContext());
  +        builder.setComponentContext(new HashMap());
   //        builder.setConnectionFactoryName("defaultDatasource");
   
           EJBProxyFactory proxyFactory = new 
EJBProxyFactory(CONTAINER_NAME.getCanonicalName(), false, MockRemote.class, 
MockHome.class, MockLocal.class, MockLocalHome.class);
  
  
  

Reply via email to