dain        2005/02/10 01:38:32

  Modified:    modules/openejb-builder/src/test/org/openejb/deployment/slsb
                        BasicStatelessContainerTest.java
  Log:

  Rework the serialization code a bit
  Changed EJBConfigbuilderTest so the verifiy method is broken into several 
test method
  
  Revision  Changes    Path
  1.5       +21 -1     
openejb/modules/openejb-builder/src/test/org/openejb/deployment/slsb/BasicStatelessContainerTest.java
  
  Index: BasicStatelessContainerTest.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/openejb-builder/src/test/org/openejb/deployment/slsb/BasicStatelessContainerTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BasicStatelessContainerTest.java  26 Jan 2005 23:28:02 -0000      1.4
  +++ BasicStatelessContainerTest.java  10 Feb 2005 06:38:32 -0000      1.5
  @@ -63,6 +63,8 @@
   import org.openejb.transaction.ContainerPolicy;
   import org.openejb.transaction.TransactionPolicy;
   import org.openejb.transaction.TransactionPolicySource;
  +import org.openejb.proxy.EJBProxyReference;
  +import org.openejb.ContainerIndex;
   
   /**
    * @version $Revision$ $Date$
  @@ -72,6 +74,18 @@
       private Kernel kernel;
       private GBeanData container;
   
  +    public void testCrossClInvocation() throws Throwable {
  +        EJBProxyReference proxyReference = 
EJBProxyReference.createRemote(CONTAINER_NAME.getCanonicalName(),
  +                        true,
  +                        MockRemote.class.getName(),
  +                        MockHome.class.getName());
  +        proxyReference.setKernel(kernel);
  +        proxyReference.setClassLoader(this.getClass().getClassLoader());
  +        MockHome home = (MockHome) proxyReference.getContent();
  +        MockRemote remote = home.create();
  +        assertEquals(2, remote.intMethod(1));
  +    }
  +
       public void testRemoteInvocation() throws Throwable {
           MockHome home = (MockHome) kernel.getAttribute(CONTAINER_NAME, 
"ejbHome");
           MockRemote remote = home.create();
  @@ -176,6 +190,12 @@
           container.setReferencePatterns("TrackedConnectionAssociator", 
Collections.singleton(DeploymentHelper.TRACKEDCONNECTIONASSOCIATOR_NAME));
           container.setReferencePattern("Timer", 
DeploymentHelper.TRANSACTIONALTIMER_NAME);
           start(CONTAINER_NAME, container);
  +
  +        ObjectName containerIndexname = 
JMXUtil.getObjectName("geronimo.test:type=ConatainerIndex");
  +        GBeanData containerIndex = new GBeanData(containerIndexname, 
ContainerIndex.GBEAN_INFO);
  +        containerIndex.setReferencePattern("EJBContainers", CONTAINER_NAME);
  +        kernel.loadGBean(containerIndex, this.getClass().getClassLoader());
  +        kernel.startGBean(containerIndexname);
       }
   
       protected void tearDown() throws Exception {
  
  
  

Reply via email to