[jboss-cvs] JBossAS SVN: r82261 - in trunk: testsuite/imports/sections and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Dec 14 06:14:28 EST 2008
Author: alesj
Date: 2008-12-14 06:14:28 -0500 (Sun, 14 Dec 2008)
New Revision: 82261
Added:
trunk/testsuite/src/resources/jmx/multiple/
trunk/testsuite/src/resources/jmx/multiple/META-INF/
trunk/testsuite/src/resources/jmx/multiple/META-INF/first-service.xml
trunk/testsuite/src/resources/jmx/multiple/META-INF/second-service.xml
Modified:
trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
trunk/testsuite/imports/sections/jmx.xml
trunk/testsuite/src/main/org/jboss/test/jmx/test/DeployServiceUnitTestCase.java
Log:
[JBAS-6317]; enable multiple -service.xml files by default.
Modified: trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java 2008-12-13 15:45:09 UTC (rev 82260)
+++ trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java 2008-12-14 11:14:28 UTC (rev 82261)
@@ -52,6 +52,7 @@
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @author Scott.Stark at jboss.org
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
* @version $Revision$
*/
public class SARDeployer extends JAXPDeployer<ServiceDeployment>
@@ -67,6 +68,7 @@
setSuffix("-service.xml");
// Enable the super class ManagedObjectCreator implementation
setBuildManagedObject(true);
+ setAllowMultipleFiles(true);
}
/**
@@ -109,8 +111,7 @@
services = SMDparser.parse();
parsed.setServices(services);
}
-
-
+
return parsed;
}
@@ -136,7 +137,7 @@
{
ServerConfig config = ServerConfigLocator.locate();
URL codeBaseURL = new URL(config.getServerHomeURL(), codebase);
- codebaseFile = VFS.getVirtualFile(codeBaseURL, "");
+ codebaseFile = VFS.getCachedFile(codeBaseURL);
}
if (codebaseFile == null)
Modified: trunk/testsuite/imports/sections/jmx.xml
===================================================================
--- trunk/testsuite/imports/sections/jmx.xml 2008-12-13 15:45:09 UTC (rev 82260)
+++ trunk/testsuite/imports/sections/jmx.xml 2008-12-14 11:14:28 UTC (rev 82261)
@@ -744,7 +744,17 @@
<include name="META-INF/jboss-service.xml"/>
</fileset>
</jar>
-
+
+ <!-- multiple -service.xml files -->
+ <jar destfile="${build.lib}/multiple-service-files.sar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/test/jmx/standard/**"/>
+ </fileset>
+ <fileset dir="${build.resources}/jmx/multiple">
+ <include name="META-INF/*-service.xml"/>
+ </fileset>
+ </jar>
+
<!-- A shutdown sar for the minimal config test -->
<jar destfile="${build.lib}/shutdown.sar">
<metainf dir="${build.resources}/jmx/shutdown"/>
Modified: trunk/testsuite/src/main/org/jboss/test/jmx/test/DeployServiceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jmx/test/DeployServiceUnitTestCase.java 2008-12-13 15:45:09 UTC (rev 82260)
+++ trunk/testsuite/src/main/org/jboss/test/jmx/test/DeployServiceUnitTestCase.java 2008-12-14 11:14:28 UTC (rev 82261)
@@ -35,6 +35,7 @@
/**
* @author <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>
* @author Scott.Stark at jboss.org
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
* @version $Revision$
*/
public class DeployServiceUnitTestCase
@@ -747,6 +748,26 @@
}
}
+ public void testMultipleServiceFiles() throws Exception
+ {
+ String testUrl = "multiple-service-files.sar";
+ getLog().debug("testUrl is : " + testUrl);
+ try
+ {
+ //deploy sar
+ deploy(testUrl);
+ //check deployment registered expected mbeans
+ ObjectName name1 = new ObjectName("test:name=TestStandardService1");
+ assertTrue("test:name=TestStandardService1 is registered after deploy", checkState(name1, RUNNING));
+ ObjectName name2 = new ObjectName("test:name=TestStandardService2");
+ assertTrue("test:name=TestStandardService2 is registered after deploy", checkState(name2, RUNNING));
+ }
+ finally
+ {
+ undeploy(testUrl);
+ }
+ }
+
protected boolean recursiveDelete(File f)
{
if (f.isDirectory())
Added: trunk/testsuite/src/resources/jmx/multiple/META-INF/first-service.xml
===================================================================
--- trunk/testsuite/src/resources/jmx/multiple/META-INF/first-service.xml (rev 0)
+++ trunk/testsuite/src/resources/jmx/multiple/META-INF/first-service.xml 2008-12-14 11:14:28 UTC (rev 82261)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Test creation . -->
+
+<server>
+
+ <mbean code="org.jboss.test.jmx.standard.TestClass"
+ name="test:name=TestStandardService1"
+ interface="org.jboss.test.jmx.standard.TestInterface"/>
+
+</server>
\ No newline at end of file
Added: trunk/testsuite/src/resources/jmx/multiple/META-INF/second-service.xml
===================================================================
--- trunk/testsuite/src/resources/jmx/multiple/META-INF/second-service.xml (rev 0)
+++ trunk/testsuite/src/resources/jmx/multiple/META-INF/second-service.xml 2008-12-14 11:14:28 UTC (rev 82261)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Test creation . -->
+
+<server>
+
+ <mbean code="org.jboss.test.jmx.standard.TestClass"
+ name="test:name=TestStandardService2"
+ interface="org.jboss.test.jmx.standard.TestInterface"/>
+
+</server>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list