[jboss-cvs] JBossAS SVN: r95814 - in projects/jboss-osgi/trunk: testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 30 01:21:37 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-30 01:21:36 -0400 (Fri, 30 Oct 2009)
New Revision: 95814
Modified:
projects/jboss-osgi/trunk/reactor/jta/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
Log:
Fix embedded on felix
Modified: projects/jboss-osgi/trunk/reactor/jta/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-30 03:15:05 UTC (rev 95813)
+++ projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-30 05:21:36 UTC (rev 95814)
@@ -101,7 +101,7 @@
javax.management,
javax.naming,
javax.naming.spi,
- javax.transaction;version="[1.0,1.2)",
+ javax.transaction,
javax.xml.parsers,
org.apache.commons.logging,
org.jboss.osgi.spi.capability;version="[1.0,1.1)",
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java 2009-10-30 03:15:05 UTC (rev 95813)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java 2009-10-30 05:21:36 UTC (rev 95814)
@@ -103,12 +103,16 @@
{
DeployerService deployer = MBeanProxy.get(DeployerService.class, MBEAN_DEPLOYER_SERVICE, runtime.getMBeanServer());
deployer.deploy(getTestArchiveURL("service/mcservice-bundleA.jar"));
-
- ManagedFrameworkMBean frameworkMBean = MBeanProxy.get(ManagedFrameworkMBean.class, MBEAN_MANAGED_FRAMEWORK, runtime.getMBeanServer());
- Set<ObjectName> bundles = frameworkMBean.getBundles();
- assertTrue("Managed bundle registered", bundles.toString().indexOf("bundle=mcservice-bundleA") > 0);
-
- deployer.undeploy(getTestArchiveURL("service/mcservice-bundleA.jar"));
+ try
+ {
+ ManagedFrameworkMBean frameworkMBean = MBeanProxy.get(ManagedFrameworkMBean.class, MBEAN_MANAGED_FRAMEWORK, runtime.getMBeanServer());
+ Set<ObjectName> bundles = frameworkMBean.getBundles();
+ assertTrue("Managed bundle registered", bundles.toString().indexOf("name=mcservice-bundleA") > 0);
+ }
+ finally
+ {
+ deployer.undeploy(getTestArchiveURL("service/mcservice-bundleA.jar"));
+ }
}
/**
@@ -122,22 +126,27 @@
deployer.deploy(getTestArchiveURL("service/mcservice-bundleB.jar"));
- ManagedFrameworkMBean frameworkMBean = MBeanProxy.get(ManagedFrameworkMBean.class, MBEAN_MANAGED_FRAMEWORK, runtime.getMBeanServer());
- Set<ObjectName> bundles = frameworkMBean.getBundles();
- assertTrue("Managed bundle registered", bundles.toString().indexOf("bundle=mcservice-bundleB") > 0);
-
// Check whether the bean is registered
- List<String> registeredBeans = mcService.getRegisteredBeans();
- assertTrue("SomeBean registered", registeredBeans.contains("SomeBean"));
+ try
+ {
+ ManagedFrameworkMBean frameworkMBean = MBeanProxy.get(ManagedFrameworkMBean.class, MBEAN_MANAGED_FRAMEWORK, runtime.getMBeanServer());
+ Set<ObjectName> bundles = frameworkMBean.getBundles();
+ assertTrue("Managed bundle registered", bundles.toString().indexOf("name=mcservice-bundleB") > 0);
- // Access the bean through JMX
- SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, MBEAN_NAME, runtime.getMBeanServer());
- assertEquals("hello", someBean.echo("hello"));
-
- deployer.undeploy(getTestArchiveURL("service/mcservice-bundleB.jar"));
+ List<String> registeredBeans = mcService.getRegisteredBeans();
+ assertTrue("SomeBean registered", registeredBeans.contains("SomeBean"));
+ // Access the bean through JMX
+ SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, MBEAN_NAME, runtime.getMBeanServer());
+ assertEquals("hello", someBean.echo("hello"));
+ }
+ finally
+ {
+ deployer.undeploy(getTestArchiveURL("service/mcservice-bundleB.jar"));
+ }
+
// Check whether the bean is unregistered
- registeredBeans = mcService.getRegisteredBeans();
+ List<String> registeredBeans = mcService.getRegisteredBeans();
assertFalse("SomeBean unregistered", registeredBeans.contains("SomeBean"));
}
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list