[jboss-cvs] JBossAS SVN: r111360 - in branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite: imports and 13 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu May 12 22:58:02 EDT 2011


Author: bmaxwell
Date: 2011-05-12 22:58:01 -0400 (Thu, 12 May 2011)
New Revision: 111360

Added:
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/config/tests-jbpapp6517.xml
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteAllTestCase.java
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteDefaultTestCase.java
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteEarTestCase.java
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteSarTestCase.java
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteTestCase.java
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/ejb3/
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/ejb3/Hello.java
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/ejb3/HelloBean.java
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/mcbean/
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/mcbean/HelloMCBean.java
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/mcbean/HelloMCMBean.java
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployer-jboss-beans.xml
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerAll-jboss-beans.xml
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerEAR-jboss-beans.xml
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerSAR-jboss-beans.xml
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/ear/
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/ear/META-INF/
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/ear/META-INF/application.xml
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/ear/META-INF/jboss-app.xml
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/jmx-console-users.properties
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/mcbean/
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/mcbean/META-INF/
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/mcbean/META-INF/jboss-beans.xml
Modified:
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/build.xml
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/config/configs.xml
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/sections/deployers.xml
   branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/server-config.xml
Log:
[JBPAPP-5820] backport JBPAPP6517 EAR and other top level deployments should be Atomic

Modified: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/build.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/build.xml	2011-05-13 00:40:50 UTC (rev 111359)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/build.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -1603,6 +1603,8 @@
       <antcall target="tests-classloader-leak"/>
       <antcall target="tests-clustered-classloader-leak"/>
        -->
+
+      <antcall target="tests-jbpapp6517"/>
 	
       <antcall target="tests-report"/>
       <!-- JBAS-5918 https://issues.apache.org/bugzilla/show_bug.cgi?id=41368 

Modified: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/config/configs.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/config/configs.xml	2011-05-13 00:40:50 UTC (rev 111359)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/config/configs.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -15,4 +15,5 @@
 <import file="tests-password-mask.xml"/>
 <import file="tests-crash-recovery.xml"/>
 <import file="tests-secured.xml"/>
+<import file="tests-jbpapp6517.xml"/>
 </project>

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/config/tests-jbpapp6517.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/config/tests-jbpapp6517.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/config/tests-jbpapp6517.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+
+<!--
+   | Targets that run the jbpapp6517 - CheckSubDeploymentCompleteDeployer tests
+-->
+<project name="jbpapp6517.tests" xmlns:server="http://jboss.org/ns/test/ant/server">
+
+   <!-- jbpapp6517 -->
+   <patternset id="jbpapp6517-1.includes">
+      <include name="org/jboss/test/deployment/jbpapp6517/CheckCompleteDefaultTestCase.class"/>
+   </patternset>
+   <patternset id="jbpapp6517-2.includes">
+      <include name="org/jboss/test/deployment/jbpapp6517/CheckCompleteAllTestCase.class"/>
+   </patternset>
+   <patternset id="jbpapp6517-3.includes">
+      <include name="org/jboss/test/deployment/jbpapp6517/CheckCompleteEarTestCase.class"/>
+   </patternset>
+   <patternset id="jbpapp6517-4.includes">
+      <include name="org/jboss/test/deployment/jbpapp6517/CheckCompleteSarTestCase.class"/>
+   </patternset>
+
+   <!-- jbpapp6517 start -->
+   <target name="tests-jbpapp6517" description="Tests JBPAPP-6517 CheckSubDeploymentCompleteDeployer tests">
+     
+      <create-config baseconf="default" newconf="jbpapp6517">
+         <patternset>
+            <include name="**/*"/>
+         </patternset>
+      </create-config>
+      
+      <!-- set jmx user/pass to admin=admin -->
+      <copy file="${source.resources}/org/jboss/test/deployment/jbpapp6517/jmx-console-users.properties" overwrite="true" todir="${jboss.dist}/server/jbpapp6517/conf/props/" />
+
+      <!-- default case -->
+      <server:start name="jbpapp6517"/>
+      <run-junit junit.patternset="jbpapp6517-1.includes" junit.configuration="jbpapp6517"/>
+      <server:stop name="jbpapp6517"/>
+
+     <!-- test 1 check all -->
+      <server:start name="jbpapp6517"/>
+      <run-junit junit.patternset="jbpapp6517-2.includes" junit.configuration="jbpapp6517"/>
+      <server:stop name="jbpapp6517"/>
+
+     <!-- test 2 check ear -->
+      <server:start name="jbpapp6517"/>
+      <run-junit junit.patternset="jbpapp6517-3.includes" junit.configuration="jbpapp6517"/>
+      <server:stop name="jbpapp6517"/>
+
+     <!-- test 3 check sar -->
+      <server:start name="jbpapp6517"/>
+      <run-junit junit.patternset="jbpapp6517-4.includes" junit.configuration="jbpapp6517"/>
+      <server:stop name="jbpapp6517"/>
+
+   </target>
+   <!-- jbpapp6517 end -->
+</project>

Modified: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/sections/deployers.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/sections/deployers.xml	2011-05-13 00:40:50 UTC (rev 111359)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/sections/deployers.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -394,7 +394,47 @@
              file="${build.resources}/deployers/failed/empty-jboss-beans.xml"/>
     <copy tofile="${build.lib}/deployers-failing-jboss-beans.xml"
              file="${build.resources}/deployers/failed/failing-jboss-beans.xml"/>
-   	
+
+		<!-- JBPAPP-6517 -->
+ 	  <!-- mcbean -->
+	  <jar destfile="${build.lib}/jbpapp-6517-bean.jar">
+       <fileset dir="${build.classes}">
+          <include name="org/jboss/test/deployment/jbpapp6517/mcbean/**"/>
+       </fileset>
+       <fileset dir="${build.resources}/org/jboss/test/deployment/jbpapp6517/mcbean/">
+          <include name="META-INF/jboss-beans.xml"/>
+       </fileset>
+    </jar>
+
+		<!-- ejb3 -->
+	  <jar destfile="${build.lib}/jbpapp-6517-ejb.jar">
+       <fileset dir="${build.classes}">
+          <include name="org/jboss/test/deployment/jbpapp6517/ejb3/*"/>
+       </fileset>
+    </jar>
+
+		<!-- ear -->
+    <ear destfile="${build.lib}/jbpapp-6517.ear"
+       appxml="${build.resources}/org/jboss/test/deployment/jbpapp6517/ear/META-INF/application.xml"
+       update="true">
+       <fileset dir="${build.lib}">
+          <include name="jbpapp-6517-bean.jar"/>
+          <include name="jbpapp-6517-ejb.jar"/>
+       </fileset>
+
+       <fileset dir="${build.resources}/org/jboss/test/deployment/jbpapp6517/ear/">
+          <include name="META-INF/jboss-app.xml"/>
+       </fileset>
+    </ear>
+
+		<!-- sar -->
+	  <jar destfile="${build.lib}/jbpapp-6517.sar">
+       <fileset dir="${build.lib}">
+          <include name="jbpapp-6517-bean.jar"/>
+          <include name="jbpapp-6517-ejb.jar"/>
+       </fileset>
+   </jar>
+
    </target>
    
 </project>

Modified: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/server-config.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/server-config.xml	2011-05-13 00:40:50 UTC (rev 111359)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/imports/server-config.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -1188,6 +1188,18 @@
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
       </server>   	
+      <!-- jbpapp6517 -->
+      <server name="jbpapp6517" host="${node0}">
+         <jvmarg value="-Xms128m" />
+         <jvmarg value="-Xmx512m" />
+         <jvmarg value="-XX:MaxPermSize=512m" />
+         <jvmarg value="-XX:-UseGCOverheadLimit" />      
+         <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
+         <sysproperty key="java.net.preferIPv4Stack" value="true" />
+         <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
+         <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
+         <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
+      </server>   	
       <server name="cluster-profilesvc-0" host="${node0}">
          <jvmarg value="-Xms128m" />
          <jvmarg value="-Xmx512m" />

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteAllTestCase.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteAllTestCase.java	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteAllTestCase.java	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployment.jbpapp6517;
+
+/**
+ * @author bmaxwell
+ *
+ */
+public class CheckCompleteAllTestCase extends CheckCompleteTestCase
+{     
+  
+   // this will check complete on any deployment that can have children
+   public void testCheckSubDeploymentCompleteDeployerAll()
+   {      
+      // deploy CheckSubDeploymentCompleteDeployer configured to check all
+      deployFailOnException(checkCompleteDeployerAll);
+      
+      // deploy ear & eat expected exception
+      // check jmx or jndi - with CheckSubDeploymentCompleteDeployer the EJB3 should not be in jmx or jndi
+      // undeploy ear
+      // call fail if not valid
+      verifyCheckCompleteCalled(testEar, earEjb3JMXName);
+
+      // repeat for sar
+      verifyCheckCompleteCalled(testSar, sarEjb3JMXName);
+      
+      // undeploy CheckSubDeploymentCompleteDeployer configured to check all
+      undeployLogException(checkCompleteDeployerAll);      
+   }
+   
+}

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteDefaultTestCase.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteDefaultTestCase.java	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteDefaultTestCase.java	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployment.jbpapp6517;
+
+import java.io.File;
+import java.net.URI;
+import java.util.Properties;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanInfo;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import junit.framework.TestCase;
+
+import org.jboss.deployment.MainDeployerMBean;
+import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
+import org.jboss.security.SecurityAssociation;
+import org.jboss.security.SimplePrincipal;
+
+/**
+ * @author bmaxwell
+ *
+ */
+public class CheckCompleteDefaultTestCase extends CheckCompleteTestCase
+{      
+   // this is without the deployer
+   public void testDefaultWithoutCheckSubDeploymentCompleteDeployer()
+   {
+      // deploy ear & eat expected exception
+      // check jmx or jndi - with CheckSubDeploymentCompleteDeployer the EJB3 should not be in jmx or jndi
+      // undeploy ear
+      // call fail if not valid
+      verifyCheckCompleteNotCalled(testEar, earEjb3JMXName);
+      
+      // Repeat for sar
+      verifyCheckCompleteNotCalled(testSar, sarEjb3JMXName);
+   }   
+}

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteEarTestCase.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteEarTestCase.java	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteEarTestCase.java	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployment.jbpapp6517;
+
+/**
+ * @author bmaxwell
+ *
+ */
+public class CheckCompleteEarTestCase extends CheckCompleteTestCase
+{     
+   // this will check complete on just ear deployments
+   public void testCheckSubDeploymentCompleteDeployerEAROnly()
+   {
+      // deploy the CheckSubDeploymentCompleteDeployer that only acts on ears
+      deployFailOnException(checkCompleteDeployerEAR);
+
+      // deploy ear & eat expected exception
+      // check jmx or jndi - with CheckSubDeploymentCompleteDeployer the EJB3 should not be in jmx or jndi
+      // undeploy ear
+      // call fail if not valid
+      verifyCheckCompleteCalled(testEar, earEjb3JMXName);
+
+      // same as above, except in the case of the sar, the ejb3 should still be deployed since the checkCompleteDeployerEAR should only check for .ear files 
+      verifyCheckCompleteNotCalled(testSar, sarEjb3JMXName);
+
+      // undeploy the CheckSubDeploymentCompleteDeployer that only acts on ears
+      undeployLogException(checkCompleteDeployerEAR);
+   }
+   
+}

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteSarTestCase.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteSarTestCase.java	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteSarTestCase.java	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployment.jbpapp6517;
+
+/**
+ * @author bmaxwell
+ *
+ */
+public class CheckCompleteSarTestCase extends CheckCompleteTestCase
+{     
+   // this will check complete on just sar deployments
+   public void testCheckSubDeploymentCompleteDeployerSAROnly()
+   {
+      // deploy the CheckSubDeploymentCompleteDeployer that only acts on sars
+      deployFailOnException(checkCompleteDeployerSAR);
+
+      // deploy sar & eat expected exception
+      // check jmx or jndi - with CheckSubDeploymentCompleteDeployer the EJB3 should not be in jmx or jndi
+      // undeploy sar
+      // call fail if not valid
+      verifyCheckCompleteCalled(testSar, sarEjb3JMXName);
+
+      // same as above, except in the case of the ear, the ejb3 should still be deployed since the checkCompleteDeployerEAR should only check for .sar files 
+      verifyCheckCompleteNotCalled(testEar, earEjb3JMXName);
+
+      // undeploy the CheckSubDeploymentCompleteDeployer that only acts on sars
+      undeployLogException(checkCompleteDeployerSAR);
+   }
+   
+}

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteTestCase.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteTestCase.java	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/CheckCompleteTestCase.java	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,317 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployment.jbpapp6517;
+
+import java.io.File;
+import java.net.URI;
+import java.util.Properties;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanInfo;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import junit.framework.TestCase;
+
+import org.jboss.deployment.MainDeployerMBean;
+import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
+import org.jboss.security.SecurityAssociation;
+import org.jboss.security.SimplePrincipal;
+
+/**
+ * @author bmaxwell
+ *
+ */
+public abstract class CheckCompleteTestCase extends TestCase
+{
+   public static String objectNameString = "jboss.system:service=MainDeployer";
+   
+   private static String host = "localhost";
+   
+   protected String testEar = "file://" + new File("lib/jbpapp-6517.ear").getAbsolutePath();
+   protected String testSar = "file://" + new File("lib/jbpapp-6517.sar").getAbsolutePath();   
+   
+   protected String checkCompleteDeployerAll = "file://" + new File("resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerAll-jboss-beans.xml").getAbsolutePath();
+   protected String checkCompleteDeployerEAR = "file://" + new File("resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerEAR-jboss-beans.xml").getAbsolutePath();
+   protected String checkCompleteDeployerSAR = "file://" + new File("resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerSAR-jboss-beans.xml").getAbsolutePath();
+   
+   protected String earEjb3JMXName = "jboss.j2ee:ear=jbpapp-6517.ear,jar=jbpapp-6517-ejb.jar,name=HelloBean,service=EJB3";
+   protected String sarEjb3JMXName = "jboss.j2ee:ear=jbpapp-6517.sar,jar=jbpapp-6517-ejb.jar,name=HelloBean,service=EJB3";
+   
+   public CheckCompleteTestCase()
+   {
+      init("admin","admin");
+   }
+   
+   // TODO the tests are moved into different files since there is a bug where we can't deploy/undeploy the deployer - move them back when bug is fixed
+   
+   // this is without the deployer
+//   public void testDefaultWithoutCheckSubDeploymentCompleteDeployer()
+//   {
+//      // deploy ear & eat expected exception
+//      // check jmx or jndi - with CheckSubDeploymentCompleteDeployer the EJB3 should not be in jmx or jndi
+//      // undeploy ear
+//      // call fail if not valid
+//      verifyCheckCompleteNotCalled(testEar, earEjb3JMXName);
+//      
+//      // Repeat for sar
+//      verifyCheckCompleteNotCalled(testSar, sarEjb3JMXName);
+//   }
+//   
+//   public void testCheckSubDeploymentCompleteDeployerAll()
+//   {      
+//      // deploy CheckSubDeploymentCompleteDeployer configured to check all
+//      deployFailOnException(checkCompleteDeployerAll);
+//      
+//      // deploy ear & eat expected exception
+//      // check jmx or jndi - with CheckSubDeploymentCompleteDeployer the EJB3 should not be in jmx or jndi
+//      // undeploy ear
+//      // call fail if not valid
+//      verifyCheckCompleteCalled(testEar, earEjb3JMXName);
+//
+//      // repeat for sar
+//      verifyCheckCompleteCalled(testSar, sarEjb3JMXName);
+//      
+//      // undeploy CheckSubDeploymentCompleteDeployer configured to check all
+//      undeployLogException(checkCompleteDeployerAll);      
+//   }
+//   
+//   public void testCheckSubDeploymentCompleteDeployerEAROnly()
+//   {
+//      // deploy the CheckSubDeploymentCompleteDeployer that only acts on ears
+//      deployFailOnException(checkCompleteDeployerEAR);
+//      
+//      // deploy ear & eat expected exception
+//      // check jmx or jndi - with CheckSubDeploymentCompleteDeployer the EJB3 should not be in jmx or jndi
+//      // undeploy ear
+//      // call fail if not valid
+//      verifyCheckCompleteCalled(testEar, earEjb3JMXName);
+//      
+//      // same as above, except in the case of the sar, the ejb3 should still be deployed since the checkCompleteDeployerEAR should only check for .ear files 
+//      verifyCheckCompleteNotCalled(testSar, sarEjb3JMXName);
+//      
+//      // undeploy the CheckSubDeploymentCompleteDeployer that only acts on ears
+//      undeployLogException(checkCompleteDeployerEAR);
+//   }
+//   
+//   public void testCheckSubDeploymentCompleteDeployerSAROnly()
+//   {                  
+//      // deploy the CheckSubDeploymentCompleteDeployer that only acts on sars
+//      deployFailOnException(checkCompleteDeployerSAR);
+//      
+//      // deploy sar & eat expected exception
+//      // check jmx or jndi - with CheckSubDeploymentCompleteDeployer the EJB3 should not be in jmx or jndi
+//      // undeploy sar
+//      // call fail if not valid
+//      verifyCheckCompleteCalled(testSar,sarEjb3JMXName);
+//      
+//      // same as above, except in the case of the ear, the ejb3 should still be deployed since the checkCompleteDeployerEAR should only check for .sar files 
+//      verifyCheckCompleteNotCalled(testEar, earEjb3JMXName);
+//      
+//      // undeploy the CheckSubDeploymentCompleteDeployer that only acts on sars
+//      undeployLogException(checkCompleteDeployerSAR);
+//   }
+   
+   // helper methods from here on
+   
+   protected void verifyCheckCompleteNotCalled(String testApp, String jmxName)
+   {      
+      // deploy ear & eat expected exception
+      deployTestAppEatException(testApp);    
+      
+      // check jmx or jndi - with CheckSubDeploymentCompleteDeployer the EJB3 should not be in jmx or jndi
+      boolean ejbExists = existsInJMX(jmxName);
+      
+      // undeploy ear
+      undeployLogException(testApp);
+      
+      if ( ! ejbExists ) 
+         fail("When the CheckSubDeploymentCompleteDeployer checkcomplete is not called, the test EJB3 in " + testApp + " should be deployed: " + jmxName);      
+   }
+   
+   protected void verifyCheckCompleteCalled(String testApp, String jmxName)
+   {      
+      // deploy ear & eat expected exception
+      deployTestAppEatException(testApp);    
+      
+      // check jmx or jndi - with CheckSubDeploymentCompleteDeployer the EJB3 should not be in jmx or jndi
+      boolean ejbExists = existsInJMX(jmxName);
+      
+      // undeploy ear
+      undeployLogException(testApp);
+      
+      if ( ejbExists ) 
+         fail("When the CheckSubDeploymentCompleteDeployer checkcomplete is called, the test EJB3 in " + testApp + " should not be deployed: " + jmxName);      
+   }
+   
+   // deploy/undeploy helper methods to eat exceptions and fail if necessary to make test code not need a lot of try/catch
+   
+   protected void undeployLogException(String path)
+   {
+      try 
+      {
+         undeploy(path);
+      }
+      catch (Exception e)
+      {
+         e.printStackTrace();
+      }
+   }
+
+   protected void deployFailOnException(String path)
+   {
+      try
+      {
+         deploy(path);
+      }
+      catch (Exception e)
+      {
+         e.printStackTrace();
+         fail("Failed to deploy: " + path);
+      }
+   }
+   
+   protected void deployTestAppEatException(String path)
+   {
+      try
+      {
+         deploy(path);
+      }
+      catch (Exception e)
+      {
+         e.printStackTrace();
+         // do nothing since it should fail to deploy
+         return;
+      }
+      // fail test if no exception because it should have failed to deploy
+      fail("Test app: " + path + " should have failed to deploy because of the microcontainer beans throwing exception in create");
+   }
+   
+   // See if a jmxName exists in JMX - fail test on unexpected errors
+   private boolean existsInJMX(String jmxName)
+   {
+      ObjectName objectName = null;
+      MBeanServerConnection mbeanServer = null;
+      try
+      {
+         mbeanServer = getRMIServer();
+         objectName = new ObjectName(jmxName);
+      }
+      catch ( Exception e )
+      {
+         fail(e.getMessage());
+      }
+      
+      try
+      {
+         MBeanInfo mbeanInfo = mbeanServer.getMBeanInfo(objectName);
+      }
+      catch ( InstanceNotFoundException infe )
+      {         
+         return false;
+      }
+      catch ( Exception e )
+      {
+         // fail if an exception occurs trying to call getMBeanInfo
+         fail(e.getMessage());
+      }
+      return true;
+   }
+   
+   // helper methods to get access to the mbean server and main deployer
+   
+   private static MBeanServerConnection getRMIServer() throws Exception
+   {
+     String connectorName = "jmx/rmi/RMIAdaptor";
+     RMIAdaptor server = (RMIAdaptor) getInitialContext(host).lookup(connectorName);
+     //invoke MainDeployer MBean service
+     return server;
+   }
+
+   private static InitialContext getInitialContext(String host) throws Exception
+   {
+     if ( host == null )
+       return new InitialContext();
+     else
+     {
+       Properties props = new Properties();
+       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+       props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
+       props.put(Context.PROVIDER_URL, "jnp://"+host+":1099");
+       return new InitialContext(props);
+     }
+   }
+
+    private void init(String username, String password)
+    {
+     SecurityAssociation.setPrincipal(new SimplePrincipal(username));
+     SecurityAssociation.setCredential(password);
+    }
+      
+   /**
+   * This is an example of getting the MainDeployer from the MBean Server and invoking deploy using 
+   * standard MBean reflective invoke commands
+   */
+   protected static void deploy(String deployURL) throws Exception
+   {
+      MainDeployerMBean mbean = null;
+      
+         ObjectName objectName = new ObjectName(objectNameString);
+         MBeanServerConnection server = getRMIServer();
+
+         // arguments for the invoke call
+         String operationName = "deploy"; // the method 
+         Object[] params = new Object[]
+         {deployURL}; // the arguments
+         String[] signature = new String[]
+         {String.class.getName()}; // the class type of the arguments
+
+         //Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) 
+         //throws InstanceNotFoundException, MBeanException, ReflectionException
+         Object returnValue = server.invoke(objectName, operationName, params, signature);      
+   }
+
+   /**
+   * This is an example of getting the MainDeployer from the MBean Server and invoking undeploy using 
+   * standard MBean reflective invoke commands
+   */
+   protected static void undeploy(String deployURL) throws Exception
+   {
+      MainDeployerMBean mbean = null;
+      
+         ObjectName objectName = new ObjectName(objectNameString);
+         MBeanServerConnection server = getRMIServer();
+         
+         // arguments for the invoke call
+         String operationName = "undeploy"; // the method 
+         Object[] params = new Object[]
+         {deployURL}; // the arguments
+         String[] signature = new String[]
+         {String.class.getName()}; // the class type of the arguments
+
+         //Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) 
+         //throws InstanceNotFoundException, MBeanException, ReflectionException
+         Object returnValue = server.invoke(objectName, operationName, params, signature);
+   }
+}

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/ejb3/Hello.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/ejb3/Hello.java	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/ejb3/Hello.java	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployment.jbpapp6517.ejb3;
+
+import javax.ejb.Remote;
+
+/**
+ * @author bmaxwell 
+ */
+public @Remote interface Hello 
+{
+   public String hello(String name);	
+}
+

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/ejb3/HelloBean.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/ejb3/HelloBean.java	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/ejb3/HelloBean.java	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployment.jbpapp6517.ejb3;
+
+import javax.ejb.Stateless;
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * 
+ * @author bmaxwell
+ */
+ at Stateless 
+ at RemoteBinding(jndiBinding="HelloBean/remote")
+public class HelloBean implements Hello 
+{
+   public String hello(String name) 
+   {
+      return "Hello " + name;
+   }
+}

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/mcbean/HelloMCBean.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/mcbean/HelloMCBean.java	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/mcbean/HelloMCBean.java	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployment.jbpapp6517.mcbean;
+
+public class HelloMCBean implements HelloMCMBean
+{ 
+	public void start() 
+	{        
+		System.out.println(" >>> enter start");
+			throw new RuntimeException("exceptions launched from start");
+	}
+    
+	public void stop() 
+	{
+		System.out.println(" >>> enter stop");
+	}   
+}

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/mcbean/HelloMCMBean.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/mcbean/HelloMCMBean.java	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/main/org/jboss/test/deployment/jbpapp6517/mcbean/HelloMCMBean.java	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployment.jbpapp6517.mcbean;
+
+public interface HelloMCMBean
+{ 
+}

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployer-jboss-beans.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployer-jboss-beans.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployer-jboss-beans.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+            xmlns="urn:jboss:bean-deployer:2.0">
+
+     <bean name="CheckSubDeploymentCompleteDeployer" class="org.jboss.deployment.CheckSubDeploymentCompleteDeployer">
+        <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+     </bean>
+</deployment>

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerAll-jboss-beans.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerAll-jboss-beans.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerAll-jboss-beans.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+            xmlns="urn:jboss:bean-deployer:2.0">
+
+     <bean name="CheckSubDeploymentCompleteDeployer" class="org.jboss.deployment.CheckSubDeploymentCompleteDeployer">
+        <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+     </bean>
+</deployment>

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerEAR-jboss-beans.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerEAR-jboss-beans.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerEAR-jboss-beans.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+            xmlns="urn:jboss:bean-deployer:2.0">
+
+     <bean name="CheckSubDeploymentCompleteDeployer" class="org.jboss.deployment.CheckSubDeploymentCompleteDeployer">
+        <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+        <property name="types">.ear</property>
+     </bean>
+</deployment>

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerSAR-jboss-beans.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerSAR-jboss-beans.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/checkSubDeploymentCompleteDeployerSAR-jboss-beans.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+            xmlns="urn:jboss:bean-deployer:2.0">
+
+     <bean name="CheckSubDeploymentCompleteDeployer" class="org.jboss.deployment.CheckSubDeploymentCompleteDeployer">
+        <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+				 <property name="types">.war,.sar</property>
+     </bean>
+</deployment>

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/ear/META-INF/application.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/ear/META-INF/application.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/ear/META-INF/application.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" version="1.4">
+  <description></description>
+  <display-name>jbpapp-6517</display-name>
+
+  <module>
+    <java>jbpapp-6517-bean.jar</java>
+  </module>
+
+  <module>
+    <ejb>jbpapp-6517-ejb.jar</ejb>
+  </module>
+
+</application>

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/ear/META-INF/jboss-app.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/ear/META-INF/jboss-app.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/ear/META-INF/jboss-app.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<jboss-app>
+
+<module-order>strict</module-order>
+
+  <loader-repository>
+    testcase.jboss.org:loader=testcase.ear
+    <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+  </loader-repository>
+
+</jboss-app>

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/jmx-console-users.properties
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/jmx-console-users.properties	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/jmx-console-users.properties	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,2 @@
+# A sample users.properties file for use with the UsersRolesLoginModule
+admin=admin

Added: branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/mcbean/META-INF/jboss-beans.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/mcbean/META-INF/jboss-beans.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-5820/testsuite/src/resources/org/jboss/test/deployment/jbpapp6517/mcbean/META-INF/jboss-beans.xml	2011-05-13 02:58:01 UTC (rev 111360)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
+  <bean name="HelloMCBean" class="org.jboss.test.deployment.jbpapp6517.mcbean.HelloMCBean"> 
+       <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="org.jboss.test.deployment.jbpapp6517.mcbean:service=HelloMCBean",exposedInterface=org.jboss.test.deployment.jbpapp6517.mcbean.HelloMCMBean.class,registerDirectly=false)</annotation>
+</bean>
+
+</deployment>



More information about the jboss-cvs-commits mailing list