You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by he...@apache.org on 2004/12/08 07:31:51 UTC

svn commit: r111229 - in geronimo/trunk/modules/axis: . src/java/org/apache/geronimo/axis src/test/org/apache/geronimo/axis src/test/org/apache/geronimo/axis/preconditions src/test/org/apache/geronimo/axis/testUtils

Author: hemapani
Date: Tue Dec  7 22:31:50 2004
New Revision: 111229

URL: http://svn.apache.org/viewcvs?view=rev&rev=111229
Log:
remove the getter setter injection and shift from GBeanMBean toGBeanData
Added:
   geronimo/trunk/modules/axis/log4j.properties
Removed:
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/JettyServiceWrapper.java
Modified:
   geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoUtils.java
   geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/Configuration.java
   geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJBWSGBean.java
   geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJOWSGBean.java
   geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/EchoHeadersTest.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimpleEJBWebServiceTest.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimplePOJOWebServiceTest.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/AxisGeronimoConstants.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManagerTest.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/TestingUtils.java

Added: geronimo/trunk/modules/axis/log4j.properties
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/log4j.properties?view=auto&rev=111229
==============================================================================
--- (empty file)
+++ geronimo/trunk/modules/axis/log4j.properties	Tue Dec  7 22:31:50 2004
@@ -0,0 +1,14 @@
+#### Use two appenders, one to log to console, another to log to a file
+log4j.rootCategory=debug, R
+
+####  appender writes to a file
+log4j.appender.R=org.apache.log4j.RollingFileAppender
+log4j.appender.R.File=target/test-reports/axis.log
+
+# Control the maximum log file size
+log4j.appender.R.MaxFileSize=10000KB
+# Archive log files (one backup file here)
+log4j.appender.R.MaxBackupIndex=100
+
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern=%6r %5p [%t] (%F:%L) - %m%n

Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoUtils.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoUtils.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoUtils.java&r1=111228&p2=geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoUtils.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoUtils.java	(original)
+++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoUtils.java	Tue Dec  7 22:31:50 2004
@@ -15,14 +15,11 @@
  */
 package org.apache.geronimo.axis;
 
-import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
 import java.lang.reflect.Method;
@@ -38,6 +35,7 @@
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
+
 import javax.ejb.EJBHome;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
@@ -51,7 +49,6 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
@@ -135,16 +132,6 @@
      * @param kernel
      * @throws DeploymentException
      */
-    public static void startGBean(ObjectName objectName, GBeanMBean gbean, Kernel kernel)
-            throws DeploymentException {
-        try {
-            startedGbeans.add(objectName);
-            kernel.loadGBean(objectName, gbean);
-            kernel.startGBean(objectName);
-        } catch (Exception e) {
-            throw new DeploymentException(e);
-        }
-    }
 
     public static void startGBean(GBeanData gbean, Kernel kernel, ClassLoader classLoader)
             throws DeploymentException {
@@ -164,11 +151,11 @@
      * @param kernel
      * @throws DeploymentException
      */
-    public static void startGBeanOnlyIfNotStarted(ObjectName objectName, GBeanMBean gbean, Kernel kernel)
+    public static void startGBeanOnlyIfNotStarted(ObjectName objectName, GBeanData gbean, Kernel kernel,ClassLoader classLoader)
             throws DeploymentException {
         try {
             if (!checkAlreadyStarted(objectName, kernel)) {
-                startGBean(objectName, gbean, kernel);
+                startGBean(gbean, kernel,classLoader);
                 log.info("Started .. " + objectName);
             } else {
                 log.info(objectName + " GBean already started");
@@ -362,24 +349,24 @@
     }
     
     
-    /**
-     * 
-     * @param unpackedCar
-     * @return
-     * @throws Exception
-     */
-    public static GBeanMBean loadConfig(File unpackedCar) throws Exception {
-        InputStream in = new FileInputStream(new File(unpackedCar, "META-INF/config.ser"));
-        try {
-            ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(in));
-            GBeanData config = new GBeanData();
-            config.readExternal(ois);
-            return new GBeanMBean(config, Thread.currentThread().getContextClassLoader());
-        } finally {
-            in.close();
-        }
-    }
-    
+//    /**
+//     * 
+//     * @param unpackedCar
+//     * @return
+//     * @throws Exception
+//     */
+//    public static GBeanMBean loadConfig(File unpackedCar) throws Exception {
+//        InputStream in = new FileInputStream(new File(unpackedCar, "META-INF/config.ser"));
+//        try {
+//            ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(in));
+//            GBeanData config = new GBeanData();
+//            config.readExternal(ois);
+//            return new GBeanMBean(config, Thread.currentThread().getContextClassLoader());
+//        } finally {
+//            in.close();
+//        }
+//    }
+//    
     /**
      * 
      * @param state

Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/Configuration.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/Configuration.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/Configuration.java&r1=111228&p2=geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/Configuration.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/Configuration.java	(original)
+++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/Configuration.java	Tue Dec  7 22:31:50 2004
@@ -20,5 +20,5 @@
  */
 
 public interface Configuration {
-    public ClassLoader getClassLoader();
+    public ClassLoader getConfigurationClassLoader();
 }

Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJBWSGBean.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJBWSGBean.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJBWSGBean.java&r1=111228&p2=geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJBWSGBean.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJBWSGBean.java	(original)
+++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJBWSGBean.java	Tue Dec  7 22:31:50 2004
@@ -16,6 +16,9 @@
 
 package org.apache.geronimo.axis;
 
+import java.util.Collection;
+import java.util.Iterator;
+
 import org.apache.axis.utils.ClassUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -23,49 +26,32 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.gbean.WaitingException;
-import org.apache.geronimo.kernel.config.Configuration;
-import org.apache.geronimo.kernel.jmx.JMXUtil;
 
-import javax.management.ObjectName;
-
-import java.util.Collection;
-import java.util.Iterator;
 
 /**
  * @version $Rev: $ $Date: $
  */
 public class EJBWSGBean implements GBeanLifecycle {
     private static Log log = LogFactory.getLog(EJBWSGBean.class);
-    /**
-     * Field name
-     */
-    private final String name;
-
-    /**
-     * Field GBEAN_INFO
-     */
     private static final GBeanInfo GBEAN_INFO;
 
-    /**
-     * Field objectName
-     */
-    private final ObjectName objectName;
-    private Configuration ejbConfig;
+    //GBean Attributes
+    private final String objectName;
+    private final Configuration ejbConfig;
     private Collection classList;
+    
 
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("EJBWSGBean",
                 EJBWSGBean.class);
-
-
         // attributes
-        infoFactory.addAttribute("Name", String.class, true);
         infoFactory.addAttribute("objectName", String.class, false);
         infoFactory.addReference("ejbConfig", Configuration.class);
         infoFactory.addAttribute("classList", Collection.class, true);
+        
         // operations
-        infoFactory.setConstructor(new String[]{"Name",
-                                                "objectName"});
+        infoFactory.setConstructor(new String[]{"objectName","ejbConfig","classList"});
+        
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 
@@ -75,9 +61,10 @@
      * @param name
      * @param objectName
      */
-    public EJBWSGBean(String name, String objectName) {
-        this.name = name;
-        this.objectName = JMXUtil.getObjectName(objectName);
+    public EJBWSGBean(String objectName,Configuration ejbConfig,Collection classList) {
+        this.objectName = objectName;
+        this.ejbConfig = ejbConfig;
+        this.classList = classList;
     }
 
     /**
@@ -94,7 +81,7 @@
      * @throws Exception
      */
     public void doStart() throws WaitingException, Exception {
-        System.out.println(name + "has started");
+        log.info(objectName + "has started");
         ClassLoader cl = ejbConfig.getConfigurationClassLoader();
         for (Iterator it = classList.iterator(); it.hasNext();) {
             String className = (String) it.next();
@@ -123,40 +110,4 @@
         return GBEAN_INFO;
     }
 
-    /**
-     * Method getName
-     *
-     * @return
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * @return
-     */
-    public Collection getClassList() {
-        return classList;
-    }
-
-    /**
-     * @return
-     */
-    public Configuration getEjbConfig() {
-        return ejbConfig;
-    }
-
-    /**
-     * @param collection
-     */
-    public void setClassList(Collection collection) {
-        classList = collection;
-    }
-
-    /**
-     * @param configuration
-     */
-    public void setEjbConfig(Configuration configuration) {
-        ejbConfig = configuration;
-    }
 }

Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJOWSGBean.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJOWSGBean.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJOWSGBean.java&r1=111228&p2=geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJOWSGBean.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJOWSGBean.java	(original)
+++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJOWSGBean.java	Tue Dec  7 22:31:50 2004
@@ -16,6 +16,11 @@
 
 package org.apache.geronimo.axis;
 
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collection;
+import java.util.Iterator;
+
 import org.apache.axis.utils.ClassUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -23,20 +28,18 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.gbean.WaitingException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Collection;
-import java.util.Iterator;
 
 /**
  * @version $Rev: $ $Date: $
  */
 public class POJOWSGBean implements GBeanLifecycle {
     private static Log log = LogFactory.getLog(POJOWSGBean.class);
-    private final String objectName;
+
     private static final GBeanInfo GBEAN_INFO;
-    private URL moduleURL;
-    private Collection classList;
+
+    private final String objectName;
+    private final URL moduleURL;
+    private final Collection classList;
 
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("POJOWSGBean",
@@ -47,13 +50,15 @@
         infoFactory.addAttribute("moduleURL", URL.class, true);
         infoFactory.addAttribute("classList", Collection.class, true);
         // operations
-        infoFactory.setConstructor(new String[]{"objectName"});
+        infoFactory.setConstructor(new String[]{"objectName","moduleURL","classList"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 
     
-    public POJOWSGBean(String objectName) {
+    public POJOWSGBean(String objectName,URL moduleURL,Collection classList) {
         this.objectName = objectName;
+        this.moduleURL = moduleURL;
+        this.classList = classList;
     }
 
 
@@ -61,6 +66,7 @@
     }
 
     public void doStart() throws WaitingException, Exception {
+        log.info("POJO WS starting");
         ClassLoader cl = new URLClassLoader(new URL[]{moduleURL});
         for (Iterator it = classList.iterator(); it.hasNext();) {
             String className = (String) it.next();
@@ -86,34 +92,5 @@
      */
     public static GBeanInfo getGBeanInfo() {
         return GBEAN_INFO;
-    }
-
-    /**
-     * @return
-     */
-    public URL getModuleURL() {
-        return moduleURL;
-    }
-
-
-    /**
-     * @param url
-     */
-    public void setModuleURL(URL url) {
-        moduleURL = url;
-    }
-
-    /**
-     * @return
-     */
-    public Collection getClassList() {
-        return classList;
-    }
-
-    /**
-     * @param collection
-     */
-    public void setClassList(Collection collection) {
-        classList = collection;
     }
 }

Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java&r1=111228&p2=geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java	(original)
+++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java	Tue Dec  7 22:31:50 2004
@@ -91,7 +91,7 @@
                 GBeanData wsGbean = new GBeanData(wsplan.getWsName(), EJBWSGBean.getGBeanInfo());
                 ArrayList classList = AxisGeronimoUtils.getClassFileList(new ZipFile(wsplan.getModule()));
                 wsGbean.setAttribute("classList", classList);
-                wsGbean.setReferencePattern("EjbConfig", wsplan.getEjbConfName());
+                wsGbean.setReferencePattern("ejbConfig", wsplan.getEjbConfName());
 
                 //create a configuraton with Web Service GBean
                 byte[] state = Configuration.storeGBeans(new GBeanData[] {wsGbean});

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java&r1=111228&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java	Tue Dec  7 22:31:50 2004
@@ -26,8 +26,8 @@
 
 import org.apache.geronimo.axis.testUtils.AxisGeronimoConstants;
 import org.apache.geronimo.axis.testUtils.TestingUtils;
+import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.WaitingException;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.j2ee.deployment.EARConfigBuilder;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
@@ -71,13 +71,13 @@
         TestingUtils.startJ2EEContinerAndAxisServlet(kernel);
         
         //Start axis gbean        
-        GBeanMBean axisgbean = new GBeanMBean(AxisGbean.getGBeanInfo());
-        kernel.loadGBean(axisname, axisgbean);
+        GBeanData axisgbData = new GBeanData(axisname,AxisGbean.getGBeanInfo());
+        kernel.loadGBean(axisgbData, Thread.currentThread().getContextClassLoader());
         kernel.startGBean(axisname);
         
-        GBeanMBean wsConfgBuilderbean = new GBeanMBean(WSConfigBuilder.getGBeanInfo());
+        GBeanData wsConfgBuilderbean = new GBeanData(wsConfgBuilderName,WSConfigBuilder.getGBeanInfo());
         wsConfgBuilderbean.setReferencePattern("AxisGbean",axisname);
-        kernel.loadGBean(wsConfgBuilderName, wsConfgBuilderbean);
+        kernel.loadGBean(wsConfgBuilderbean,Thread.currentThread().getContextClassLoader());
         kernel.startGBean(wsConfgBuilderName);
         
         

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java&r1=111228&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java	Tue Dec  7 22:31:50 2004
@@ -20,10 +20,11 @@
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.URLClassLoader;
+
 import javax.management.ObjectName;
 
 import org.apache.geronimo.axis.testUtils.TestingUtils;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
+import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.kernel.Kernel;
 
 /**
@@ -45,8 +46,8 @@
     public void testStartAxisService() throws Exception {
         ClassLoader cl = getClass().getClassLoader();
         ClassLoader myCl = new URLClassLoader(new URL[0], cl);
-        GBeanMBean gbean = new GBeanMBean(AxisGbean.getGBeanInfo(), myCl);
-        kernel.loadGBean(name, gbean);
+        GBeanData gbean = new GBeanData(name,AxisGbean.getGBeanInfo());
+        kernel.loadGBean(gbean,myCl);
         kernel.startGBean(name);
         System.out.println(kernel.getAttribute(name, "state"));
         HttpURLConnection connection = (HttpURLConnection) AxisGeronimoUtils.getURL("/axis/index.html").openConnection();
@@ -77,7 +78,7 @@
     protected void setUp() throws Exception {
         
         name = new ObjectName("test:name=AxisGBean");
-        kernel = new Kernel("test.kernel", "test");
+        kernel = new Kernel("test.kernel");
         kernel.boot();
         TestingUtils.startJ2EEContinerAndAxisServlet(kernel);
     }

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/EchoHeadersTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/EchoHeadersTest.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/EchoHeadersTest.java&r1=111228&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/EchoHeadersTest.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/EchoHeadersTest.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/EchoHeadersTest.java	Tue Dec  7 22:31:50 2004
@@ -34,7 +34,7 @@
 import org.apache.axis.client.Call;
 import org.apache.axis.client.Service;
 import org.apache.geronimo.axis.testUtils.TestingUtils;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
+import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.kernel.Kernel;
 
 /**
@@ -55,15 +55,15 @@
 
     protected void setUp() throws Exception {
         name = new ObjectName("test:name=AxisGBean");
-        kernel = new Kernel("test.kernel", "test");
+        kernel = new Kernel("test.kernel");
         kernel.boot();
         ClassLoader cl = getClass().getClassLoader();
         ClassLoader myCl = new URLClassLoader(new URL[]{}, cl);
         
         TestingUtils.startJ2EEContinerAndAxisServlet(kernel);
-        GBeanMBean gbean = new GBeanMBean(AxisGbean.getGBeanInfo(), myCl);
+        GBeanData gbean = new GBeanData(name,AxisGbean.getGBeanInfo());
         gbean.setAttribute("Name", "Test");
-        kernel.loadGBean(name, gbean);
+        kernel.loadGBean(gbean,myCl);
         kernel.startGBean(name);
         Service service = new Service();
         service.getEngine().setOption(AxisEngine.PROP_XML_ENCODING, "UTF-8");

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimpleEJBWebServiceTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimpleEJBWebServiceTest.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimpleEJBWebServiceTest.java&r1=111228&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimpleEJBWebServiceTest.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimpleEJBWebServiceTest.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimpleEJBWebServiceTest.java	Tue Dec  7 22:31:50 2004
@@ -22,19 +22,12 @@
 import java.io.InputStreamReader;
 import java.lang.reflect.Method;
 import java.net.HttpURLConnection;
-import java.net.URI;
 import java.net.URL;
 import java.net.URLClassLoader;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.management.ObjectName;
 
 import org.apache.geronimo.axis.testUtils.TestingUtils;
 import org.apache.geronimo.gbean.WaitingException;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.j2ee.deployment.EARConfigBuilder;
-import org.apache.geronimo.kernel.config.ConfigurationManager;
 
 /**
  * 
@@ -51,12 +44,10 @@
         ClassLoader myCl = new URLClassLoader(new URL[]{}, cl);
 
         File jarfile = new File(getTestFile("target/generated/samples/echo-jar/echo-ewsimpl.jar"));
-        ObjectName configName = new ObjectName("geronimo.test:name=" + jarfile.getName());
         
         EARConfigBuilder earConfigBuilder = getEARConfigBuilder();
         TestingUtils.buildConfiguration(jarfile,store,earConfigBuilder,kernel,wsConfgBuilderName);        
 
-        //let us try to brows the WSDL of the service
         URL wsdlrequestUrl = AxisGeronimoUtils.getURL("/axis/services/echoPort?wsdl");
         //+"/axis/services/AdminService?wsdl");
         

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimplePOJOWebServiceTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimplePOJOWebServiceTest.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimplePOJOWebServiceTest.java&r1=111228&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimplePOJOWebServiceTest.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimplePOJOWebServiceTest.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimplePOJOWebServiceTest.java	Tue Dec  7 22:31:50 2004
@@ -28,7 +28,6 @@
 import org.apache.axis.utils.ClassUtils;
 import org.apache.geronimo.axis.testUtils.TestingUtils;
 import org.apache.geronimo.gbean.WaitingException;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.j2ee.deployment.EARConfigBuilder;
 /**
  * 

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java&r1=111228&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java	Tue Dec  7 22:31:50 2004
@@ -18,20 +18,16 @@
 
 import java.io.File;
 import java.net.URI;
-import java.util.jar.JarFile;
 
 import javax.management.ObjectName;
 
 import org.apache.geronimo.axis.AbstractTestCase;
-import org.apache.geronimo.axis.EJBWSGBean;
 import org.apache.geronimo.axis.testUtils.AxisGeronimoConstants;
 import org.apache.geronimo.axis.testUtils.J2EEManager;
 import org.apache.geronimo.axis.testUtils.TestingUtils;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.j2ee.deployment.EARConfigBuilder;
 import org.apache.geronimo.j2ee.deployment.ResourceReferenceBuilder;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
 import org.openejb.deployment.OpenEJBModuleBuilder;
 

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/AxisGeronimoConstants.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/AxisGeronimoConstants.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/AxisGeronimoConstants.java&r1=111228&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/AxisGeronimoConstants.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/AxisGeronimoConstants.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/AxisGeronimoConstants.java	Tue Dec  7 22:31:50 2004
@@ -23,7 +23,6 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
 import org.apache.geronimo.system.configuration.LocalConfigStore;
-import org.openejb.deployment.OpenEJBModuleBuilder;
 
 /**
  * @version $Rev: $ $Date: $

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java&r1=111228&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java	Tue Dec  7 22:31:50 2004
@@ -27,7 +27,8 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.axis.AxisGeronimoUtils;
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.j2ee.management.impl.J2EEServerImpl;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.pool.ThreadPool;
@@ -58,12 +59,15 @@
             System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, str);
             setUpTransactionManager(kernel);
             setUpTimer(kernel);
-            GBeanMBean serverInfoGBean = new GBeanMBean(ServerInfo.GBEAN_INFO);
+            
+            GBeanData serverInfoGBean = new GBeanData(AxisGeronimoConstants.J2EE_SERVER_INFO,ServerInfo.GBEAN_INFO);
             serverInfoGBean.setAttribute("baseDirectory", ".");
-            AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.J2EE_SERVER_INFO, serverInfoGBean, kernel);
-            GBeanMBean j2eeServerGBean = new GBeanMBean(J2EEServerImpl.GBEAN_INFO);
+            AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.J2EE_SERVER_INFO, 
+                            serverInfoGBean, kernel,Thread.currentThread().getContextClassLoader());
+            
+            GBeanData j2eeServerGBean = new GBeanData(AxisGeronimoConstants.J2EE_SERVER_NAME,J2EEServerImpl.GBEAN_INFO);
             j2eeServerGBean.setReferencePatterns("ServerInfo", Collections.singleton(AxisGeronimoConstants.J2EE_SERVER_INFO));
-            AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.J2EE_SERVER_NAME, j2eeServerGBean, kernel);
+            AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.J2EE_SERVER_NAME, j2eeServerGBean, kernel,Thread.currentThread().getContextClassLoader());
                     
 
             // //load mock resource adapter for mdb
@@ -90,19 +94,22 @@
 
     private void setUpTransactionManager(Kernel kernel) throws AxisFault {
         try {
-            GBeanMBean tmGBean = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO);
+            GBeanData tmGBean = new GBeanData(AxisGeronimoConstants.TRANSACTION_MANAGER_NAME,GeronimoTransactionManager.GBEAN_INFO);
             Set rmpatterns = new HashSet();
             rmpatterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*"));
             tmGBean.setAttribute("defaultTransactionTimeoutSeconds", new Integer(10));
             tmGBean.setReferencePatterns("ResourceManagers", rmpatterns);
-            AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.TRANSACTION_MANAGER_NAME, tmGBean, kernel);
+            AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.TRANSACTION_MANAGER_NAME, tmGBean,
+                 kernel,Thread.currentThread().getContextClassLoader());
             
-            GBeanMBean tcmGBean = new GBeanMBean(TransactionContextManager.GBEAN_INFO);
+            GBeanData tcmGBean = new GBeanData(AxisGeronimoConstants.TRANSACTION_CONTEXT_MANAGER_NAME,TransactionContextManager.GBEAN_INFO);
             tcmGBean.setReferencePattern("TransactionManager", AxisGeronimoConstants.TRANSACTION_MANAGER_NAME);
-            AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.TRANSACTION_CONTEXT_MANAGER_NAME, tcmGBean, kernel);
+            AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.TRANSACTION_CONTEXT_MANAGER_NAME, 
+                tcmGBean, kernel,Thread.currentThread().getContextClassLoader());
             
-            GBeanMBean trackedConnectionAssociator = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO);
-            AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.TRACKED_CONNECTION_ASSOCIATOR_NAME, trackedConnectionAssociator, kernel);
+            GBeanData trackedConnectionAssociator = new GBeanData(AxisGeronimoConstants.TRACKED_CONNECTION_ASSOCIATOR_NAME,ConnectionTrackingCoordinator.GBEAN_INFO);
+            AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.TRACKED_CONNECTION_ASSOCIATOR_NAME,
+                 trackedConnectionAssociator, kernel,Thread.currentThread().getContextClassLoader());
         } catch (Exception e) {
             throw AxisFault.makeFault(e);
         }
@@ -119,21 +126,24 @@
     }
 
     public static void setUpTimer(Kernel kernel) throws Exception {
-        GBeanMBean threadPoolGBean = new GBeanMBean(ThreadPool.GBEAN_INFO);
+        GBeanData threadPoolGBean = new GBeanData(AxisGeronimoConstants.THREADPOOL_NAME,ThreadPool.GBEAN_INFO);
         threadPoolGBean.setAttribute("keepAliveTime", new Integer(5000));
         threadPoolGBean.setAttribute("poolSize", new Integer(5));
         threadPoolGBean.setAttribute("poolName", "DefaultThreadPool");
-        AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.THREADPOOL_NAME, threadPoolGBean, kernel);
+        AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.THREADPOOL_NAME, threadPoolGBean,
+             kernel,Thread.currentThread().getContextClassLoader());
         
-        GBeanMBean transactionalTimerGBean = new GBeanMBean(VMStoreThreadPooledTransactionalTimer.GBEAN_INFO);
+        GBeanData transactionalTimerGBean = new GBeanData(AxisGeronimoConstants.TRANSACTIONAL_TIMER_NAME,VMStoreThreadPooledTransactionalTimer.GBEAN_INFO);
         transactionalTimerGBean.setAttribute("repeatCount", new Integer(5));
         transactionalTimerGBean.setReferencePattern("TransactionContextManager", AxisGeronimoConstants.TRANSACTION_CONTEXT_MANAGER_NAME);
         transactionalTimerGBean.setReferencePattern("ThreadPool", AxisGeronimoConstants.THREADPOOL_NAME);
-        AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.TRANSACTIONAL_TIMER_NAME, transactionalTimerGBean, kernel);
+        AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.TRANSACTIONAL_TIMER_NAME, transactionalTimerGBean, 
+            kernel,Thread.currentThread().getContextClassLoader());
         
-        GBeanMBean nonTransactionalTimerGBean = new GBeanMBean(VMStoreThreadPooledNonTransactionalTimer.GBEAN_INFO);
+        GBeanData nonTransactionalTimerGBean = new GBeanData(AxisGeronimoConstants.NONTRANSACTIONAL_TIMER_NAME,VMStoreThreadPooledNonTransactionalTimer.GBEAN_INFO);
         nonTransactionalTimerGBean.setReferencePattern("ThreadPool", AxisGeronimoConstants.THREADPOOL_NAME);
-        AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.NONTRANSACTIONAL_TIMER_NAME, nonTransactionalTimerGBean, kernel);
+        AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.NONTRANSACTIONAL_TIMER_NAME, 
+            nonTransactionalTimerGBean, kernel,Thread.currentThread().getContextClassLoader());
     }
 
     private void stopTimer(Kernel kernel) throws AxisFault {
@@ -148,12 +158,22 @@
 
     public void startWebContainer(Kernel kernel) throws Exception {
         Set containerPatterns = Collections.singleton(AxisGeronimoConstants.WEB_CONTAINER_NAME);
-        GBeanMBean container = new GBeanMBean("org.apache.geronimo.jetty.JettyContainerImpl");
-        GBeanMBean connector = new GBeanMBean("org.apache.geronimo.jetty.connector.HTTPConnector");
+        
+        Class jettyClass = Class.forName("org.apache.geronimo.jetty.JettyContainerImpl");
+        GBeanInfo jettyinfo =  (GBeanInfo)jettyClass.getMethod("getGBeanInfo",null).invoke(null,null);
+        GBeanData container = new GBeanData(AxisGeronimoConstants.WEB_CONTAINER_NAME,jettyinfo);
+        
+        Class jconnectorClass = Class.forName("org.apache.geronimo.jetty.connector.HTTPConnector");
+        GBeanInfo connectorinfo =  (GBeanInfo)jconnectorClass.getMethod("getGBeanInfo",null).invoke(null,null);
+        GBeanData connector = new GBeanData(AxisGeronimoConstants.WEB_CONNECTOR_NAME,connectorinfo);
+        
         connector.setAttribute("port", new Integer(AxisGeronimoUtils.AXIS_SERVICE_PORT));
         connector.setReferencePatterns("JettyContainer", containerPatterns);
-        AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.WEB_CONTAINER_NAME, container, kernel);
-        AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.WEB_CONNECTOR_NAME, connector, kernel);
+        
+        AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.WEB_CONTAINER_NAME, container, 
+            kernel,Thread.currentThread().getContextClassLoader());
+        AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.WEB_CONNECTOR_NAME, connector,
+             kernel,Thread.currentThread().getContextClassLoader());
     }
 
     private void stopWebContainer(Kernel kernel) throws AxisFault {
@@ -166,7 +186,11 @@
     }
 
     public void startEJBContainer(Kernel kernel) throws Exception {
-        GBeanMBean containerIndexGBean = new GBeanMBean("org.openejb.ContainerIndex");
+        Class ciClass = Class.forName("org.openejb.ContainerIndex");
+        GBeanInfo ciinfo =  (GBeanInfo)ciClass.getMethod("getGBeanInfo",null).invoke(null,null);
+        GBeanData containerIndexGBean = new GBeanData(AxisGeronimoConstants.EJB_CONTAINER_NAME,ciinfo);
+        
+
         Set ejbContainerNames = new HashSet();
         ejbContainerNames.add(ObjectName.getInstance(AxisGeronimoConstants.J2EE_DOMAIN_NAME
                 + ":j2eeType=StatelessSessionBean,*"));
@@ -177,7 +201,7 @@
         containerIndexGBean.setReferencePatterns("EJBContainers",
                 ejbContainerNames);
         AxisGeronimoUtils.startGBeanOnlyIfNotStarted(AxisGeronimoConstants.EJB_CONTAINER_NAME,
-                containerIndexGBean, kernel);
+                containerIndexGBean, kernel,Thread.currentThread().getContextClassLoader());
     }
 
     private void stopEJBContainer(Kernel kernel) throws AxisFault {

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManagerTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManagerTest.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManagerTest.java&r1=111228&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManagerTest.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManagerTest.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManagerTest.java	Tue Dec  7 22:31:50 2004
@@ -41,7 +41,7 @@
 
     protected void setUp() throws Exception {
         name = new ObjectName("test:name=AxisGBean");
-        kernel = new Kernel("test.kernel", "test");
+        kernel = new Kernel("test.kernel");
         kernel.boot();
     }
 

Deleted: /geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/JettyServiceWrapper.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/JettyServiceWrapper.java?view=auto&rev=111228
==============================================================================

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/TestingUtils.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/TestingUtils.java?view=diff&rev=111229&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/TestingUtils.java&r1=111228&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/TestingUtils.java&r2=111229
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/TestingUtils.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/TestingUtils.java	Tue Dec  7 22:31:50 2004
@@ -154,6 +154,8 @@
 
         JarFile module = new JarFile(jarfile);
         File unpackedDir = store.createNewConfigurationDir();
+        System.out.println("\nHI HELLO" + unpackedDir.getAbsolutePath());
+        
         //Install the EJB
         Object ejbplan = earConfigBuilder.getDeploymentPlan(null, module);
         earConfigBuilder.buildConfiguration(ejbplan, module, unpackedDir);
@@ -162,7 +164,7 @@
 
         GBeanData config = store.getConfiguration(ejbURI);
         ConfigurationManager configurationManager = kernel.getConfigurationManager();
-        ObjectName configName = configurationManager.load(config, store.getBaseURL(ejbURI), Configuration.class.getClassLoader());
+        ObjectName configName = configurationManager.load(config, store.getBaseURL(ejbURI), Thread.currentThread().getContextClassLoader());
         kernel.startRecursiveGBean(configName);
         return configName;
     }