geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r154950 - geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperTest.java
Date Wed, 23 Feb 2005 04:21:15 GMT
Author: jboynes
Date: Tue Feb 22 20:21:15 2005
New Revision: 154950

URL: http://svn.apache.org/viewcvs?view=rev&rev=154950
Log:
remove useof deprecated GBeanMBean

Modified:
    geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperTest.java

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperTest.java?view=diff&r1=154949&r2=154950
==============================================================================
--- geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperTest.java
(original)
+++ geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperTest.java
Tue Feb 22 20:21:15 2005
@@ -41,7 +41,7 @@
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
+import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContextImpl;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
@@ -144,21 +144,23 @@
     protected void setUp() throws Exception {
         kernel = new Kernel(KERNEL_NAME);
         kernel.boot();
-        GBeanMBean ctc = new GBeanMBean(MockConnectionTrackingCoordinator.getGBeanInfo());
+        ClassLoader cl = MockConnectionTrackingCoordinator.class.getClassLoader();
         ctcName = ObjectName.getInstance("test:role=ConnectionTrackingCoordinator");
-        kernel.loadGBean(ctcName, ctc);
-        GBeanMBean cmf = new GBeanMBean(GenericConnectionManager.getGBeanInfo());
+        GBeanData ctc = new GBeanData(ctcName, MockConnectionTrackingCoordinator.getGBeanInfo());
+        kernel.loadGBean(ctc, cl);
+
+        cmfName = ObjectName.getInstance("test:role=ConnectionManagerFactory");
+        GBeanData cmf = new GBeanData(cmfName, GenericConnectionManager.getGBeanInfo());
         cmf.setAttribute("transactionSupport", NoTransactions.INSTANCE);
         cmf.setAttribute("pooling", new NoPool());
         cmf.setAttribute("name", "TestCF");
         cmf.setReferencePatterns("ConnectionTracker", Collections.singleton(ctcName));
-        cmfName = ObjectName.getInstance("test:role=ConnectionManagerFactory");
-        kernel.loadGBean(cmfName, cmf);
+        kernel.loadGBean(cmf, cl);
 
         J2eeContext j2eeContext = new J2eeContextImpl("test.domain", "geronimo", "testapplication",
"noModuleType", "testmodule", TARGET_NAME, NameFactory.JCA_MANAGED_CONNECTION_FACTORY);
         managedConnectionFactoryName = NameFactory.getComponentName(null, null, null, NameFactory.JCA_RESOURCE,
null, null, null, j2eeContext);
 
-        GBeanMBean mcfw = new GBeanMBean(ManagedConnectionFactoryWrapper.getGBeanInfo());
+        GBeanData mcfw = new GBeanData(managedConnectionFactoryName, ManagedConnectionFactoryWrapper.getGBeanInfo());
         mcfw.setAttribute("managedConnectionFactoryClass", MockManagedConnectionFactory.class.getName());
         mcfw.setAttribute("connectionFactoryInterface", ConnectionFactory.class.getName());
         mcfw.setAttribute("implementedInterfaces", new String[] {Serializable.class.getName(),
ConnectionFactoryExtension.class.getName()});
@@ -169,7 +171,7 @@
         //"ResourceAdapterWrapper",
         mcfw.setReferencePatterns("ConnectionManagerFactory", Collections.singleton(cmfName));
         //"ManagedConnectionFactoryListener",
-        kernel.loadGBean(managedConnectionFactoryName, mcfw);
+        kernel.loadGBean(mcfw, cl);
 
         kernel.startGBean(ctcName);
         kernel.startGBean(cmfName);



Mime
View raw message