geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r109269 - in geronimo/trunk/modules: axis/src/test/org/apache/geronimo/axis axis/src/test/org/apache/geronimo/axis/testUtils connector-builder/src/test/org/apache/geronimo/connector/deployment deployment/src/java/org/apache/geronimo/deployment j2ee/src/test/org/apache/geronimo/j2ee/management jetty/src/test/org/apache/geronimo/jetty kernel/src/java/org/apache/geronimo/kernel kernel/src/java/org/apache/geronimo/kernel/config kernel/src/java/org/apache/geronimo/kernel/proxy kernel/src/test/org/apache/geronimo/kernel remoting/src/test/org/apache/geronimo/remoting security/src/java/org/apache/geronimo/security/jaas security/src/java/org/apache/geronimo/security/remoting/jmx security/src/test/org/apache/geronimo/security/jaas
Date Wed, 01 Dec 2004 02:21:50 GMT
Author: dain
Date: Tue Nov 30 18:21:48 2004
New Revision: 109269

URL: http://svn.apache.org/viewcvs?view=rev&rev=109269
Log:
Removed unnecessary MBeanServer usage

Modified:
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/JettyServiceWrapper.java
   geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java
   geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
   geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java
   geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java
   geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java
   geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java
   geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ApplicationTest.java
   geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java
   geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java
   geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
   geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Run.java
   geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyMethodInterceptor.java
   geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java
   geronimo/trunk/modules/remoting/src/test/org/apache/geronimo/remoting/StartupTest.java
   geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java
   geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
   geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/DeploymentSupportTest.java

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=109269&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java&r1=109268&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java&r2=109269
==============================================================================
--- 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 Nov
30 18:21:48 2004
@@ -48,7 +48,7 @@
         GBeanMBean gbean = new GBeanMBean(AxisGbean.getGBeanInfo(), myCl);
         kernel.loadGBean(name, gbean);
         kernel.startGBean(name);
-        System.out.println(kernel.getMBeanServer().getAttribute(name, "state"));
+        System.out.println(kernel.getAttribute(name, "state"));
         HttpURLConnection connection = (HttpURLConnection) AxisGeronimoUtils.getURL("/axis/index.html").openConnection();
         BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
         connection.getResponseCode();

Modified: 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=diff&rev=109269&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/JettyServiceWrapper.java&r1=109268&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/JettyServiceWrapper.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/JettyServiceWrapper.java
(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/JettyServiceWrapper.java
Tue Nov 30 18:21:48 2004
@@ -19,8 +19,6 @@
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
-
-import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.geronimo.axis.AxisGeronimoUtils;
@@ -43,11 +41,11 @@
     private ObjectName tcaName;
     private ObjectName connectorName;
     private ObjectName tcmName;
+    private final Kernel kernel;
 
-    private final MBeanServer mbServer;
 
     public JettyServiceWrapper(Kernel kernel) {
-        this.mbServer = kernel.getMBeanServer();
+        this.kernel = kernel;
         containerName = AxisGeronimoConstants.WEB_CONTAINER_NAME;
         containerPatterns = Collections.singleton(containerName);
         connectorName = AxisGeronimoConstants.WEB_CONNECTOR_NAME;
@@ -87,14 +85,13 @@
         stop(containerName);
     }
 
-    private void start(ObjectName name, Object instance) throws Exception {
-        mbServer.registerMBean(instance, name);
-        mbServer.invoke(name, "start", null, null);
+    private void start(ObjectName name, GBeanMBean instance) throws Exception {
+        kernel.loadGBean(name, instance);
+        kernel.startGBean(name);
     }
 
     private void stop(ObjectName name) throws Exception {
-        mbServer.invoke(name, "stop", null, null);
-        mbServer.unregisterMBean(name);
+        kernel.stopGBean(name);
+        kernel.unloadGBean(name);
     }
-
 }

Modified: geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java?view=diff&rev=109269&p1=geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java&r1=109268&p2=geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java
Tue Nov 30 18:21:48 2004
@@ -276,7 +276,7 @@
             if (!j2eeContext.getJ2eeApplicationName().equals("null")) {
                 assertRunning(kernel, applicationObjectName);
             } else {
-                Set applications = kernel.getMBeanServer().queryNames(applicationObjectName,
null);
+                Set applications = kernel.listGBeans(applicationObjectName);
                 assertTrue("No application object should be registered for a standalone module",
applications.isEmpty());
             }
 

Modified: geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java?view=diff&rev=109269&p1=geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java&r1=109268&p2=geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
Tue Nov 30 18:21:48 2004
@@ -213,7 +213,7 @@
             if (!j2eeContext.getJ2eeApplicationName().equals("null")) {
                 assertRunning(kernel, applicationObjectName);
             } else {
-                Set applications = kernel.getMBeanServer().queryNames(applicationObjectName,
null);
+                Set applications = kernel.listGBeans(applicationObjectName);
                 assertTrue("No application object should be registered for a standalone module",
applications.isEmpty());
             }
 

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java?view=diff&rev=109269&p1=geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java&r1=109268&p2=geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
Tue Nov 30 18:21:48 2004
@@ -117,6 +117,7 @@
             }
 
             try {
+                // todo it is a really bad to start the configurations
                 ObjectName currentConfig = parentName;
                 while ( State.RUNNING != State.fromInteger((Integer) kernel.getAttribute(currentConfig,
"state")) ) {
                     kernel.startGBean(currentConfig);

Modified: geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java?view=diff&rev=109269&p1=geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java&r1=109268&p2=geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java
(original)
+++ geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java
Tue Nov 30 18:21:48 2004
@@ -20,7 +20,6 @@
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
-import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import junit.framework.TestCase;
@@ -44,7 +43,6 @@
     protected static final ObjectName JVM_NAME = JMXUtil.getObjectName(DOMAIN + ":j2eeType=JVM,J2EEServer=Test");
 
     protected Kernel kernel;
-    protected MBeanServer mbServer;
 
     protected void setUp() throws Exception {
         super.setUp();
@@ -68,7 +66,6 @@
         kernel.startGBean(DOMAIN_NAME);
         kernel.startGBean(SERVER_NAME);
         kernel.startGBean(JVM_NAME);
-        mbServer = kernel.getMBeanServer();
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java?view=diff&rev=109269&p1=geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java&r1=109268&p2=geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java
(original)
+++ geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java
Tue Nov 30 18:21:48 2004
@@ -17,7 +17,7 @@
 
 package org.apache.geronimo.j2ee.management;
 
-import org.apache.geronimo.kernel.jmx.MBeanProxyFactory;
+
 
 
 /**
@@ -32,12 +32,17 @@
     }
 
     public void testStandardAttributes() throws Exception {
-        assertEquals(DOMAIN_NAME.toString(), mbServer.getAttribute(DOMAIN_NAME, "objectName"));
-        assertObjectNamesEqual(new String[]{SERVER_NAME.toString()}, (String[]) mbServer.getAttribute(DOMAIN_NAME,
"servers"));
+        assertEquals(DOMAIN_NAME.toString(), kernel.getAttribute(DOMAIN_NAME, "objectName"));
+        assertObjectNamesEqual(new String[]{SERVER_NAME.toString()}, (String[]) kernel.getAttribute(DOMAIN_NAME,
"servers"));
     }
 
     protected void setUp() throws Exception {
         super.setUp();
-        domain = (J2EEDomain) MBeanProxyFactory.getProxy(J2EEDomain.class, mbServer, DOMAIN_NAME);
+        domain = (J2EEDomain) kernel.getProxyManager().createProxy(DOMAIN_NAME, J2EEDomain.class);
+    }
+
+    protected void tearDown() throws Exception {
+        kernel.getProxyManager().destroyProxy(domain);
+        super.tearDown();
     }
 }

Modified: geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java?view=diff&rev=109269&p1=geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java&r1=109268&p2=geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java
(original)
+++ geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java
Tue Nov 30 18:21:48 2004
@@ -19,8 +19,6 @@
 
 import java.net.InetAddress;
 
-import org.apache.geronimo.kernel.jmx.MBeanProxyFactory;
-
 /**
  * @version $Rev$ $Date$
  */
@@ -38,10 +36,10 @@
     }
 
     public void testStandardAttributes() throws Exception {
-        assertEquals(JVM_NAME.getCanonicalName(), mbServer.getAttribute(JVM_NAME, "objectName"));
-        assertEquals(System.getProperty("java.version"), mbServer.getAttribute(JVM_NAME,
"javaVersion"));
-        assertEquals(System.getProperty("java.vendor"), mbServer.getAttribute(JVM_NAME, "javaVendor"));
-        assertEquals(node, mbServer.getAttribute(JVM_NAME, "node"));
+        assertEquals(JVM_NAME.getCanonicalName(), kernel.getAttribute(JVM_NAME, "objectName"));
+        assertEquals(System.getProperty("java.version"), kernel.getAttribute(JVM_NAME, "javaVersion"));
+        assertEquals(System.getProperty("java.vendor"), kernel.getAttribute(JVM_NAME, "javaVendor"));
+        assertEquals(node, kernel.getAttribute(JVM_NAME, "node"));
     }
 
     public void testGeronimoInterface() {
@@ -55,20 +53,26 @@
     }
 
     public void testGeronimoAttributes() throws Exception {
-        assertEquals(new Integer(runtime.availableProcessors()), mbServer.getAttribute(JVM_NAME,
"availableProcessors"));
+        assertEquals(new Integer(runtime.availableProcessors()), kernel.getAttribute(JVM_NAME,
"availableProcessors"));
 
         // I'm going to leave these in but I am not sure the results are deterministic
-//        assertEquals(new Long(runtime.freeMemory()), mbServer.getAttribute(JVM_NAME, "freeMemory"));
-        assertEquals(new Long(runtime.maxMemory()), mbServer.getAttribute(JVM_NAME, "maxMemory"));
-        assertEquals(new Long(runtime.totalMemory()), mbServer.getAttribute(JVM_NAME, "totalMemory"));
+//        assertEquals(new Long(runtime.freeMemory()), kernel.getAttribute(JVM_NAME, "freeMemory"));
+        assertEquals(new Long(runtime.maxMemory()), kernel.getAttribute(JVM_NAME, "maxMemory"));
+        assertEquals(new Long(runtime.totalMemory()), kernel.getAttribute(JVM_NAME, "totalMemory"));
 
     }
 
     protected void setUp() throws Exception {
         super.setUp();
-        jvm = (JVM) MBeanProxyFactory.getProxy(JVM.class, mbServer, JVM_NAME);
-        jvmEx = (org.apache.geronimo.j2ee.management.geronimo.JVM) MBeanProxyFactory.getProxy(org.apache.geronimo.j2ee.management.geronimo.JVM.class,
mbServer, JVM_NAME);
+        jvm = (JVM) kernel.getProxyManager().createProxy(JVM_NAME, JVM.class);
+        jvmEx = (org.apache.geronimo.j2ee.management.geronimo.JVM) kernel.getProxyManager().createProxy(JVM_NAME,
org.apache.geronimo.j2ee.management.geronimo.JVM.class);
         node = InetAddress.getLocalHost().toString();
         runtime = Runtime.getRuntime();
+    }
+
+    protected void tearDown() throws Exception {
+        kernel.getProxyManager().destroyProxy(jvm);
+        kernel.getProxyManager().destroyProxy(jvmEx);
+        super.tearDown();
     }
 }

Modified: geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java?view=diff&rev=109269&p1=geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java&r1=109268&p2=geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java
(original)
+++ geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java
Tue Nov 30 18:21:48 2004
@@ -17,7 +17,7 @@
 
 package org.apache.geronimo.j2ee.management;
 
-import org.apache.geronimo.kernel.jmx.MBeanProxyFactory;
+
 
 /**
  * @version $Rev$ $Date$
@@ -36,17 +36,22 @@
     }
 
     public void testStandardAttributes() throws Exception {
-        assertEquals(SERVER_NAME.toString(), mbServer.getAttribute(SERVER_NAME, "objectName"));
-        assertEquals(0, ((String[]) mbServer.getAttribute(SERVER_NAME, "deployedObjects")).length);
-        assertEquals(0, ((String[]) mbServer.getAttribute(SERVER_NAME, "resources")).length);
-        assertObjectNamesEqual(new String[]{JVM_NAME.toString()}, (String[]) mbServer.getAttribute(SERVER_NAME,
"javaVMs"));
-        assertEquals("The Apache Software Foundation", mbServer.getAttribute(SERVER_NAME,
"serverVendor"));
-        assertEquals(version, mbServer.getAttribute(SERVER_NAME, "serverVersion"));
+        assertEquals(SERVER_NAME.toString(), kernel.getAttribute(SERVER_NAME, "objectName"));
+        assertEquals(0, ((String[]) kernel.getAttribute(SERVER_NAME, "deployedObjects")).length);
+        assertEquals(0, ((String[]) kernel.getAttribute(SERVER_NAME, "resources")).length);
+        assertObjectNamesEqual(new String[]{JVM_NAME.toString()}, (String[]) kernel.getAttribute(SERVER_NAME,
"javaVMs"));
+        assertEquals("The Apache Software Foundation", kernel.getAttribute(SERVER_NAME, "serverVendor"));
+        assertEquals(version, kernel.getAttribute(SERVER_NAME, "serverVersion"));
     }
 
     protected void setUp() throws Exception {
         super.setUp();
-        server = (J2EEServer) MBeanProxyFactory.getProxy(J2EEServer.class, mbServer, SERVER_NAME);
-        version = (String) mbServer.getAttribute(SERVER_INFO_NAME, "version");
+        server = (J2EEServer) kernel.getProxyManager().createProxy(SERVER_NAME, J2EEServer.class);
+        version = (String) kernel.getAttribute(SERVER_INFO_NAME, "version");
+    }
+
+    protected void tearDown() throws Exception {
+        kernel.getProxyManager().destroyProxy(server);
+        super.tearDown();
     }
 }

Modified: geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ApplicationTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ApplicationTest.java?view=diff&rev=109269&p1=geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ApplicationTest.java&r1=109268&p2=geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ApplicationTest.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ApplicationTest.java	(original)
+++ geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ApplicationTest.java	Tue
Nov 30 18:21:48 2004
@@ -25,7 +25,6 @@
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
-import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import junit.framework.TestCase;
@@ -46,7 +45,6 @@
     private ObjectName containerName;
     private Set containerPatterns;
     private ObjectName connectorName;
-    private MBeanServer mbServer;
     private GBeanMBean connector;
     private ObjectName appName;
     private ObjectName tmName;
@@ -84,14 +82,14 @@
         connection.disconnect();
     }
 
-    private void start(ObjectName name, Object instance) throws Exception {
-        mbServer.registerMBean(instance, name);
-        mbServer.invoke(name, "start", null, null);
+    private void start(ObjectName name, GBeanMBean instance) throws Exception {
+        kernel.loadGBean(name, instance);
+        kernel.startGBean(name);
     }
 
     private void stop(ObjectName name) throws Exception {
-        mbServer.invoke(name, "stop", null, null);
-        mbServer.unregisterMBean(name);
+        kernel.stopGBean(name);
+        kernel.unloadGBean(name);
     }
 
     protected void setUp() throws Exception {
@@ -106,7 +104,6 @@
 
         kernel = new Kernel("test.kernel", "test");
         kernel.boot();
-        mbServer = kernel.getMBeanServer();
         container = new GBeanMBean(JettyContainerImpl.GBEAN_INFO);
 
         connector = new GBeanMBean(HTTPConnector.GBEAN_INFO);

Modified: geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java?view=diff&rev=109269&p1=geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java&r1=109268&p2=geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java	(original)
+++ geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java	Tue
Nov 30 18:21:48 2004
@@ -21,7 +21,6 @@
 import java.net.URL;
 import java.util.HashSet;
 import java.util.Set;
-import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import junit.framework.TestCase;
@@ -39,10 +38,9 @@
     private ObjectName containerName;
     private Set containerPatterns;
     private ObjectName connectorName;
-    private MBeanServer mbServer;
 
     public void testServer() throws Exception {
-        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getMBeanServer().getAttribute(containerName,
"state"));
+        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(containerName,
"state"));
     }
 
     public void testHTTPConnector() throws Exception {
@@ -51,7 +49,7 @@
         connector.setReferencePatterns("JettyContainer", containerPatterns);
         start(connectorName, connector);
 
-        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getMBeanServer().getAttribute(connectorName,
"state"));
+        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(connectorName,
"state"));
 
         HttpURLConnection connection = (HttpURLConnection) new URL("http://localhost:5678").openConnection();
         try {
@@ -65,14 +63,14 @@
         stop(connectorName);
     }
 
-    private void start(ObjectName name, Object instance) throws Exception {
-        mbServer.registerMBean(instance, name);
-        mbServer.invoke(name, "start", null, null);
+    private void start(ObjectName name, GBeanMBean instance) throws Exception {
+        kernel.loadGBean(name, instance);
+        kernel.startGBean(name);
     }
 
     private void stop(ObjectName name) throws Exception {
-        mbServer.invoke(name, "stop", null, null);
-        mbServer.unregisterMBean(name);
+        kernel.stopGBean(name);
+        kernel.unloadGBean(name);
     }
 
     protected void setUp() throws Exception {
@@ -82,7 +80,6 @@
         connectorName = new ObjectName("geronimo.jetty:role=Connector");
         kernel = new Kernel("test.kernel", "test");
         kernel.boot();
-        mbServer = kernel.getMBeanServer();
         container = new GBeanMBean(JettyContainerImpl.GBEAN_INFO);
         start(containerName, container);
     }

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java?view=diff&rev=109269&p1=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java&r1=109268&p2=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java	(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java	Tue Nov
30 18:21:48 2004
@@ -559,8 +559,8 @@
 
         mbServer = MBeanServerFactory.createMBeanServer(domainName);
         mbServer.registerMBean(this, KERNEL);
-        dependencyManager = new DependencyManager(mbServer);
         lifecycleMonitor = new LifecycleMonitor(mbServer);
+        dependencyManager = new DependencyManager(mbServer);
         proxyManager = new ProxyManager(this);
 
         // set up the data for the new configuration manager instance

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java?view=diff&rev=109269&p1=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java&r1=109268&p2=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
Tue Nov 30 18:21:48 2004
@@ -239,7 +239,7 @@
         try {
             gbeanState = storeGBeans(kernel, objectNames);
         } catch (InvalidConfigException e) {
-            log.info(e);
+            log.info("Unable to update persistent state during shutdown", e);
         }
 
         // unregister all GBeans
@@ -401,7 +401,7 @@
                 gbeanData.setName(objectName);
                 gbeanData.writeExternal(oos);
             } catch (Exception e) {
-                throw new InvalidConfigException("Unable to serialize GBeanState for " +
objectName, e);
+                throw new InvalidConfigException("Unable to serialize GBeanData for " + objectName,
e);
             }
         }
         try {
@@ -434,7 +434,7 @@
                 GBeanData gbeanData = kernel.getGBeanData(objectName);
                 gbeanData.writeExternal(oos);
             } catch (Exception e) {
-                throw new InvalidConfigException("Unable to serialize GBeanState for " +
objectName, e);
+                throw new InvalidConfigException("Unable to serialize GBeanData for " + objectName,
e);
             }
         }
         try {

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Run.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Run.java?view=diff&rev=109269&p1=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Run.java&r1=109268&p2=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Run.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Run.java	(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Run.java	Tue
Nov 30 18:21:48 2004
@@ -85,7 +85,7 @@
             });
 
             kernel.startGBean(configName);
-            kernel.getMBeanServer().invoke(gbeanName, "main", new Object[]{args}, MAIN_ARGS);
+            kernel.invoke(gbeanName, "main", new Object[]{args}, MAIN_ARGS);
         } catch (Exception e) {
             e.printStackTrace();
             System.exit(2);

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyMethodInterceptor.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyMethodInterceptor.java?view=diff&rev=109269&p1=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyMethodInterceptor.java&r1=109268&p2=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyMethodInterceptor.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyMethodInterceptor.java
(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyMethodInterceptor.java
Tue Nov 30 18:21:48 2004
@@ -31,9 +31,8 @@
 import net.sf.cglib.proxy.MethodProxy;
 import net.sf.cglib.reflect.FastClass;
 import org.apache.geronimo.gbean.GOperationSignature;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
-import org.apache.geronimo.gbean.runtime.RawInvoker;
 import org.apache.geronimo.gbean.runtime.GBeanInstance;
+import org.apache.geronimo.gbean.runtime.RawInvoker;
 import org.apache.geronimo.kernel.Kernel;
 import org.objectweb.asm.Type;
 

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java?view=diff&rev=109269&p1=geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java&r1=109268&p2=geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java	(original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java	Tue Nov
30 18:21:48 2004
@@ -43,8 +43,8 @@
         gbean.setAttribute("finalInt", new Integer(123));
         kernel.loadGBean(name, gbean);
         kernel.startGBean(name);
-        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getMBeanServer().getAttribute(name,
"state"));
-        assertEquals("Hello", kernel.getMBeanServer().invoke(name, "doSomething", new Object[]{"Hello"},
new String[]{String.class.getName()}));
+        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(name, "state"));
+        assertEquals("Hello", kernel.invoke(name, "doSomething", new Object[]{"Hello"}, new
String[]{String.class.getName()}));
 
         assertEquals(name.getCanonicalName(), kernel.getAttribute(name, "objectName"));
         assertEquals(name.getCanonicalName(), kernel.getAttribute(name, "actualObjectName"));
@@ -78,7 +78,7 @@
         kernel.loadGBean(name2, gbean2);
         kernel.startGBean(name2);
 
-        assertEquals("endpointCheck", kernel.getMBeanServer().invoke(name2, "checkEndpoint",
null, null));
+        assertEquals("endpointCheck", kernel.invoke(name2, "checkEndpoint", null, null));
     }
 
     protected void setUp() throws Exception {

Modified: geronimo/trunk/modules/remoting/src/test/org/apache/geronimo/remoting/StartupTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/remoting/src/test/org/apache/geronimo/remoting/StartupTest.java?view=diff&rev=109269&p1=geronimo/trunk/modules/remoting/src/test/org/apache/geronimo/remoting/StartupTest.java&r1=109268&p2=geronimo/trunk/modules/remoting/src/test/org/apache/geronimo/remoting/StartupTest.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/remoting/src/test/org/apache/geronimo/remoting/StartupTest.java
(original)
+++ geronimo/trunk/modules/remoting/src/test/org/apache/geronimo/remoting/StartupTest.java
Tue Nov 30 18:21:48 2004
@@ -73,11 +73,11 @@
         kernel.startGBean(serverStub);
 
         // They should all be started now
-        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getMBeanServer().getAttribute(subsystemRouter,
"state"));
-        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getMBeanServer().getAttribute(asyncTransport,
"state"));
-        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getMBeanServer().getAttribute(jmxRouter,
"state"));
-        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getMBeanServer().getAttribute(registeryRouter,
"state"));
-        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getMBeanServer().getAttribute(serverStub,
"state"));
+        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(subsystemRouter,
"state"));
+        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(asyncTransport,
"state"));
+        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(jmxRouter, "state"));
+        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(registeryRouter,
"state"));
+        assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(serverStub, "state"));
 
         kernel.stopGBean(subsystemRouter);
         kernel.stopGBean(asyncTransport);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java?view=diff&rev=109269&p1=geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java&r1=109268&p2=geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java
Tue Nov 30 18:21:48 2004
@@ -31,7 +31,6 @@
 import javax.security.auth.spi.LoginModule;
 
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.jmx.MBeanProxyFactory;
 import org.apache.geronimo.security.remoting.jmx.JaasLoginServiceRemotingClient;
 
 /**
@@ -138,6 +137,10 @@
     }
 
     private void clear() {
+        Kernel kernel = Kernel.getKernel(kernelName);
+        if (kernel != null) {
+            kernel.getProxyManager().destroyProxy(service);
+        }
         serverHost = null;
         serverPort = 0;
         realmName = null;
@@ -155,7 +158,8 @@
         if(serverHost != null && serverPort > 0) {
             return JaasLoginServiceRemotingClient.create(serverHost, serverPort);
         } else {
-            return (JaasLoginServiceMBean) MBeanProxyFactory.getProxy(JaasLoginServiceMBean.class,
Kernel.getKernel(kernelName).getMBeanServer(), JaasLoginService.OBJECT_NAME);
+            Kernel kernel = Kernel.getKernel(kernelName);
+            return (JaasLoginServiceMBean) kernel.getProxyManager().createProxy(JaasLoginService.OBJECT_NAME,
JaasLoginServiceMBean.class);
         }
     }
 

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java?view=diff&rev=109269&p1=geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java&r1=109268&p2=geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
Tue Nov 30 18:21:48 2004
@@ -21,14 +21,12 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.geronimo.core.service.Interceptor;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
-import org.apache.geronimo.kernel.jmx.MBeanProxyFactory;
 import org.apache.geronimo.proxy.ProxyContainer;
 import org.apache.geronimo.proxy.ReflexiveInterceptor;
 import org.apache.geronimo.remoting.DeMarshalingInterceptor;
@@ -51,6 +49,7 @@
     private ProxyContainer serverContainer;
     private DeMarshalingInterceptor demarshaller;
     private JMXRouter router;
+    private JaasLoginServiceMBean loginService;
 
     public JaasLoginServiceRemotingServer(Kernel kernel, String objectName) {
         this.kernel = kernel;
@@ -73,9 +72,9 @@
         router.register(objectName, this);
 
         // Setup the server side contianer..
-        JaasLoginServiceMBean loginService = (JaasLoginServiceMBean) MBeanProxyFactory.getProxy(JaasLoginServiceMBean.class,
-                kernel.getMBeanServer(),
-                JMXUtil.getObjectName("geronimo.security:type=JaasLoginService"));
+        // todo dain: alan, why is this not a dependency?
+        // todo dain: hard coded object names are very very bery bad
+        loginService = (JaasLoginServiceMBean) kernel.getProxyManager().createProxy(JMXUtil.getObjectName("geronimo.security:type=JaasLoginService"),
JaasLoginServiceMBean.class);
         Interceptor firstInterceptor = new ReflexiveInterceptor(loginService);
         demarshaller = new DeMarshalingInterceptor(firstInterceptor, getClass().getClassLoader());
         serverContainer = new ProxyContainer(firstInterceptor);
@@ -85,7 +84,7 @@
 
     public void doStop() {
         router.unregister(objectName);
-
+        kernel.getProxyManager().destroyProxy(loginService);
         serverContainer = null;
         demarshaller = null;
         log.info("Stopped login service stub");

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/DeploymentSupportTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/DeploymentSupportTest.java?view=diff&rev=109269&p1=geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/DeploymentSupportTest.java&r1=109268&p2=geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/DeploymentSupportTest.java&r2=109269
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/DeploymentSupportTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/DeploymentSupportTest.java
Tue Nov 30 18:21:48 2004
@@ -16,28 +16,19 @@
  */
 package org.apache.geronimo.security.jaas;
 
-import javax.management.ObjectName;
-import javax.security.auth.Subject;
-import javax.security.auth.login.LoginContext;
-import java.io.File;
+import java.util.Arrays;
 import java.util.Collections;
-import java.util.Properties;
-import java.util.Set;
 import java.util.List;
-import java.util.Arrays;
+import java.util.Properties;
+import javax.management.ObjectName;
 
 import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.security.AbstractTest;
-import org.apache.geronimo.security.ContextManager;
-import org.apache.geronimo.security.IdentificationPrincipal;
-import org.apache.geronimo.security.RealmPrincipal;
-import org.apache.geronimo.security.realm.SecurityRealm;
 import org.apache.geronimo.security.realm.DeploymentSupport;
-import org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal;
+import org.apache.geronimo.security.realm.SecurityRealm;
 import org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal;
+import org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
-import org.apache.geronimo.kernel.jmx.MBeanProxyFactory;
-import org.apache.geronimo.kernel.Kernel;
 
 /**
  * Unit test for the DeploymentSupport features of security realms.
@@ -132,38 +123,42 @@
     }
 
     public void testDeploymentSupport() throws Exception {
-        SecurityRealm realm = (SecurityRealm) MBeanProxyFactory.getProxy(SecurityRealm.class,
kernel.getMBeanServer(), testRealm);
-        String[] domains = realm.getLoginDomains();
-        assertEquals(1, domains.length);
-        DeploymentSupport deployment = realm.getDeploymentSupport(domains[0]);
-        assertNotNull(deployment);
-        String[] classes = deployment.getPrincipalClassNames();
-        assertEquals(2, classes.length);
-        if(classes[0].equals(GeronimoUserPrincipal.class.getName())) {
-            assertEquals(GeronimoGroupPrincipal.class.getName(), classes[1]);
-        } else if(classes[1].equals(GeronimoUserPrincipal.class.getName())) {
-            assertEquals(GeronimoGroupPrincipal.class.getName(), classes[0]);
-        } else {
-            fail("Unexpected principal class names "+classes[0]+" / "+classes[1]);
+        SecurityRealm realm = (SecurityRealm) kernel.getProxyManager().createProxy(testRealm,
SecurityRealm.class);
+        try {
+            String[] domains = realm.getLoginDomains();
+            assertEquals(1, domains.length);
+            DeploymentSupport deployment = realm.getDeploymentSupport(domains[0]);
+            assertNotNull(deployment);
+            String[] classes = deployment.getPrincipalClassNames();
+            assertEquals(2, classes.length);
+            if(classes[0].equals(GeronimoUserPrincipal.class.getName())) {
+                assertEquals(GeronimoGroupPrincipal.class.getName(), classes[1]);
+            } else if(classes[1].equals(GeronimoUserPrincipal.class.getName())) {
+                assertEquals(GeronimoGroupPrincipal.class.getName(), classes[0]);
+            } else {
+                fail("Unexpected principal class names "+classes[0]+" / "+classes[1]);
+            }
+            String[] names = deployment.getPrincipalsOfClass(GeronimoUserPrincipal.class.getName());
+            assertEquals(5, names.length);
+            List list = Arrays.asList(names);
+            assertTrue(list.contains("izumi"));
+            assertTrue(list.contains("alan"));
+            assertTrue(list.contains("george"));
+            assertTrue(list.contains("gracie"));
+            assertTrue(list.contains("metro"));
+            names = deployment.getPrincipalsOfClass(GeronimoGroupPrincipal.class.getName());
+            assertEquals(5, names.length);
+            list = Arrays.asList(names);
+            assertTrue(list.contains("manager"));
+            assertTrue(list.contains("it"));
+            assertTrue(list.contains("pet"));
+            assertTrue(list.contains("dog"));
+            assertTrue(list.contains("cat"));
+            String[] map = deployment.getAutoMapPrincipalClassNames();
+            assertEquals(1, map.length);
+            assertEquals(GeronimoGroupPrincipal.class.getName(), map[0]);
+        } finally {
+            kernel.getProxyManager().destroyProxy(realm);
         }
-        String[] names = deployment.getPrincipalsOfClass(GeronimoUserPrincipal.class.getName());
-        assertEquals(5, names.length);
-        List list = Arrays.asList(names);
-        assertTrue(list.contains("izumi"));
-        assertTrue(list.contains("alan"));
-        assertTrue(list.contains("george"));
-        assertTrue(list.contains("gracie"));
-        assertTrue(list.contains("metro"));
-        names = deployment.getPrincipalsOfClass(GeronimoGroupPrincipal.class.getName());
-        assertEquals(5, names.length);
-        list = Arrays.asList(names);
-        assertTrue(list.contains("manager"));
-        assertTrue(list.contains("it"));
-        assertTrue(list.contains("pet"));
-        assertTrue(list.contains("dog"));
-        assertTrue(list.contains("cat"));
-        String[] map = deployment.getAutoMapPrincipalClassNames();
-        assertEquals(1, map.length);
-        assertEquals(GeronimoGroupPrincipal.class.getName(), map[0]);
     }
 }

Mime
View raw message