User: d_jencks Date: 02/03/02 21:24:21 Added: src/main/org/jboss/test/jmx/test JarInSarJSR77UnitTestCase.java Log: fix for bug 524925. cleaned up handling of no-parent for jsr-77 ejbModule mbeans and added a testcase. Testcase will need changing if no-parent handling changes Revision Changes Path 1.1 jbosstest/src/main/org/jboss/test/jmx/test/JarInSarJSR77UnitTestCase.java Index: JarInSarJSR77UnitTestCase.java =================================================================== /* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. * */ package org.jboss.test.jmx.test; import javax.management.ObjectName; import junit.framework.*; import org.jboss.test.JBossTestCase; /** * JarInSarJSR77UnitTestCase.java * * * Created: Sat Mar 2 23:54:55 2002 * * @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a> * @version */ public class JarInSarJSR77UnitTestCase extends JBossTestCase { public JarInSarJSR77UnitTestCase(String name) { super(name); } /** * The <code>testFakeParentCreatedAndRemoved</code> method tests if a package * consisting of a sar (which has no jsr-77 representation as of this writing) * containing a jar (which does) gets deployed successfully with jsr-77 mbeans. * in particular, a fake Application parent for the jar should be created. * if and when the jsr77 support is extended to sars, this test should be reexamined. * * * @exception Exception if an error occurs */ public void testFakeParentCreatedAndRemoved() throws Exception { String testUrl = "jarinsar.sar"; getLog().debug("testUrl is : " + testUrl); ObjectName fakeApp = new ObjectName("jboss.management.single:J2EEDomain=Manager,J2EEServer=Single,name=jarinsar.sar,type=J2EEApplication"); ObjectName ejbModule = new ObjectName("jboss.management.single:J2EEDomain=Manager,name=jarinsar.jar,J2EEServer=Single,J2EEApplication=jarinsar.sar,type=EjbModule"); ObjectName bean = new ObjectName("jboss.management.single:J2EEDomain=Manager,J2EEServer=Single,name=TestDataSource,J2EEApplication=jarinsar.sar,EjbModule=jarinsar.jar,type=StatelessSessionBean"); //deploy the test package. deploy(testUrl); try { assertTrue("fakeApp jsr-77 mbean is missing", getServer().isRegistered(fakeApp)); assertTrue("ejbModule jsr-77 mbean is missing", getServer().isRegistered(ejbModule)); assertTrue("bean jsr-77 mbean is missing", getServer().isRegistered(bean)); } finally { undeploy(testUrl); assertTrue("fakeApp jsr-77 mbean is still present", !getServer().isRegistered(fakeApp)); assertTrue("ejbModule jsr-77 mbean is still present", !getServer().isRegistered(ejbModule)); assertTrue("bean jsr-77 mbean is still present", !getServer().isRegistered(bean)); } // end of try-catch } }// JarInSarJSR77UnitTestCase
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development