djencks     2004/12/26 21:03:25

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

  replace GBeanMBean with GBeanData in openejb
  
  Revision  Changes    Path
  1.2       +6 -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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BasicBMPEntityContainerTest.java  10 Nov 2004 01:35:10 -0000      1.1
  +++ BasicBMPEntityContainerTest.java  27 Dec 2004 02:03:25 -0000      1.2
  @@ -53,10 +53,10 @@
   import javax.management.ObjectName;
   
   import junit.framework.TestCase;
  -import org.apache.geronimo.gbean.jmx.GBeanMBean;
   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;
  @@ -71,7 +71,7 @@
   public class BasicBMPEntityContainerTest extends TestCase {
       private static final ObjectName CONTAINER_NAME = 
JMXUtil.getObjectName("geronimo.test:ejb=Mock");
       private Kernel kernel;
  -    private GBeanMBean container;
  +    private GBeanData container;
   
   
       public void testSimpleConfig() throws Throwable {
  @@ -171,8 +171,9 @@
           kernel.shutdown();
       }
   
  -    private void start(ObjectName name, GBeanMBean instance) throws 
Exception {
  -        kernel.loadGBean(name, instance);
  +    private void start(ObjectName name, GBeanData instance) throws Exception 
{
  +        instance.setName(name);
  +        kernel.loadGBean(instance, this.getClass().getClassLoader());
           kernel.startGBean(name);
       }
   
  
  
  
  1.3       +9 -8      
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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BasicCMPEntityContainerTest.java  10 Dec 2004 00:40:31 -0000      1.2
  +++ BasicCMPEntityContainerTest.java  27 Dec 2004 02:03:25 -0000      1.3
  @@ -63,13 +63,13 @@
   import junit.framework.AssertionFailedError;
   import junit.framework.TestCase;
   
  -import org.apache.geronimo.gbean.jmx.GBeanMBean;
   import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
   import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContextImpl;
   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;
   import org.openejb.deployment.CMPContainerBuilder;
  @@ -105,7 +105,7 @@
       private static final ObjectName CONTAINER_NAME = 
JMXUtil.getObjectName("openejb.server:ejb=Mock");
       private static final ObjectName CI_NAME = 
JMXUtil.getObjectName("openejb.server:role=ContainerIndex");
       private Kernel kernel;
  -    private GBeanMBean container;
  +    private GBeanData container;
   
       private DataSource ds;
   
  @@ -458,13 +458,13 @@
           
           container = builder.createConfiguration();
   
  -        GBeanMBean containerIndex = new 
GBeanMBean(ContainerIndex.GBEAN_INFO);
  +        GBeanData containerIndex = new GBeanData(ContainerIndex.GBEAN_INFO);
           containerIndex.setReferencePatterns("EJBContainers", 
Collections.singleton(CONTAINER_NAME));
           start(CI_NAME, containerIndex);
   
  -        GBeanMBean connectionProxyFactoryGBean = new 
GBeanMBean(MockConnectionProxyFactory.GBEAN_INFO);
           ObjectName connectionProxyFactoryObjectName = 
NameFactory.getResourceComponentName(null, null, null, "jcamodule", "testcf", 
NameFactory.JCA_CONNECTION_FACTORY, j2eeContext);
  -        kernel.loadGBean(connectionProxyFactoryObjectName, 
connectionProxyFactoryGBean);
  +        GBeanData connectionProxyFactoryGBean = new 
GBeanData(connectionProxyFactoryObjectName, 
MockConnectionProxyFactory.GBEAN_INFO);
  +        kernel.loadGBean(connectionProxyFactoryGBean, 
this.getClass().getClassLoader());
           kernel.startGBean(connectionProxyFactoryObjectName);
   
           //start the ejb container
  @@ -482,8 +482,9 @@
           c.createStatement().execute("SHUTDOWN");
       }
   
  -    private void start(ObjectName name, GBeanMBean instance) throws 
Exception {
  -        kernel.loadGBean(name, instance);
  +    private void start(ObjectName name, GBeanData instance) throws Exception 
{
  +        instance.setName(name);
  +        kernel.loadGBean(instance, this.getClass().getClassLoader());
           kernel.startGBean(name);
       }
   
  
  
  

Reply via email to