[jboss-cvs] JBossAS SVN: r67935 - in trunk: testsuite/src/main/org/jboss/test/messagedriven/support and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 5 08:31:11 EST 2007
Author: adrian at jboss.org
Date: 2007-12-05 08:31:11 -0500 (Wed, 05 Dec 2007)
New Revision: 67935
Added:
trunk/server/src/main/org/jboss/deployment/EjbParsingDeployerMBean.java
Modified:
trunk/server/src/main/org/jboss/deployment/EjbParsingDeployer.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
Log:
Allow the xml validation to be turned off for ejb-jar.xml using an MBean and turn it off for the messagedriven tests since they don't conform to the schema because of a system property in the transaction-type element
Modified: trunk/server/src/main/org/jboss/deployment/EjbParsingDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/EjbParsingDeployer.java 2007-12-05 12:43:58 UTC (rev 67934)
+++ trunk/server/src/main/org/jboss/deployment/EjbParsingDeployer.java 2007-12-05 13:31:11 UTC (rev 67935)
@@ -21,6 +21,7 @@
*/
package org.jboss.deployment;
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.metadata.ejb.spec.EjbJarMetaData;
@@ -35,7 +36,8 @@
* @version $Revision$
*/
@SuppressWarnings("deprecation")
-public class EjbParsingDeployer extends SchemaResolverDeployer<EjbJarMetaData>
+ at JMX(name="jboss.ejb:service=EjbParsingDeployer", exposedInterface=EjbParsingDeployerMBean.class)
+public class EjbParsingDeployer extends SchemaResolverDeployer<EjbJarMetaData> implements EjbParsingDeployerMBean
{
/**
* Create a new EjbParsingDeployer.
Added: trunk/server/src/main/org/jboss/deployment/EjbParsingDeployerMBean.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/EjbParsingDeployerMBean.java (rev 0)
+++ trunk/server/src/main/org/jboss/deployment/EjbParsingDeployerMBean.java 2007-12-05 13:31:11 UTC (rev 67935)
@@ -0,0 +1,81 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* 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.deployment;
+
+/**
+ * EjbParsingDeployerMBean.
+ *
+ * FIXME create MBean interfaces for deployers for implementations to extend
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public interface EjbParsingDeployerMBean
+{
+ /**
+ * Get the name.
+ *
+ * @return the name.
+ */
+ String getName();
+
+ /**
+ * Get the suffix.
+ *
+ * @return the suffix.
+ */
+ String getSuffix();
+
+ /**
+ * Get the includeDeploymentFile.
+ *
+ * @return the includeDeploymentFile.
+ */
+ boolean isIncludeDeploymentFile();
+
+ /**
+ * Get the useSchemaValidation.
+ *
+ * @return the useSchemaValidation.
+ */
+ boolean isUseSchemaValidation();
+
+ /**
+ * Set the useSchemaValidation.
+ *
+ * @param useSchemaValidation the useSchemaValidation.
+ */
+ void setUseSchemaValidation(boolean useSchemaValidation);
+
+ /**
+ * Get the useValidation.
+ *
+ * @return the useValidation.
+ */
+ boolean isUseValidation();
+
+ /**
+ * Set the useValidation.
+ *
+ * @param useValidation the useValidation.
+ */
+ void setUseValidation(boolean useValidation);
+}
\ No newline at end of file
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java 2007-12-05 12:43:58 UTC (rev 67934)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java 2007-12-05 13:31:11 UTC (rev 67935)
@@ -35,6 +35,8 @@
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
+import javax.management.Attribute;
+import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import org.jboss.mx.util.ObjectNameFactory;
@@ -53,6 +55,8 @@
protected static final long WAIT_TIME = 5000L;
protected static final long REPEATED_WAIT = 4;
+ protected static ObjectName ejbParsingDeployer = ObjectNameFactory.create("jboss.ejb:service=EjbParsingDeployer");
+
protected static ObjectName testQueue = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=testQueue");
protected static Properties testQueueProps = new Properties();
@@ -303,17 +307,27 @@
clearMessages(getDLQJMXDestination());
tidyup(props);
initProperties(props);
- deploy(getMDBDeployment());
+ MBeanServerConnection server = getServer();
+ Boolean previous = (Boolean) server.getAttribute(ejbParsingDeployer, "UseValidation");
+ server.setAttribute(ejbParsingDeployer, new Attribute("UseValidation", Boolean.FALSE));
try
{
- // FIXME Need to wait for asynchrounous bootstrap of container
- Thread.sleep(5000);
- startReceiverThread();
+ deploy(getMDBDeployment());
+ try
+ {
+ // FIXME Need to wait for asynchrounous bootstrap of container
+ Thread.sleep(5000);
+ startReceiverThread();
+ }
+ catch (Exception e)
+ {
+ undeploy(getMDBDeployment());
+ throw e;
+ }
}
- catch (Exception e)
+ finally
{
- undeploy(getMDBDeployment());
- throw e;
+ server.setAttribute(ejbParsingDeployer, new Attribute("UseValidation", previous));
}
}
More information about the jboss-cvs-commits
mailing list