[jboss-svn-commits] JBL Code SVN: r10170 - in labs/jbossesb/trunk: product/core/rosetta/src/org/jboss/soa/esb/dom and 22 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Mar 13 23:10:16 EDT 2007
Author: bill.burke at jboss.com
Date: 2007-03-13 23:10:16 -0400 (Tue, 13 Mar 2007)
New Revision: 10170
Added:
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Configuration.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployerMBean.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeploymentMBean.java
labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryService.java
labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryServiceMBean.java
labs/jbossesb/trunk/product/install/jboss-service-registry.xml
labs/jbossesb/trunk/product/lib/ext/jboss.jar
labs/jbossesb/trunk/qa/junit/resources/
labs/jbossesb/trunk/qa/junit/resources/server/
labs/jbossesb/trunk/qa/junit/resources/server/simple/
labs/jbossesb/trunk/qa/junit/resources/server/simple/META-INF/
labs/jbossesb/trunk/qa/junit/resources/server/simple/META-INF/jboss-esb.xml
labs/jbossesb/trunk/qa/junit/resources/server/simple/esb-queues-service.xml
labs/jbossesb/trunk/qa/junit/resources/server/simple/test-service.xml
labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/
labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/MyJMSListenerAction.java
labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/Stats.java
labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/StatsMBean.java
labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/unit/
labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/unit/SimpleDeployUnitTestCase.java
labs/jbossesb/trunk/qa/junit/versioned-scoped-src/
labs/jbossesb/trunk/qa/junit/versioned-scoped-src/org/
labs/jbossesb/trunk/qa/junit/versioned-scoped-src/org/jboss/
labs/jbossesb/trunk/qa/junit/versioned-scoped-src/org/jboss/soa/
labs/jbossesb/trunk/qa/junit/versioned-scoped-src/org/jboss/soa/esb/
labs/jbossesb/trunk/qa/junit/versioned-scoped-src/org/jboss/soa/esb/server/
labs/jbossesb/trunk/qa/lib/ext/jboss-test.jar
labs/jbossesb/trunk/qa/stylesheets/
labs/jbossesb/trunk/qa/stylesheets/details1.xsl
labs/jbossesb/trunk/qa/stylesheets/junit-frames.xsl
labs/jbossesb/trunk/qa/stylesheets/shortXmlSummary.xsl
labs/jbossesb/trunk/qa/stylesheets/summary1.xsl
labs/jbossesb/trunk/qa/stylesheets/summary1a.xsl
labs/jbossesb/trunk/qa/stylesheets/summary1b.xsl
labs/jbossesb/trunk/qa/stylesheets/summary2.xsl
Modified:
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Generator.java
labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java
labs/jbossesb/trunk/product/core/services/build.xml
labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryFactory.java
labs/jbossesb/trunk/product/install/build.xml
labs/jbossesb/trunk/product/install/jboss-service-dependencies.xml
labs/jbossesb/trunk/product/install/jboss-service.xml
labs/jbossesb/trunk/product/tools/configeditor/editor/dist/configapp.war
labs/jbossesb/trunk/qa/junit/build.xml
Log:
* ESB Deployer for JBoss kernel
* Added JBoss Test Harness to qa/junit
Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Configuration.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Configuration.java (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Configuration.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,111 @@
+/*
+* 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.soa.esb.listeners.config;
+
+import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.LifecycleUtil;
+import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycle;
+import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
+import org.xml.sax.InputSource;
+
+import javax.xml.transform.stream.StreamSource;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.net.URL;
+import java.util.List;
+
+/**
+ * comment
+ *
+ * @author <a href="kurt.stam at jboss.com">Kurt Stam</a>
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class Configuration
+{
+ private static final String JBOSSESB_XSD = "/jbossesb-1.0.1.xsd";
+
+ public static String getStringFromStream(InputStream is) throws Exception
+ {
+ byte[] bytes = StreamUtils.readStream(is);
+ return new String(bytes, "UTF-8");
+ }
+
+ public static ManagedLifecycleController create(URL jbossEsbXml)
+ {
+ String configXml = null;
+ try
+ {
+ configXml = getStringFromStream(jbossEsbXml.openStream());
+ return create(configXml);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to load jbossesb.xml file: " + jbossEsbXml, e);
+ }
+ }
+
+ public static ManagedLifecycleController create(String configXml)
+ {
+ InputStream validationInputStream = Configuration.class.getResourceAsStream(JBOSSESB_XSD);
+ //if this fails try using the
+ if (validationInputStream == null)
+ {
+ throw new IllegalStateException("ESB validation file [" + JBOSSESB_XSD + "] not found.");
+ }
+ StreamSource validationInputSource = new StreamSource(validationInputStream);
+
+ try
+ {
+ InputSource xmlInputSource = new InputSource(new StringReader(configXml));
+ XmlValidator validator = new XmlValidatorImpl();
+ if (validator.validate(xmlInputSource, validationInputSource))
+ {
+ ByteArrayOutputStream listenerXml = new ByteArrayOutputStream();
+ ByteArrayOutputStream gatewayXml = new ByteArrayOutputStream();
+ Generator generator = new Generator(new ByteArrayInputStream(configXml.getBytes()), listenerXml, gatewayXml);
+ generator.generate();
+ byte[] listenerBytes = listenerXml.toByteArray();
+ //System.out.println("*************** listenerBytes: " + new String(listenerBytes));
+ ByteArrayInputStream listenerIs = new ByteArrayInputStream(listenerBytes);
+ ConfigTree listenerConfig = ConfigTree.fromInputStream(listenerIs);
+ List<ManagedLifecycle> instances = LifecycleUtil.getListeners(listenerConfig);
+
+ byte[] gatewayBytes = gatewayXml.toByteArray();
+ //System.out.println("*************** gatewayBytes: " + new String(gatewayBytes));
+ ByteArrayInputStream gatewayIs = new ByteArrayInputStream(gatewayBytes);
+ ConfigTree gatewayConfig = ConfigTree.fromInputStream(gatewayIs);
+ instances.addAll(LifecycleUtil.getGateways(gatewayConfig));
+ return new ManagedLifecycleController(instances);
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+
+ return null;
+ }
+}
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Generator.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Generator.java 2007-03-14 02:34:28 UTC (rev 10169)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Generator.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -24,6 +24,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
@@ -61,8 +62,20 @@
* Configuration model.
*/
private XMLBeansModel model;
-
- /**
+
+ private OutputStream gatewayOutputStream;
+
+ private OutputStream listenerOutputStream;
+
+
+ public Generator(InputStream config, OutputStream listenerOutputStream, OutputStream gatewayOutputStream) throws ConfigurationException, IOException
+ {
+ this(config);
+ this.gatewayOutputStream = gatewayOutputStream;
+ this.listenerOutputStream = listenerOutputStream;
+ }
+
+ /**
* Public constructor.
* @param config The input configuration stream.
* @throws ConfigurationException Bad listener ESB configuration.
@@ -86,6 +99,24 @@
}
}
+ /**
+ * Generate the configuration set in the supplied output directory and store it in the member outputstreams.
+ * @throws ConfigurationException Failed to generate configuration set.
+ */
+ public void generate() throws ConfigurationException {
+ // Generate and serialise the configuration for the ESB Aware listeners...
+ ESBAwareGenerator awareGenerator = new ESBAwareGenerator(model);
+ Document awareConfig = awareGenerator.generate();
+
+ YADOMUtil.serialize(awareConfig, listenerOutputStream);
+
+ // Generate and serialise the configuration for the Gateway listeners...
+ GatewayGenerator gatewayGenerator = new GatewayGenerator(model);
+ Document gatewayConfig = gatewayGenerator.generate();
+
+ YADOMUtil.serialize(gatewayConfig, gatewayOutputStream);
+ }
+
/**
* Generate the configuration set in the supplied output directory.
* <p/>
Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,278 @@
+/*
+* 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.soa.esb.listeners.config;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.deployment.SubDeployer;
+import org.jboss.deployment.SubDeployerSupport;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.MetaData;
+import org.jboss.metadata.XmlFileLoader;
+import org.jboss.mx.loading.LoaderRepositoryFactory;
+import org.jboss.mx.util.MBeanProxyExt;
+import org.jboss.mx.util.ObjectNameConverter;
+import org.jboss.system.ServiceControllerMBean;
+import org.w3c.dom.Element;
+
+import javax.naming.InitialContext;
+import javax.management.ObjectName;
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class JBoss4ESBDeployer extends SubDeployerSupport
+ implements SubDeployer, JBoss4ESBDeployerMBean
+{
+ private final static Logger log = Logger.getLogger(JBoss4ESBDeployer.class);
+
+ private ServiceControllerMBean serviceController;
+
+ /**
+ * Default CTOR used to set default values to the Suffixes and RelativeOrder
+ * attributes. Those are read at subdeployer registration time by the MainDeployer
+ * to alter its SuffixOrder.
+ */
+ public JBoss4ESBDeployer()
+ {
+ setSuffixes(new String[]{".esb"});
+ setRelativeOrder(1000); // before old EJB 2.1 deployer
+ }
+
+ public static boolean hasFile(DeploymentInfo di, String filePath)
+ {
+ String urlStr = di.url.getFile();
+ try
+ {
+ URL dd = di.localCl.findResource(filePath);
+ if (dd != null)
+ {
+
+ // If the DD url is not a subset of the urlStr then this is coming
+ // from a jar referenced by the deployment jar manifest and the
+ // this deployment jar it should not be treated as persistence
+ if (di.localUrl != null)
+ {
+ urlStr = di.localUrl.toString();
+ }
+
+ String ddStr = dd.toString();
+ if (ddStr.indexOf(urlStr) >= 0)
+ {
+ return true;
+ }
+ }
+ }
+ catch (Exception ignore)
+ {
+ }
+ return false;
+ }
+
+ /**
+ * Returns true if this deployer can deploy the given DeploymentInfo.
+ *
+ * @return True if this deployer can deploy the given DeploymentInfo.
+ * @jmx:managed-operation
+ */
+ public boolean accepts(DeploymentInfo di)
+ {
+ String urlStr = di.url.toString();
+ return urlStr.endsWith(".esb") || urlStr.endsWith(".esb/") ||
+ urlStr.endsWith("-esb.xml");
+ }
+
+ /**
+ * Get a reference to the ServiceController
+ */
+ protected void startService() throws Exception
+ {
+ serviceController = (ServiceControllerMBean)
+ MBeanProxyExt.create(ServiceControllerMBean.class,
+ ServiceControllerMBean.OBJECT_NAME, server);
+
+ mainDeployer.addDeployer(this);
+ }
+
+
+ protected URL getDocumentUrl(DeploymentInfo di)
+ {
+ String urlStr = di.url.toString();
+ if (urlStr.endsWith(".esb") || urlStr.endsWith(".esb/"))
+ {
+ return di.localCl.getResource("META-INF/jboss-esb.xml");
+ }
+ return di.url;
+ }
+
+ public void init(DeploymentInfo di) throws DeploymentException
+ {
+ try
+ {
+ if (di.url.getProtocol().equalsIgnoreCase("file"))
+ {
+ File file = new File(di.url.getFile());
+
+ if (!file.isDirectory())
+ {
+ // If not directory we watch the package
+ di.watch = di.url;
+ }
+ else
+ {
+ // If directory we watch the xml files
+ di.watch = new URL(di.url, "META-INF/jboss-esb.xml");
+ }
+ }
+ else
+ {
+ // We watch the top only, no directory support
+ di.watch = di.url;
+ }
+
+ XmlFileLoader xfl = new XmlFileLoader();
+ InputStream in = di.localCl.getResourceAsStream("META-INF/classloader.xml");
+ if (in != null)
+ {
+ try
+ {
+ Element jboss = xfl.getDocument(in, "META-INF/classloader.xml").getDocumentElement();
+ // Check for a ejb level class loading config
+ Element loader = MetaData.getOptionalChild(jboss, "loader-repository");
+ if (loader != null)
+ {
+ LoaderRepositoryFactory.LoaderRepositoryConfig config =
+ LoaderRepositoryFactory.parseRepositoryConfig(loader);
+ di.setRepositoryInfo(config);
+ }
+
+ }
+ finally
+ {
+ in.close();
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ if (e instanceof DeploymentException)
+ {
+ throw(DeploymentException) e;
+ }
+ throw new DeploymentException("failed to initialize", e);
+ }
+
+ // invoke super-class initialization
+ super.init(di);
+ }
+
+ public synchronized void create(DeploymentInfo di) throws DeploymentException
+ {
+ log.debug("create, " + di.shortName);
+ try
+ {
+ String jbossEsbXml = Configuration.getStringFromStream(getDocumentUrl(di).openStream());
+ JBoss4ESBDeployment deployment = new JBoss4ESBDeployment(jbossEsbXml);
+ String name = "jboss.esb:deployment=" + di.shortName;
+ ObjectName on = ObjectNameConverter.convert(name);
+ // Check that the name is not registered
+ if (server.isRegistered(on) == true)
+ {
+ log.debug("The ESBModule name: " + name
+ + "is already registered, adding uid=" + System.identityHashCode(deployment));
+ name = name + ",uid=" + System.identityHashCode(deployment);
+ on = ObjectNameConverter.convert(name);
+ }
+ server.registerMBean(deployment, on);
+ di.deployedObject = on;
+ log.debug("Deploying: " + di.url);
+ // Invoke the create life cycle method
+ serviceController.create(di.deployedObject);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error during create of ESB Module: "
+ + di.url, e);
+ }
+ super.create(di);
+ }
+
+ public synchronized void start(DeploymentInfo di)
+ throws DeploymentException
+ {
+ try
+ {
+ serviceController.start(di.deployedObject);
+ }
+ catch (Exception e)
+ {
+ try
+ {
+ stop(di);
+ destroy(di);
+ }
+ catch (DeploymentException ignore)
+ {
+ }
+ throw new DeploymentException("Error during start of ESB Module: "
+ + di.url, e);
+ }
+
+ super.start(di);
+ }
+
+ public void stop(DeploymentInfo di)
+ throws DeploymentException
+ {
+ try
+ {
+ serviceController.stop(di.deployedObject);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error during stop of ESB Module: "
+ + di.url, e);
+ }
+ super.stop(di);
+ }
+
+ public void destroy(DeploymentInfo di)
+ throws DeploymentException
+ {
+ try
+ {
+ serviceController.destroy(di.deployedObject);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error during stop of ESB Module: "
+ + di.url, e);
+ }
+ super.destroy(di);
+ }
+}
Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployerMBean.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployerMBean.java (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployerMBean.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,34 @@
+/*
+* 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.soa.esb.listeners.config;
+
+import org.jboss.deployment.SubDeployerMBean;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface JBoss4ESBDeployerMBean extends SubDeployerMBean
+{
+}
Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,78 @@
+/*
+* 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.soa.esb.listeners.config;
+
+import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
+import org.jboss.system.ServiceMBeanSupport;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class JBoss4ESBDeployment extends ServiceMBeanSupport implements JBoss4ESBDeploymentMBean
+{
+ private String jbossEsbXml;
+ private ManagedLifecycleController controller;
+
+
+ public JBoss4ESBDeployment(String jbossEsbXml)
+ {
+ this.jbossEsbXml = jbossEsbXml;
+ }
+
+ public String getJbossEsbXml()
+ {
+ return jbossEsbXml;
+ }
+
+ public String getJbossEsbXmlAsHtml()
+ {
+ return jbossEsbXml.replace("<", "<").replace(">", ">");
+ }
+
+ public ManagedLifecycleController getController()
+ {
+ return controller;
+ }
+
+ @Override
+ public void createService()
+ {
+ controller = Configuration.create(jbossEsbXml);
+ }
+
+ @Override
+ public void startService() throws Exception
+ {
+ controller.start();
+
+ }
+
+ @Override
+ public void stopService() throws Exception
+ {
+ controller.stop();
+ }
+
+}
Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeploymentMBean.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeploymentMBean.java (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeploymentMBean.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,39 @@
+/*
+* 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.soa.esb.listeners.config;
+
+import org.jboss.system.ServiceMBean;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface JBoss4ESBDeploymentMBean extends ServiceMBean
+{
+ String getJbossEsbXml()
+ ;
+
+ String getJbossEsbXmlAsHtml()
+ ;
+}
Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java 2007-03-14 02:34:28 UTC (rev 10169)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -22,6 +22,7 @@
package org.jboss.soa.esb.dom;
import java.io.File;
+import java.io.OutputStream;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -118,7 +119,11 @@
serialize(node, new StreamResult(new File(outdir, fileName)));
}
- /**
+ public static void serialize(Node node, OutputStream out) throws ConfigurationException {
+ serialize(node, new StreamResult(out));
+ }
+
+ /**
* Serialize the supplied DOM node to the supplied DOM StreamResult instance.
* @param node The DOM node to be serialised.
* @param streamRes The StreamResult into which the node is to be serialised.
Modified: labs/jbossesb/trunk/product/core/services/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/services/build.xml 2007-03-14 02:34:28 UTC (rev 10169)
+++ labs/jbossesb/trunk/product/core/services/build.xml 2007-03-14 03:10:16 UTC (rev 10170)
@@ -2,135 +2,140 @@
<project name="JbossEsbServices" default="org.jboss.esb.services.compile" basedir=".">
- <property name="org.jboss.esb.internal.dest" location="../../build"/>
-
- <property name="org.jboss.esb.services.name.jar" value="${ant.project.name}.jar"/>
- <property name="org.jboss.esb.services.dist.dir" location="${org.jboss.esb.internal.dest}/jbossesb"/>
- <property name="org.jboss.esb.services.appl.dir" location="../.."/>
- <property name="org.jboss.esb.services.metainf.dir" location="src/META-INF"/>
+ <property name="org.jboss.esb.internal.dest" location="../../build"/>
- <property name="org.jboss.esb.services.classes.dir" location="${org.jboss.esb.internal.dest}/classes/services"/>
- <property name="org.jboss.esb.services.src.dir" location="src"/>
- <property name="org.jboss.esb.services.rules.dir" location="rules"/>
- <property name="org.jboss.esb.root.dir" location="../.."/>
- <property environment="env"/>
+ <property name="org.jboss.esb.services.name.jar" value="${ant.project.name}.jar"/>
+ <property name="org.jboss.esb.services.dist.dir" location="${org.jboss.esb.internal.dest}/jbossesb"/>
+ <property name="org.jboss.esb.services.appl.dir" location="../.."/>
+ <property name="org.jboss.esb.services.metainf.dir" location="src/META-INF"/>
- <property name="org.jboss.esb.ext.serverlib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
- <condition property="org.jboss.esb.ext.serverlib.dir" value="${org.jboss.esb.jboss.home}/server/all/lib">
- <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
- </condition>
-
- <property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
- <condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/lib">
- <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
- </condition>
-
- <!-- =================================================================== -->
- <!-- Define the class path -->
- <!-- =================================================================== -->
- <path id="org.jboss.esb.services.base.classpath">
- <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar" excludes="jbossall-client.jar"/>
- <pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
- </path>
+ <property name="org.jboss.esb.services.classes.dir" location="${org.jboss.esb.internal.dest}/classes/services"/>
+ <property name="org.jboss.esb.services.src.dir" location="src"/>
+ <property name="org.jboss.esb.services.rules.dir" location="rules"/>
+ <property name="org.jboss.esb.root.dir" location="../.."/>
+ <property environment="env"/>
- <!-- =================================================================== -->
- <!-- Initialize -->
- <!-- =================================================================== -->
- <target name="org.jboss.esb.services.init">
- <tstamp>
- <format property="TODAY" pattern="dd-MM-yy"/>
- </tstamp>
- </target>
+ <property name="org.jboss.esb.ext.serverlib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
+ <condition property="org.jboss.esb.ext.serverlib.dir" value="${org.jboss.esb.jboss.home}/server/all/lib">
+ <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+ </condition>
- <!-- =================================================================== -->
- <!-- Prepares the directory structure -->
- <!-- =================================================================== -->
- <target name="org.jboss.esb.services.prepare" depends="org.jboss.esb.services.init">
- <mkdir dir="${org.jboss.esb.services.classes.dir}"/>
- </target>
+ <property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
+ <condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/lib">
+ <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+ </condition>
- <!-- =================================================================== -->
- <!-- Compiles all the classes -->
- <!-- =================================================================== -->
+ <!-- =================================================================== -->
+ <!-- Define the class path -->
+ <!-- =================================================================== -->
+ <path id="org.jboss.esb.services.base.classpath">
+ <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar" excludes="jbossall-client.jar"/>
+ <pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
+ </path>
- <target name="org.jboss.esb.services.compile">
- <!-- Compile services -->
- <antcall target="org.jboss.esb.services.internal.compile"/>
- <!-- Compile services tests -->
- <ant inheritAll="true" dir="tests" target="org.jboss.esb.services.tests.compile"/>
- </target>
+ <!-- =================================================================== -->
+ <!-- Initialize -->
+ <!-- =================================================================== -->
+ <target name="org.jboss.esb.services.init">
+ <tstamp>
+ <format property="TODAY" pattern="dd-MM-yy"/>
+ </tstamp>
+ </target>
- <target name="org.jboss.esb.services.internal.compile" depends="org.jboss.esb.services.prepare"
- description="Compile all classes">
+ <!-- =================================================================== -->
+ <!-- Prepares the directory structure -->
+ <!-- =================================================================== -->
+ <target name="org.jboss.esb.services.prepare" depends="org.jboss.esb.services.init">
+ <mkdir dir="${org.jboss.esb.services.classes.dir}"/>
+ </target>
- <javac
- destdir="${org.jboss.esb.services.classes.dir}"
- classpathref="org.jboss.esb.services.default.classpath"
- debug="${org.jboss.esb.debug}"
- optimize="${org.jboss.esb.optimize}"
- >
- <src path="${org.jboss.esb.services.src.dir}"/>
- </javac>
+ <!-- =================================================================== -->
+ <!-- Compiles all the classes -->
+ <!-- =================================================================== -->
- </target>
+ <target name="org.jboss.esb.services.compile">
+ <!-- Compile services -->
+ <antcall target="org.jboss.esb.services.internal.compile"/>
+ <!-- Compile services tests -->
+ <ant inheritAll="true" dir="tests" target="org.jboss.esb.services.tests.compile"/>
+ </target>
- <!-- =================================================================== -->
- <!-- Recompiles all the classes -->
- <!-- =================================================================== -->
+ <target name="org.jboss.esb.services.internal.compile" depends="org.jboss.esb.services.prepare"
+ description="Compile all classes">
- <target name="recompile" depends="clean,org.jboss.esb.services.compile"
- description="Clean and compile"/>
+ <javac
+ destdir="${org.jboss.esb.services.classes.dir}"
+ classpathref="org.jboss.esb.services.default.classpath"
+ debug="${org.jboss.esb.debug}"
+ optimize="${org.jboss.esb.optimize}"
+ >
+ <src path="${org.jboss.esb.services.src.dir}"/>
+ </javac>
- <!-- =================================================================== -->
- <!-- Clean -->
- <!-- =================================================================== -->
- <target name="clean" description="Remove classes directory">
- <ant dir="tests" target="clean"/>
- <delete dir="${org.jboss.esb.services.classes.dir}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Rebuild everything from scratch -->
- <!-- =================================================================== -->
- <target name="all" depends="recompile,jar" />
-
- <path id="org.jboss.esb.services.default.classpath">
- <path refid="org.jboss.esb.services.base.classpath"/>
- <pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
- <pathelement location="${org.jboss.esb.internal.dest}/classes/listeners"/>
- </path>
+ </target>
- <!-- =================================================================== -->
- <!-- Jar -->
- <!-- =================================================================== -->
- <target name="jar" description="Assemble jar files"
- depends="org.jboss.esb.services.compile"
- >
- <jar destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-services.jar"
- basedir="${org.jboss.esb.services.classes.dir}"
- includes="**/*.class"
- />
- <jar destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-rules.jar"
- basedir="${org.jboss.esb.services.rules.dir}"
- includes="**/*.drl,**/*.dsl"
- />
+ <!-- =================================================================== -->
+ <!-- Recompiles all the classes -->
+ <!-- =================================================================== -->
- </target>
+ <target name="recompile" depends="clean,org.jboss.esb.services.compile"
+ description="Clean and compile"/>
- <!-- =================================================================== -->
- <!-- Test -->
- <!-- =================================================================== -->
- <target name="org.jboss.esb.services.test" description="Run tests for this module, excluding integration">
- <!-- Compile tests -->
- <ant dir="tests" target="org.jboss.esb.services.internal.test"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Integration Test -->
- <!-- =================================================================== -->
- <target name="org.jboss.esb.services.integration.test" description="Run all tests for this module">
- <!-- Compile tests -->
- <ant dir="tests" target="org.jboss.esb.services.internal.integration.test"/>
- </target>
+ <!-- =================================================================== -->
+ <!-- Clean -->
+ <!-- =================================================================== -->
+ <target name="clean" description="Remove classes directory">
+ <ant dir="tests" target="clean"/>
+ <delete dir="${org.jboss.esb.services.classes.dir}"/>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Rebuild everything from scratch -->
+ <!-- =================================================================== -->
+ <target name="all" depends="recompile,jar"/>
+
+ <path id="org.jboss.esb.services.default.classpath">
+ <path refid="org.jboss.esb.services.base.classpath"/>
+ <pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
+ <pathelement location="${org.jboss.esb.internal.dest}/classes/listeners"/>
+ </path>
+
+ <!-- =================================================================== -->
+ <!-- Jar -->
+ <!-- =================================================================== -->
+ <target name="jar" description="Assemble jar files"
+ depends="org.jboss.esb.services.compile"
+ >
+ <jar destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-services.jar"
+ basedir="${org.jboss.esb.services.classes.dir}"
+ includes="**/*.class"
+ excludes="org/jboss/internal/soa/esb/services/registry/*.class"/>
+ <!-- keep registry impl separate/isolated because it requires scoped jar in JBoss -->
+ <jar destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-registry.jar"
+ basedir="${org.jboss.esb.services.classes.dir}"
+ includes="org/jboss/internal/soa/esb/services/registry/*.class"/>
+ <jar destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-rules.jar"
+ basedir="${org.jboss.esb.services.rules.dir}"
+ includes="**/*.drl,**/*.dsl"
+ />
+
+
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Test -->
+ <!-- =================================================================== -->
+ <target name="org.jboss.esb.services.test" description="Run tests for this module, excluding integration">
+ <!-- Compile tests -->
+ <ant dir="tests" target="org.jboss.esb.services.internal.test"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Integration Test -->
+ <!-- =================================================================== -->
+ <target name="org.jboss.esb.services.integration.test" description="Run all tests for this module">
+ <!-- Compile tests -->
+ <ant dir="tests" target="org.jboss.esb.services.internal.integration.test"/>
+ </target>
+
</project>
Added: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryService.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryService.java (rev 0)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryService.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,71 @@
+/*
+* 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.internal.soa.esb.services.registry;
+
+import org.jboss.system.ServiceMBeanSupport;
+import org.jboss.soa.esb.services.registry.Registry;
+import org.jboss.soa.esb.services.registry.RegistryFactory;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+/**
+ * Service to isolate registry because of classloader dependency
+ * This service can be removed if scout and jaxr dependencies are synchronzied with
+ * application server.
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class JAXRRegistryService extends ServiceMBeanSupport implements JAXRRegistryServiceMBean
+{
+ @Override
+ protected void createService() throws Exception
+ {
+ final Registry registry = RegistryFactory.createRegistry();
+ Class[] intfs = {Registry.class};
+
+ // create a proxy around the Registry implementation that pushes/pops the
+ // scoped classloader
+
+ InvocationHandler handler = new InvocationHandler()
+ {
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ ClassLoader old = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(JAXRRegistryService.class.getClassLoader());
+ try
+ {
+ return method.invoke(registry, args);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(old);
+ }
+ }
+
+ };
+
+ RegistryFactory.setRegistry((Registry)Proxy.newProxyInstance(Registry.class.getClassLoader(), intfs, handler));
+ }
+}
Added: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryServiceMBean.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryServiceMBean.java (rev 0)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryServiceMBean.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,34 @@
+/*
+* 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.internal.soa.esb.services.registry;
+
+import org.jboss.system.ServiceMBean;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface JAXRRegistryServiceMBean extends ServiceMBean
+{
+}
Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryFactory.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryFactory.java 2007-03-14 02:34:28 UTC (rev 10169)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryFactory.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -36,35 +36,48 @@
{
private static Logger logger = Logger.getLogger(RegistryFactory.class);
- public static Registry getRegistry() throws RegistryException
+ private static Registry singleton;
+
+ public static synchronized void setRegistry(Registry registry)
+ {
+ singleton = registry;
+ }
+
+
+ public static Registry getRegistry() throws RegistryException
{
- Registry registry = null;
- String className = Configuration.getRegistryImplementationClass();
- logger.log(Priority.DEBUG, "Going to load " + className);
-
- if (className == null)
- throw new RegistryException("No registry implementation class specified!");
-
- try
+ // no synchronized block as there should be a service that initializes this
+ if (singleton != null) return singleton;
+ return createRegistry();
+ }
+
+ public static Registry createRegistry()
+ throws RegistryException
+ {
+ Registry registry = null;
+ String className = Configuration.getRegistryImplementationClass();
+ logger.log(Priority.DEBUG, "Going to load " + className);
+
+ try
{
// instruct class loader to load the Registry Implementation
- Class registryClass = getClassForName(className);
- // Try to instance the Registry
- registry = (Registry) registryClass.newInstance();
- }
- catch (ClassNotFoundException cnfex)
- {
- throw new RegistryException("Registry Implementation=" + className
- + " not found", cnfex);
- }
- catch (Exception e)
- {
- e.printStackTrace();
-
- throw new RegistryException("Invocation exception. "
- + e.getLocalizedMessage(), e);
- }
-
- return registry;
- }
+ Class registryClass = getClassForName(className);
+ // Try to instance the Registry
+ registry = (Registry) registryClass.newInstance();
+ }
+ catch (ClassNotFoundException cnfex)
+ {
+ throw new RegistryException("Registry Implementation=" + className
+ + " not found", cnfex);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+
+ throw new RegistryException("Invocation exception. "
+ + e.getLocalizedMessage(), e);
+ }
+
+ return registry;
+ }
}
Modified: labs/jbossesb/trunk/product/install/build.xml
===================================================================
--- labs/jbossesb/trunk/product/install/build.xml 2007-03-14 02:34:28 UTC (rev 10169)
+++ labs/jbossesb/trunk/product/install/build.xml 2007-03-14 03:10:16 UTC (rev 10170)
@@ -68,11 +68,12 @@
</target>
<target name="jboss.sar.all.deploy" depends="build.sar,jboss.config.check,jboss.config.deploy" description="Deploys JBossESB configuration and 2 JBossESB sars to JBossAS">
- <copy todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
- <fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb-dependencies.sar/**"/></copy>
- <copy todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
- <fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb.sar/**"/></copy>
- <touch file="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
+ <copy todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
+ <fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb-dependencies.sar/**"/></copy>
+ <copy todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
+ <fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb-registry.sar/**"/></copy>
+ <copy todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
+ <fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb.sar/**"/></copy>
</target>
<target name="jboss.sar.all.undeploy" depends="jboss.config.check,jboss.config.undeploy" description="Undeploys JBossESB configuration and 2 JBossESB sars">
@@ -80,6 +81,7 @@
<delete dir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy/jbossesb-dependencies.sar"/>
<echo>Deleting jbossesb.sar</echo>
<delete dir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy/jbossesb.sar"/>
+ <delete dir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy/jbossesb-registry.sar"/>
</target>
<target name="jboss.sar.jbossrules.deploy" description="Deploys JBoss Rules to the jbossesb-dependencies.sar">
@@ -138,7 +140,7 @@
<fileset dir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy/jbossesb-dependencies.sar"
includes="juddi-1.0-SNAPSHOT.jar,juddi-client-1.0-SNAPSHOT.jar"/>
</delete>
- <echo>Please update your jbossesb-properties.xml, if you want to use a different Registry.</echo>
+ <echo>Please update your jbossesb-properties.xml, if you want to use a different Registry.</echo>
</target>
<target name="jboss.sar.ftp.deploy" description="Deploys edtftpj to the jbossesb-dependencies.sar">
@@ -162,32 +164,34 @@
description="Deploys the JBossESB sars with just the scout/juddi Registry"/>
<target name="build.sar">
- <echo message="Building JBoss ESB sar file"/>
- <delete dir="${org.jboss.esb.dist.lib}/jbossesb.sar" />
- <mkdir dir="${org.jboss.esb.dist.lib}/jbossesb.sar" />
- <mkdir dir="${org.jboss.esb.dist.lib}/jbossesb.sar/META-INF" />
- <copy file="jboss-service.xml"
- todir="${org.jboss.esb.dist.lib}/jbossesb.sar/META-INF"/>
- <copy todir="${org.jboss.esb.dist.lib}/jbossesb.sar">
- <fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb*.jar"
- excludes="jbossesb-dependencies.jar" /></copy>
- <copy todir="${org.jboss.esb.dist.lib}/jbossesb.sar">
- <!-- properties-file reader -->
- <fileset dir="${org.jboss.esb.dist.lib}/ext" includes="jbossts-common.jar"/>
- <!-- jaxr and scout -->
- <fileset dir="${org.jboss.esb.dist.lib}/ext" includes="jaxr-api-1.0-SNAPSHOT.jar,
- scout-1.0-SNAPSHOT.jar"/>
- </copy>
-
- <echo message="Building JBoss ESB dependencies sar file"/>
+ <echo message="Building JBoss ESB sar files"/>
+ <delete dir="${org.jboss.esb.dist.lib}/jbossesb.sar" />
+ <mkdir dir="${org.jboss.esb.dist.lib}/jbossesb.sar" />
+ <mkdir dir="${org.jboss.esb.dist.lib}/jbossesb.sar/META-INF" />
+ <copy file="jboss-service.xml"
+ todir="${org.jboss.esb.dist.lib}/jbossesb.sar/META-INF"/>
+ <delete dir="${org.jboss.esb.dist.lib}/jbossesb-registry.sar" />
+ <mkdir dir="${org.jboss.esb.dist.lib}/jbossesb-registry.sar" />
+ <mkdir dir="${org.jboss.esb.dist.lib}/jbossesb-registry.sar/META-INF" />
+ <copy todir="${org.jboss.esb.dist.lib}/jbossesb-registry.sar">
+ <!-- jaxr and scout -->
+ <fileset dir="${org.jboss.esb.dist.lib}/ext" includes="jaxr-api-1.0-SNAPSHOT.jar,
+ scout-1.0-SNAPSHOT.jar"/>
+ <fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb-registry.jar"/>
+ </copy>
+ <copy file="jboss-service-registry.xml"
+ tofile="${org.jboss.esb.dist.lib}/jbossesb-registry.sar/META-INF/jboss-service.xml"/>
+
+ <echo message="Building JBoss ESB dependencies sar file"/>
<delete dir="${org.jboss.esb.dist.lib}/jbossesb-dependencies.sar" />
<mkdir dir="${org.jboss.esb.dist.lib}/jbossesb-dependencies.sar" />
<mkdir dir="${org.jboss.esb.dist.lib}/jbossesb-dependencies.sar/META-INF" />
- <copy file="jboss-service-dependencies.xml"
+ <copy file="jboss-service-dependencies.xml"
tofile="${org.jboss.esb.dist.lib}/jbossesb-dependencies.sar/META-INF/jboss-service.xml"/>
<copy todir="${org.jboss.esb.dist.lib}/jbossesb-dependencies.sar">
- <fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb-dependencies.jar"/></copy>
- <copy todir="${org.jboss.esb.dist.lib}/jbossesb-dependencies.sar">
+ <fileset dir="${org.jboss.esb.dist.lib}/ext" includes="jbossts-common.jar"/>
+ <fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb*.jar"
+ excludes="jbossesb-registry.jar" />
<!-- xbean for reading/marchalling xml for configuration, and scout -->
<fileset dir="${org.jboss.esb.dist.lib}/ext" includes="xbean.jar,stax-api-1.0.1.jar,xmlpublic.jar"/>
<!-- jUDDI Registry -->
@@ -200,7 +204,7 @@
<fileset dir="${org.jboss.esb.dist.lib}/ext" includes="${smooks.dependencies}"/>
<fileset dir="${org.jboss.esb.deployment.conf}" includes="smooks-cdr.lst" />
<!-- ftp -->
- <fileset dir="${org.jboss.esb.dist.lib}/ext" includes="edtftpj.jar"/>
+ <fileset dir="${org.jboss.esb.dist.lib}/ext" includes="edtftpj.jar"/>
</copy>
</target>
Modified: labs/jbossesb/trunk/product/install/jboss-service-dependencies.xml
===================================================================
--- labs/jbossesb/trunk/product/install/jboss-service-dependencies.xml 2007-03-14 02:34:28 UTC (rev 10169)
+++ labs/jbossesb/trunk/product/install/jboss-service-dependencies.xml 2007-03-14 03:10:16 UTC (rev 10170)
@@ -2,14 +2,7 @@
<server>
<mbean code="org.jboss.internal.soa.esb.dependencies.JBossESBDependenciesService"
- name="jboss.org:service=JBossESBDependencies"
+ name="jboss.esb:service=JBossESBDependencies"
description="Container for the JBossESB Dependencies">
</mbean>
- <!-- Registers the Juddi RMI Service to JNDI -->
- <mbean code="org.jboss.internal.soa.esb.dependencies.JuddiRMIService"
- name="jboss.org:service=JuddiRMI"
- description="Juddi RMI Service">
- <depends>jboss.org:service=JBossESBDependencies</depends>
- <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
- </mbean>
</server>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/install/jboss-service-registry.xml
===================================================================
--- labs/jbossesb/trunk/product/install/jboss-service-registry.xml (rev 0)
+++ labs/jbossesb/trunk/product/install/jboss-service-registry.xml 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+ <mbean code="org.jboss.internal.soa.esb.services.registry.JAXRRegistryService"
+ name="jboss.esb:service=ESBRegistry">
+ <depends>jboss.esb:service=JBossESBDependencies</depends>
+ </mbean>
+ <loader-repository>
+ org.jboss.soa.esb:loader=jbossesb.sar
+ </loader-repository>
+</server>
\ No newline at end of file
Modified: labs/jbossesb/trunk/product/install/jboss-service.xml
===================================================================
--- labs/jbossesb/trunk/product/install/jboss-service.xml 2007-03-14 02:34:28 UTC (rev 10169)
+++ labs/jbossesb/trunk/product/install/jboss-service.xml 2007-03-14 03:10:16 UTC (rev 10170)
@@ -2,15 +2,18 @@
<server>
<!-- Starts the listener controler -->
- <mbean code="org.jboss.soa.esb.listeners.config.ConfigurationControllerService"
- name="jboss.org:service=ConfigurationController"
- description="Configuration controller which generated the config files for the listener and gateway controllers">
- <attribute name="ConfigurationFile">jbossesb.xml</attribute>
- <depends>jboss.org:service=JBossESBDependencies</depends>
- <depends>jboss.org:service=JuddiRMI</depends>
+ <!-- Registers the Juddi RMI Service to JNDI -->
+ <mbean code="org.jboss.internal.soa.esb.dependencies.JuddiRMIService"
+ name="jboss.esb:service=JuddiRMI"
+ description="Juddi RMI Service">
+ <depends>jboss.esb:service=JBossESBDependencies</depends>
+ <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
+ </mbean>
+ <mbean code="org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer"
+ name="jboss.esb:service=ESBDeployer">
+ <depends>jboss.esb:service=JBossESBDependencies</depends>
+ <depends>jboss.esb:service=ESBRegistry</depends>
+ <depends>jboss.esb:service=JuddiRMI</depends>
<depends>jboss.jca:service=DataSourceBinding,name=JBossESBDS</depends>
</mbean>
- <loader-repository>
- org.jboss.soa.esb:loader=jbossesb.sar
- </loader-repository>
</server>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/lib/ext/jboss.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/trunk/product/lib/ext/jboss.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: labs/jbossesb/trunk/product/tools/configeditor/editor/dist/configapp.war
===================================================================
(Binary files differ)
Modified: labs/jbossesb/trunk/qa/junit/build.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/build.xml 2007-03-14 02:34:28 UTC (rev 10169)
+++ labs/jbossesb/trunk/qa/junit/build.xml 2007-03-14 03:10:16 UTC (rev 10170)
@@ -4,10 +4,16 @@
<property name="product.build" location="../../product/build"/>
<property name="product.lib" location="${product.build}/jbossesb/lib"/>
<property name="coverage" location="${product.build}/tests/coverage"/>
- <property name="qa.build" location="../build"/>
- <property name="qa.lib" location="../lib"/>
+ <property name="qa.build" location="../build"/>
+ <property name="qa.build.lib" location="../build/lib"/>
+ <property name="qa.build.reports" location="../build/reports"/>
+ <property name="qa.build.testlog" location="../build/log"/>
+ <property name="qa.lib" location="../lib"/>
+ <property name="qa.build.stylesheets" location="${qa.build}/stylesheets"/>
+ <property name="qa.source.stylesheets" location="../stylesheets"/>
<property name="qa.junit.src" location="src"/>
- <property name="qa.junit.classes" location="${qa.build}/junit/classes"/>
+ <property name="qa.junit.classes" location="${qa.build}/junit/classes"/>
+ <property name="qa.junit.resources" location="resources"/>
<property name="qa.junit.report" location="${qa.build}/junit/report" />
<property name="qa.junit.memory" value="128m"/>
@@ -46,7 +52,87 @@
<javac srcdir="${qa.junit.src}" destdir="${qa.junit.classes}" classpathref="qa.junit.cp" debug="on" />
</target>
- <target name="execute">
+ <target name="jars" depends="compile">
+ <mkdir dir="${qa.build.lib}"/>
+
+ <jar jarfile="${qa.build.lib}/simple.esb">
+ <fileset dir="${qa.junit.classes}">
+ <include name="org/jboss/soa/esb/server/*.class"/>
+ </fileset>
+ <fileset dir="${qa.junit.resources}/server/simple">
+ <include name="*.xml"/>
+ <include name="META-INF/*.xml"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="one-test" if="test"
+ description="Execute all tests in the given test directory.">
+ <mkdir dir="${qa.build.reports}"/>
+ <mkdir dir="${qa.build.testlog}"/>
+ <!-- Remove the test.log so each run has a fresh log -->
+ <delete file="${qa.build.testlog}/test.log"/>
+ <junit dir="."
+ printsummary="yes"
+ haltonerror="false"
+ haltonfailure="false"
+ fork="true">
+
+ <sysproperty key="jbosstest.deploy.dir" value="${qa.build.lib}"/>
+ <sysproperty key="build.testlog" value="${qa.build.testlog}"/>
+ <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
+ <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
+ <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
+
+ <classpath>
+ <pathelement location="${qa.junit.classes}"/>
+ <path refid="qa.junit.cp"/>
+ <pathelement location="${qa.junit.src}"/>
+ <!-- jndi.properties and other client prop files -->
+ <pathelement location="${qa.junit.resources}/server"/>
+ </classpath>
+
+ <formatter type="plain" usefile="true"/>
+ <formatter type="xml" usefile="true"/>
+
+ <batchtest todir="${qa.build.reports}"
+ haltonerror="false"
+ haltonfailure="false"
+ fork="true">
+
+ <fileset dir="${qa.junit.classes}">
+ <include name="org/jboss/soa/esb/${test}/unit/*TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="compile-stylesheets">
+ <mkdir dir="${qa.build.stylesheets}"/>
+ <copy todir="${qa.build.stylesheets}" filtering="yes">
+ <fileset dir="${qa.source.stylesheets}">
+ <include name="**/*"/>
+ </fileset>
+ </copy>
+ </target>
+
+
+ <target name="tests-report-html" depends="compile-stylesheets">
+ <mkdir dir="${qa.build.reports}/html"/>
+
+ <junitreport todir="${qa.build.reports}">
+ <fileset dir="${qa.build.reports}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames"
+ todir="${qa.build.reports}/html"
+ styledir="${qa.build.stylesheets}"
+ />
+ </junitreport>
+ </target>
+
+
+ <target name="execute">
<!-- Run the tests... -->
<property name="tests.filter" value="*"/>
<mkdir dir="${qa.junit.report}"/>
Added: labs/jbossesb/trunk/qa/junit/resources/server/simple/META-INF/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/resources/server/simple/META-INF/jboss-esb.xml (rev 0)
+++ labs/jbossesb/trunk/qa/junit/resources/server/simple/META-INF/jboss-esb.xml 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,50 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
+ parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-URL="localhost">
+
+ <jms-bus busid="gateway-channel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/esb_gateway_channel"
+ />
+ </jms-bus>
+ <jms-bus busid="esb-channel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/esb_channel"
+ />
+ </jms-bus>
+ </jms-provider>
+ </providers>
+
+ <services>
+
+ <service category="HelloWorld_ActionESB"
+ name="SimpleListener"
+ description="Hello World">
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="gateway-channel"
+ maxThreads="1"
+ is-gateway="true"
+ />
+ <jms-listener name="JMS-ESBListener"
+ busidref="esb-channel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions>
+ <action name="displayAction"
+ class="org.jboss.soa.esb.server.MyJMSListenerAction"
+ process="process">
+ </action>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Added: labs/jbossesb/trunk/qa/junit/resources/server/simple/esb-queues-service.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/resources/server/simple/esb-queues-service.xml (rev 0)
+++ labs/jbossesb/trunk/qa/junit/resources/server/simple/esb-queues-service.xml 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=esb_gateway_channel">
+ <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=esb_channel">
+ <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ </mbean>
+</server>
Added: labs/jbossesb/trunk/qa/junit/resources/server/simple/test-service.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/resources/server/simple/test-service.xml (rev 0)
+++ labs/jbossesb/trunk/qa/junit/resources/server/simple/test-service.xml 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+ <mbean name="jboss.esb:test=server" code="org.jboss.soa.esb.server.Stats"/>
+</server>
\ No newline at end of file
Added: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/MyJMSListenerAction.java (rev 0)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/MyJMSListenerAction.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,69 @@
+/*
+* 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.soa.esb.server;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyExt;
+
+import javax.management.MBeanServer;
+
+public class MyJMSListenerAction
+{
+ protected ConfigTree _config;
+
+ public MyJMSListenerAction(ConfigTree config)
+ {
+ _config = config;
+ }
+
+ public Message noOperation(Message message)
+ {
+ return message;
+ }
+
+ public Message process(Message message) throws Exception
+ {
+ logHeader();
+ System.out.println("Body: " + new String(message.getBody().getContents()));
+ logFooter();
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ StatsMBean stats = (StatsMBean)MBeanProxyExt.create(StatsMBean.class, StatsMBean.objectName, server);
+ stats.setExecutedVersion("scope1");
+ return message;
+ }
+
+ // This makes it easier to read on the console
+ private void logHeader()
+ {
+ System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+ }
+
+ private void logFooter()
+ {
+ System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+ }
+
+
+}
Added: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/Stats.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/Stats.java (rev 0)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/Stats.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,46 @@
+/*
+* 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.soa.esb.server;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class Stats implements StatsMBean
+{
+ private String executedVersion;
+
+
+ public String getExecutedVersion()
+ {
+ String msg = executedVersion;
+ executedVersion = null;
+ return msg;
+ }
+
+ public void setExecutedVersion(String executedVersion)
+ {
+ this.executedVersion = executedVersion;
+ }
+}
Added: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/StatsMBean.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/StatsMBean.java (rev 0)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/StatsMBean.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,39 @@
+/*
+* 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.soa.esb.server;
+
+import javax.management.ObjectName;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface StatsMBean
+{
+ public static final String objectName = "jboss.esb:test=server";
+
+ String getExecutedVersion();
+
+ void setExecutedVersion(String executedVersion);
+}
Added: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/unit/SimpleDeployUnitTestCase.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/unit/SimpleDeployUnitTestCase.java (rev 0)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/unit/SimpleDeployUnitTestCase.java 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.soa.esb.server.unit;
+
+import junit.framework.Test;
+import org.jboss.test.JBossTestCase;
+import org.jboss.soa.esb.server.StatsMBean;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.management.ObjectName;
+
+/**
+ * Sample client for the jboss container.
+ *
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Id: BlobUnitTestCase.java 58110 2006-11-04 08:34:21Z scott.stark at jboss.org $
+ */
+
+public class SimpleDeployUnitTestCase
+ extends JBossTestCase
+{
+ org.jboss.logging.Logger log = getLog();
+
+ static boolean deployed = false;
+ static int test = 0;
+
+ public SimpleDeployUnitTestCase(String name)
+ {
+
+ super(name);
+
+ }
+
+ public void sendAMessage(String msg) throws Exception
+ {
+
+ InitialContext iniCtx = getInitialContext();
+ Object tmp = iniCtx.lookup("ConnectionFactory");
+ ConnectionFactory qcf = (ConnectionFactory) tmp;
+ Connection conn = qcf.createConnection();
+ Destination que = (Queue) iniCtx.lookup("queue/esb_gateway_channel");
+ Session session = conn.createSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+ conn.start();
+ MessageProducer send = session.createProducer(que);
+ ObjectMessage tm = session.createObjectMessage(msg);
+ send.send(tm);
+ send.close();
+ conn.close();
+ }
+
+ public void testSimple() throws Exception
+ {
+ sendAMessage("Hello World");
+ Thread.sleep(2000); // wait for message to post.
+ String version = (String)getServer().getAttribute(new ObjectName(StatsMBean.objectName), "ExecutedVersion");
+ assertEquals(version, "scope1");
+
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(SimpleDeployUnitTestCase.class, "simple.esb");
+ }
+
+}
Added: labs/jbossesb/trunk/qa/lib/ext/jboss-test.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/trunk/qa/lib/ext/jboss-test.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/trunk/qa/stylesheets/details1.xsl
===================================================================
--- labs/jbossesb/trunk/qa/stylesheets/details1.xsl (rev 0)
+++ labs/jbossesb/trunk/qa/stylesheets/details1.xsl 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,166 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+<xsl:param name="thedate">undefined</xsl:param>
+
+<xsl:output method='html' indent='yes' doctype-public='-//W3C//DTD HTML 3.2 FINAL//EN'/>
+
+<xsl:template match='/'>
+
+<xsl:variable name="numberOfTests" select="sum(//@tests)"/>
+<xsl:variable name="numberOfErrors" select="sum(//@errors)"/>
+<xsl:variable name="numberOfFailures" select="sum(//@failures)"/>
+<xsl:variable name="numberOfSuccesses" select="$numberOfTests - $numberOfErrors - $numberOfFailures"/>
+
+<html>
+<head>
+
+<META NAME="ROBOTS" CONTENT="ALL"/>
+<meta name="rating" content="Safe For Kids"/>
+
+<title>JBossTest - Detailed Results</title>
+</head>
+
+<body bgcolor='white'>
+
+
+<h3>JBossTest daily test results</h3>
+
+<b>SUMMARY</b><p/>
+
+Number of tests run: <xsl:value-of select="$numberOfTests"/>
+
+<hr/>
+
+<table bgcolor="yellow">
+<tr>
+<td>
+Successful tests:
+</td><td bgcolor="cyan">
+<xsl:value-of select="$numberOfSuccesses"/>
+</td></tr><tr><td>
+Errors:
+</td><td bgcolor="cyan">
+<xsl:value-of select="$numberOfErrors"/>
+</td></tr><tr><td>
+Failures:
+</td><td bgcolor="cyan">
+<xsl:value-of select="$numberOfFailures"/>
+</td></tr>
+</table>
+
+<hr/>
+
+<pre>
+[time of test: <xsl:value-of select="$thedate"/> GMT]
+[java.version: <xsl:value-of select="$java_version"/>]
+[java.vendor: <xsl:value-of select="$java_vendor"/>]
+[java.vm.version: <xsl:value-of select="$java_vm_version"/>]
+[java.vm.name: <xsl:value-of select="$java_vm_name"/>]
+[java.vm.info: <xsl:value-of select="$java_vm_info"/>]
+[os.name: <xsl:value-of select="$os_name"/>]
+[os.arch: <xsl:value-of select="$os_arch"/>]
+[os.version: <xsl:value-of select="$os_version"/>]
+</pre>
+
+
+<hr/>
+
+<pre>
+
+<xsl:if test='$numberOfFailures!=0 or $numberOfErrors!=0'>
+
+TESTSUITE SUMMARY
+
+
+<table >
+<tr bgcolor="gray">
+<th>Testsuites</th>
+<th>Tests</th>
+<th>Successes</th>
+<th>Failures</th>
+<th>Errors</th>
+</tr>
+<xsl:for-each select="//testsuite">
+<tr><td align="left">
+<a><xsl:attribute name='href'>#<xsl:value-of select='@name'/></xsl:attribute><xsl:value-of select="@name"/></a>
+</td>
+<td align="center">
+ <xsl:if test='@errors!=0 or @failures!=0'><xsl:attribute name='bgcolor'>red</xsl:attribute></xsl:if>
+ <xsl:value-of select='@tests'/></td>
+<td align="center">
+ <xsl:if test='@errors!=0 or @failures!=0'><xsl:attribute name='bgcolor'>red</xsl:attribute></xsl:if>
+ <xsl:value-of select='@tests - @errors - @failures'/></td>
+<td align="center">
+ <xsl:if test='@failures!=0'><xsl:attribute name='bgcolor'>red</xsl:attribute></xsl:if>
+ <xsl:value-of select='@failures'/></td>
+<td align="center">
+ <xsl:if test='@errors!=0'><xsl:attribute name='bgcolor'>red</xsl:attribute></xsl:if>
+ <xsl:value-of select='@errors'/></td>
+
+</tr>
+</xsl:for-each>
+</table>
+
+<hr/>
+
+DETAILS OF ERRORS
+
+<p/>
+
+<xsl:for-each select="//testsuite">
+
+<a><xsl:attribute name='name'><xsl:value-of select='@name'/></xsl:attribute><b><xsl:value-of select='@name'/></b></a>
+
+<p/>
+
+<table border="1">
+<tr bgcolor="gray">
+<th>Test</th>
+<th>Time</th>
+<th>Problem Type</th>
+<th>Exception</th>
+<th>Message</th>
+<th>Stack Trace</th>
+</tr>
+
+<xsl:for-each select="testcase">
+
+<tr>
+<td><xsl:value-of select="@name"/>
+</td><td><xsl:value-of select="@time"/>
+</td>
+
+<xsl:for-each select="error | failure">
+
+<td><xsl:value-of select="name()"/>
+</td><td><xsl:value-of select="@type"/>
+</td><td><xsl:value-of select="@message"/>
+</td><td><pre><xsl:value-of select="."/></pre>
+</td>
+
+</xsl:for-each>
+
+</tr>
+
+</xsl:for-each>
+
+</table>
+
+<p/>
+<hr/>
+<p/>
+
+</xsl:for-each>
+
+
+</xsl:if>
+
+</pre>
+
+</body>
+</html>
+
+</xsl:template>
+</xsl:stylesheet>
Added: labs/jbossesb/trunk/qa/stylesheets/junit-frames.xsl
===================================================================
--- labs/jbossesb/trunk/qa/stylesheets/junit-frames.xsl (rev 0)
+++ labs/jbossesb/trunk/qa/stylesheets/junit-frames.xsl 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,779 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xsltc="http://xml.apache.org/xalan/xsltc"
+ xmlns:redirect="http://xml.apache.org/xalan/redirect"
+ xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"
+ extension-element-prefixes="redirect"
+ version="1.0">
+
+<xsl:variable name='java.version' select="//property[@name='java.version']/@value"/>
+<xsl:variable name='java.vendor' select="//property[@name='java.vendor']/@value"/>
+<xsl:variable name='java.vm.name' select="//property[@name='java.vm.name']/@value"/>
+<xsl:variable name='java.vm.version' select="//property[@name='java.vm.version']/@value"/>
+<xsl:variable name='java.vm.info' select="//property[@name='java.vm.info']/@value"/>
+<xsl:variable name='os.name' select="//property[@name='os.name']/@value"/>
+<xsl:variable name='os.version' select="//property[@name='os.version']/@value"/>
+<xsl:variable name='os.arch' select="//property[@name='os.arch']/@value"/>
+<xsl:variable name='TODAY' select="//property[@name='TODAY']/@value"/>
+
+
+<!-- ======================================================================
+
+ Stylesheet to transform an XML file generated by the Ant JUnit task into
+ a set of JavaDoc-like HTML page to make pages more convenient to be browsed.
+
+ It use the Xalan redirect extension to write to multiple output files.
+
+ Note: HTML output can be made much more clean by removing non css attributes
+
+ ====================================================================== -->
+<xsl:output method="html" encoding="UTF-8" indent="yes"/>
+<xsl:decimal-format decimal-separator="." grouping-separator=","/>
+
+<!--
+ Xalan redirect extension writes relative file based on the parent directory
+ from the main output file, unfortunately, this is never set and you have
+ to do it yourself on the API. The code that does it in command line was
+ commented out in Xalan 1.2.2 :-(
+
+ Therefore I will use a stylesheet param for the output directory.
+
+ This has to be invoked as follows from the command line:
+
+ java -classpath bsf.jar;xalan.jar;xerces.jar org.apache.xalan.xslt.Process -IN testsuites.xml -XSL junit-frames.xsl -PARAM output.dir './report'
+-->
+<xsl:param name="output.dir" select="'.'"/>
+
+
+<xsl:template match="testsuites">
+ <!-- create the index.html -->
+ <redirect:write file="{$output.dir}/index.html">
+ <xsl:call-template name="index.html"/>
+ </redirect:write>
+
+ <!-- create the stylesheet.css -->
+ <redirect:write file="{$output.dir}/stylesheet.css">
+ <xsl:call-template name="stylesheet.css"/>
+ </redirect:write>
+
+ <!-- create the overview-packages.html at the root -->
+ <redirect:write file="{$output.dir}/overview-summary.html">
+ <xsl:apply-templates select="." mode="overview.packages"/>
+ </redirect:write>
+
+ <!-- create the all-packages.html at the root -->
+ <redirect:write file="{$output.dir}/overview-frame.html">
+ <xsl:apply-templates select="." mode="all.packages"/>
+ </redirect:write>
+
+ <!-- create the all-classes.html at the root -->
+ <redirect:write file="{$output.dir}/allclasses-frame.html">
+ <xsl:apply-templates select="." mode="all.classes"/>
+ </redirect:write>
+
+ <!-- process all packages -->
+ <xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
+ <xsl:call-template name="package">
+ <xsl:with-param name="name" select="@package"/>
+ </xsl:call-template>
+ </xsl:for-each>
+</xsl:template>
+
+
+<xsl:template name="package">
+ <xsl:param name="name"/>
+ <xsl:variable name="package.dir">
+ <xsl:if test="not($name = '')"><xsl:value-of select="translate($name,'.','/')"/></xsl:if>
+ <xsl:if test="$name = ''">.</xsl:if>
+ </xsl:variable>
+ <!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
+ <!-- create a classes-list.html in the package directory -->
+ <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
+ <xsl:call-template name="classes.list">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </redirect:write>
+
+ <!-- create a package-summary.html in the package directory -->
+ <redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
+ <xsl:call-template name="package.summary">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </redirect:write>
+
+ <!-- for each class, creates a @name.html -->
+ <!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
+ <xsl:for-each select="/testsuites/testsuite[@package = $name]">
+ <redirect:write file="{$output.dir}/{$package.dir}/{@name}.html">
+ <xsl:apply-templates select="." mode="class.details"/>
+ </redirect:write>
+ <xsl:if test="string-length(./system-out)!=0">
+ <redirect:write file="{$output.dir}/{$package.dir}/{@name}-out.txt">
+ <xsl:value-of select="./system-out" />
+ </redirect:write>
+ </xsl:if>
+ <xsl:if test="string-length(./system-err)!=0">
+ <redirect:write file="{$output.dir}/{$package.dir}/{@name}-err.txt">
+ <xsl:value-of select="./system-err" />
+ </redirect:write>
+ </xsl:if>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template name="index.html">
+<html>
+ <head>
+ <title>Unit Test Results.</title>
+ </head>
+ <frameset cols="20%,80%">
+ <frameset rows="30%,70%">
+ <frame src="overview-frame.html" name="packageListFrame"/>
+ <frame src="allclasses-frame.html" name="classListFrame"/>
+ </frameset>
+ <frame src="overview-summary.html" name="classFrame"/>
+ <noframes>
+ <h2>Frame Alert</h2>
+ <p>
+ This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
+ </p>
+ </noframes>
+ </frameset>
+</html>
+</xsl:template>
+
+<!-- this is the stylesheet css to use for nearly everything -->
+<xsl:template name="stylesheet.css">
+body {
+ font:normal 68% verdana,arial,helvetica;
+ color:#000000;
+}
+td {
+ font-size: 68%
+}
+table.details tr th{
+ font-weight: bold;
+ text-align:left;
+ background:#a6caf0;
+}
+table.details tr td{
+ background:#eeeee0;
+}
+
+p {
+ line-height:1.5em;
+ margin-top:0.5em; margin-bottom:1.0em;
+}
+h1 {
+ margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
+}
+h2 {
+ margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
+}
+h3 {
+ margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
+}
+h4 {
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+}
+h5 {
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+}
+h6 {
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+}
+.Error {
+ font-weight:bold;
+ color:#FFFFFF;
+}
+.Failure {
+ font-weight:bold;
+ color:#FFFFFF;
+}
+.ErrorDetail {
+ font-weight:bold;
+ color:#FF0000;
+}
+.FailureDetail {
+ font-weight:bold;
+ color:#800080;
+}
+.Info {
+ font-size: x-small
+}
+
+</xsl:template>
+
+
+<!-- ======================================================================
+ This page is created for every testsuite class.
+ It prints a summary of the testsuite and detailed information about
+ testcase methods.
+ ====================================================================== -->
+<xsl:template match="testsuite" mode="class.details">
+ <xsl:variable name="package.name" select="@package"/>
+ <xsl:variable name="class.name"><xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></xsl:variable>
+ <html>
+ <head>
+ <title>Unit Test Results: <xsl:value-of select="$class.name"/></title>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name" select="$package.name"/>
+ </xsl:call-template>
+ <script type="text/javascript" language="JavaScript">
+ var TestCases = new Array();
+ var cur;
+ <xsl:apply-templates select="properties"/>
+ </script>
+ <script type="text/javascript" language="JavaScript"><![CDATA[
+ function displayProperties (name) {
+ var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1');
+ var doc = win.document.open();
+ doc.write("<html><head><title>Properties of " + name + "</title>");
+ doc.write("<style type=\"text/css\">");
+ doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000; }");
+ doc.write("table tr td, table tr th { font-size: 68%; }");
+ doc.write("table.properties { border-collapse:collapse; border-left:solid 1 #cccccc; border-top:solid 1 #cccccc; padding:5px; }");
+ doc.write("table.properties th { text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#eeeeee; }");
+ doc.write("table.properties td { font:normal; text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#fffffff; }");
+ doc.write("h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica }");
+ doc.write("</style>");
+ doc.write("</head><body>");
+ doc.write("<h3>Properties of " + name + "</h3>");
+ doc.write("<div align=\"right\"><a href=\"javascript:window.close();\">Close</a></div>");
+ doc.write("<table class='properties'>");
+ doc.write("<tr><th>Name</th><th>Value</th></tr>");
+ for (prop in TestCases[name]) {
+ doc.write("<tr><th>" + prop + "</th><td>" + TestCases[name][prop] + "</td></tr>");
+ }
+ doc.write("</table>");
+ doc.write("</body></html>");
+ doc.close();
+ win.focus();
+ }
+ ]]>
+ </script>
+ </head>
+ <body>
+ <xsl:call-template name="pageHeader"/>
+ <h3>Class <xsl:value-of select="$class.name"/></h3>
+
+
+ <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+ <xsl:call-template name="testsuite.test.header"/>
+ <xsl:apply-templates select="." mode="print.test"/>
+ </table>
+
+ <h2>Tests</h2>
+ <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+ <xsl:call-template name="testcase.test.header"/>
+ <!--
+ test can even not be started at all (failure to load the class)
+ so report the error directly
+ -->
+ <xsl:if test="./error">
+ <tr class="Error">
+ <td colspan="4"><xsl:apply-templates select="./error"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:apply-templates select="./testcase" mode="print.test"/>
+ </table>
+ <div class="Properties">
+ <a>
+ <xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute>
+ Properties »
+ </a>
+ </div>
+ <xsl:if test="string-length(./system-out)!=0">
+ <div class="Properties">
+ <a>
+ <xsl:attribute name="href">./<xsl:value-of select="@name"/>-out.txt</xsl:attribute>
+ System.out »
+ </a>
+ </div>
+ </xsl:if>
+ <xsl:if test="string-length(./system-err)!=0">
+ <div class="Properties">
+ <a>
+ <xsl:attribute name="href">./<xsl:value-of select="@name"/>-err.txt</xsl:attribute>
+ System.err »
+ </a>
+ </div>
+ </xsl:if>
+ </body>
+ </html>
+</xsl:template>
+
+ <!--
+ Write properties into a JavaScript data structure.
+ This is based on the original idea by Erik Hatcher (ehatcher at apache.org)
+ -->
+ <xsl:template match="properties">
+ cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array();
+ <xsl:for-each select="property">
+ <xsl:sort select="@name"/>
+ cur['<xsl:value-of select="@name"/>'] = '<xsl:call-template name="JS-escape"><xsl:with-param name="string" select="@value"/></xsl:call-template>';
+ </xsl:for-each>
+ </xsl:template>
+
+
+<!-- ======================================================================
+ This page is created for every package.
+ It prints the name of all classes that belongs to this package.
+ @param name the package name to print classes.
+ ====================================================================== -->
+<!-- list of classes in a package -->
+<xsl:template name="classes.list">
+ <xsl:param name="name"/>
+ <html>
+ <head>
+ <title>Unit Test Classes: <xsl:value-of select="$name"/></title>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name" select="$name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <table width="100%">
+ <tr>
+ <td nowrap="nowrap">
+ <h2><a href="package-summary.html" target="classFrame">
+ <xsl:value-of select="$name"/>
+ <xsl:if test="$name = ''"><none></xsl:if>
+ </a></h2>
+ </td>
+ </tr>
+ </table>
+
+ <h2>Classes</h2>
+ <table width="100%">
+ <xsl:for-each select="/testsuites/testsuite[./@package = $name]">
+ <xsl:sort select="@name"/>
+ <tr>
+ <td nowrap="nowrap">
+ <a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
+</xsl:template>
+
+
+<!--
+ Creates an all-classes.html file that contains a link to all package-summary.html
+ on each class.
+-->
+<xsl:template match="testsuites" mode="all.classes">
+ <html>
+ <head>
+ <title>All Unit Test Classes</title>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <h2>Classes</h2>
+ <table width="100%">
+ <xsl:apply-templates select="testsuite" mode="all.classes">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </table>
+ </body>
+ </html>
+</xsl:template>
+
+<xsl:template match="testsuite" mode="all.classes">
+ <xsl:variable name="package.name" select="@package"/>
+ <tr>
+ <td nowrap="nowrap">
+ <a target="classFrame">
+ <xsl:attribute name="href">
+ <xsl:if test="not($package.name='')">
+ <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
+ </xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </a>
+ </td>
+ </tr>
+</xsl:template>
+
+
+<!--
+ Creates an html file that contains a link to all package-summary.html files on
+ each package existing on testsuites.
+ @bug there will be a problem here, I don't know yet how to handle unnamed package :(
+-->
+<xsl:template match="testsuites" mode="all.packages">
+ <html>
+ <head>
+ <title>All Unit Test Packages</title>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
+ <h2>Packages</h2>
+ <p>
+ <table width="100%">
+ <xsl:apply-templates select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]" mode="all.packages">
+ <xsl:sort select="@package"/>
+ </xsl:apply-templates>
+ </table>
+ </p>
+ </body>
+ </html>
+</xsl:template>
+
+<xsl:template match="testsuite" mode="all.packages">
+ <tr>
+ <td nowrap="nowrap">
+ <a href="./{translate(@package,'.','/')}/package-summary.html" target="classFrame">
+ <xsl:value-of select="@package"/>
+ <xsl:if test="@package = ''"><none></xsl:if>
+ </a>
+ </td>
+ </tr>
+</xsl:template>
+
+
+<xsl:template match="testsuites" mode="overview.packages">
+ <html>
+ <head>
+ <title>Unit Test Results: Summary</title>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <xsl:attribute name="onload">open('allclasses-frame.html','classListFrame')</xsl:attribute>
+ <xsl:call-template name="pageHeader"/>
+ <h2>Summary</h2>
+ <xsl:variable name="testCount" select="sum(testsuite/@tests)"/>
+ <xsl:variable name="errorCount" select="sum(testsuite/@errors)"/>
+ <xsl:variable name="failureCount" select="sum(testsuite/@failures)"/>
+ <xsl:variable name="timeCount" select="sum(testsuite/@time)"/>
+ <xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/>
+ <table border="0" cellpadding="5" cellspacing="2" width="95%">
+ <tr bgcolor="#A6CAF0" valign="top">
+ <td><strong>Tests</strong></td>
+ <td><strong>Failures</strong></td>
+ <td><strong>Errors</strong></td>
+ <td><strong>Success rate</strong></td>
+ <td><strong>Time</strong></td>
+ </tr>
+ <tr bgcolor="#FFEBCD" valign="top">
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="$errorCount > 0">ErrorDetail</xsl:when>
+ <xsl:when test="$failureCount > 0">FailureDetail</xsl:when>
+ <xsl:otherwise>Pass</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <td><xsl:value-of select="$testCount"/></td>
+ <td><xsl:value-of select="$failureCount"/></td>
+ <td><xsl:value-of select="$errorCount"/></td>
+ <td>
+ <xsl:call-template name="display-percent">
+ <xsl:with-param name="value" select="$successRate"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:call-template name="display-time">
+ <xsl:with-param name="value" select="$timeCount"/>
+ </xsl:call-template>
+ </td>
+
+ </tr>
+ </table>
+ <table border="0" width="95%">
+ <tr>
+ <td style="text-align: justify;">
+ Note: <em>failures</em> are anticipated and checked for with assertions while <em>errors</em> are unanticipated.
+ </td>
+ </tr>
+ </table>
+
+ <h2>Packages</h2>
+ <table border="0" cellpadding="5" cellspacing="2" width="95%">
+ <xsl:call-template name="testsuite.test.header"/>
+ <xsl:for-each select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
+ <xsl:sort select="@package" order="ascending"/>
+ <!-- get the node set containing all testsuites that have the same package -->
+ <xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = current()/@package]"/>
+ <tr bgcolor="#FFEBCD" valign="top">
+ <xsl:if test='sum($insamepackage/@errors)!=0 or sum($insamepackage/@failures)!=0'><xsl:attribute name='bgcolor'>#FF0000</xsl:attribute>
+ </xsl:if>
+
+ <!-- display a failure if there is any failure/error in the package -->
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="sum($insamepackage/@errors) > 0">Error</xsl:when>
+ <xsl:when test="sum($insamepackage/@failures) > 0">Failure</xsl:when>
+ <xsl:otherwise>Pass</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <td><a href="{translate(@package,'.','/')}/package-summary.html">
+ <font color='#000000'>
+ <xsl:if test='sum($insamepackage/@errors)!=0 or
+ sum($insamepackage/@failures)!=0'>
+ <xsl:attribute name='color'>#FFFFFF</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="@package"/></font></a></td>
+ <td><xsl:value-of select="sum($insamepackage/@tests)"/></td>
+ <td><xsl:value-of select="sum($insamepackage/@errors)"/></td>
+ <td><xsl:value-of select="sum($insamepackage/@failures)"/></td>
+ <td>
+ <xsl:call-template name="display-time">
+ <xsl:with-param name="value" select="sum($insamepackage/@time)"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <xsl:call-template name="pageFooter"/>
+ </body>
+ </html>
+</xsl:template>
+
+
+<xsl:template name="package.summary">
+ <xsl:param name="name"/>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name" select="$name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
+ <xsl:call-template name="pageHeader"/>
+ <h3>Package <xsl:value-of select="$name"/></h3>
+
+ <!--table border="0" cellpadding="5" cellspacing="2" width="95%">
+ <xsl:call-template name="class.metrics.header"/>
+ <xsl:apply-templates select="." mode="print.metrics"/>
+ </table-->
+
+ <xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = $name]"/>
+ <xsl:if test="count($insamepackage) > 0">
+ <h2>Classes</h2>
+ <p>
+ <table border="0" cellpadding="5" cellspacing="2" width="95%">
+ <xsl:call-template name="testsuite.test.header"/>
+ <xsl:apply-templates select="$insamepackage" mode="print.test">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </table>
+ </p>
+ </xsl:if>
+ <xsl:call-template name="pageFooter"/>
+ </body>
+ </html>
+</xsl:template>
+
+
+<!--
+ transform string like a.b.c to ../../../
+ @param path the path to transform into a descending directory path
+-->
+<xsl:template name="path">
+ <xsl:param name="path"/>
+ <xsl:if test="contains($path,'.')">
+ <xsl:text>../</xsl:text>
+ <xsl:call-template name="path">
+ <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="not(contains($path,'.')) and not($path = '')">
+ <xsl:text>../</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+
+<!-- create the link to the stylesheet based on the package name -->
+<xsl:template name="create.stylesheet.link">
+ <xsl:param name="package.name"/>
+ <link rel="stylesheet" type="text/css" title="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></link>
+</xsl:template>
+
+
+<!-- Page HEADER -->
+<xsl:template name="pageHeader">
+ <h1>Unit Test Results</h1>
+ <table width="100%">
+ <tr>
+ <td align="left"></td>
+ <td align="right">Designed for use with <a href='http://www.junit.org'>JUnit</a> and <a href='http://jakarta.apache.org'>Ant</a>.
+ Generated on <xsl:value-of select="$TODAY"/>.
+ </td>
+ </tr>
+ </table>
+ <hr size="1"/>
+</xsl:template>
+
+<!-- Page FOOTER -->
+<xsl:template name="pageFooter">
+ <p/>
+ <hr size="1"/>
+ <p/>
+ <table class="Info">
+ <tr>
+ <td>Java Version</td><td><xsl:value-of select="$java.version"/></td>
+ </tr><tr>
+ <td>Java Vendor</td><td><xsl:value-of select="$java.vendor"/></td>
+ </tr><tr>
+ <td>Java VM Name</td><td><xsl:value-of select="$java.vm.name"/></td>
+ </tr><tr>
+ <td>Java VM Version</td><td><xsl:value-of select="$java.vm.version"/></td>
+ </tr><tr>
+ <td>Java VM Info</td><td><xsl:value-of select="$java.vm.info"/></td>
+ </tr><tr>
+ <td>OS Name</td><td><xsl:value-of select="$os.name"/></td>
+ </tr><tr>
+ <td>OS Version</td><td><xsl:value-of select="$os.version"/></td>
+ </tr><tr>
+ <td>OS Arch</td><td><xsl:value-of select="$os.arch"/></td>
+ </tr>
+ </table>
+</xsl:template>
+
+<!-- class header -->
+<xsl:template name="testsuite.test.header">
+ <tr bgcolor="#A6CAF0" valign="top">
+ <td width="80%"><strong>Name</strong></td>
+ <td><strong>Tests</strong></td>
+ <td><strong>Errors</strong></td>
+ <td><strong>Failures</strong></td>
+ <td nowrap="nowrap"><strong>Time(s)</strong></td>
+ </tr>
+</xsl:template>
+
+<!-- method header -->
+<xsl:template name="testcase.test.header">
+ <tr bgcolor="#A6CAF0" valign="top">
+ <td><strong>Name</strong></td>
+ <td><strong>Status</strong></td>
+ <td width="80%"><strong>Type</strong></td>
+ <td nowrap="nowrap"><strong>Time(s)</strong></td>
+ </tr>
+</xsl:template>
+
+
+<!-- class information -->
+<xsl:template match="testsuite" mode="print.test">
+ <tr bgcolor="#FFEBCD" valign="top">
+ <xsl:if test='@errors!=0 or @failures!=0'><xsl:attribute name='bgcolor'>#FF0000</xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="@errors[.> 0]">Error</xsl:when>
+ <xsl:when test="@failures[.> 0]">Failure</xsl:when>
+ <xsl:otherwise>Pass</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <td><a href="{@name}.html"><xsl:value-of select="@name"/></a></td>
+ <td><xsl:apply-templates select="@tests"/></td>
+ <td><xsl:apply-templates select="@errors"/></td>
+ <td><xsl:apply-templates select="@failures"/></td>
+ <td><xsl:call-template name="display-time">
+ <xsl:with-param name="value" select="@time"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+</xsl:template>
+
+<xsl:template match="testcase" mode="print.test">
+ <tr bgcolor="#FFEBCD" valign="top">
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="error">ErrorDetail</xsl:when>
+ <xsl:when test="failure">FailureDetail</xsl:when>
+ <xsl:otherwise>TableRowColor</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <td><xsl:value-of select="@name"/></td>
+ <xsl:choose>
+ <xsl:when test="failure">
+ <td>Failure</td>
+ <td><xsl:apply-templates select="failure"/></td>
+ </xsl:when>
+ <xsl:when test="error">
+ <td>Error</td>
+ <td><xsl:apply-templates select="error"/></td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td>Success</td>
+ <td></td>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td>
+ <xsl:call-template name="display-time">
+ <xsl:with-param name="value" select="@time"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+</xsl:template>
+
+
+<!-- Note : the below template error and failure are the same style
+ so just call the same style store in the toolkit template -->
+<xsl:template match="failure">
+ <xsl:call-template name="display-failures"/>
+</xsl:template>
+
+<xsl:template match="error">
+ <xsl:call-template name="display-failures"/>
+</xsl:template>
+
+<!-- Style for the error and failure in the testcase template -->
+<xsl:template name="display-failures">
+ <xsl:choose>
+ <xsl:when test="not(@message)">N/A</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@message"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!-- display the stacktrace. Disabled since it can cause stack overflow
+ and is slow
+ <code>
+ <p/>
+ <xsl:call-template name="br-replace">
+ <xsl:with-param name="word" select="."/>
+ </xsl:call-template>
+ </code>
+ -->
+ <pre><xsl:value-of select="."/>
+ </pre>
+</xsl:template>
+
+<xsl:template name="JS-escape">
+ <xsl:param name="string"/>
+ <xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
+ <xsl:param name="tmp2" select="stringutils:replace(string($tmp1),"'","\'")"/>
+ <xsl:value-of select="$tmp2"/>
+</xsl:template>
+
+
+<!--
+ template that will convert a carriage return into a br tag
+ @param word the text from which to convert CR to BR tag
+-->
+<xsl:template name="br-replace">
+ <xsl:param name="word"/>
+ <xsl:param name="br"><br/></xsl:param>
+ <xsl:value-of select='stringutils:replace(string($word),"
",$br)'/>
+</xsl:template>
+
+<xsl:template name="display-time">
+ <xsl:param name="value"/>
+ <xsl:value-of select="format-number($value,'0.000')"/>
+</xsl:template>
+
+<xsl:template name="display-percent">
+ <xsl:param name="value"/>
+ <xsl:value-of select="format-number($value,'0.00%')"/>
+</xsl:template>
+</xsl:stylesheet>
Added: labs/jbossesb/trunk/qa/stylesheets/shortXmlSummary.xsl
===================================================================
--- labs/jbossesb/trunk/qa/stylesheets/shortXmlSummary.xsl (rev 0)
+++ labs/jbossesb/trunk/qa/stylesheets/shortXmlSummary.xsl 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,69 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+<xsl:param name="thedate"/>
+<xsl:param name="java_version"/>
+<xsl:param name="java_vendor"/>
+<xsl:param name="java_vm_specification_version"/>
+<xsl:param name="java_vm_version"/>
+<xsl:param name="java_vm_name"/>
+<xsl:param name="java_vm_info"/>
+<xsl:param name="java_specification_version"/>
+<xsl:param name="java_class_version"/>
+<xsl:param name="os_name"/>
+<xsl:param name="os_arch"/>
+<xsl:param name="os_version"/>
+
+<xsl:output method='xml'/>
+
+<xsl:template match='/'>
+
+<xsl:variable name="numberOfTests" select="sum(//@tests)"/>
+<xsl:variable name="numberOfErrors" select="sum(//@errors)"/>
+<xsl:variable name="numberOfFailures" select="sum(//@failures)"/>
+<xsl:variable name="numberOfSuccesses" select="$numberOfTests - $numberOfErrors - $numberOfFailures"/>
+
+<testsuitesummary>
+
+<testsuite>
+
+ <time-of-test> <xsl:value-of select="$thedate"/> </time-of-test>
+
+ <jdk-vendor> <xsl:value-of select="$java_vendor"/> </jdk-vendor>
+
+ <jdk-version> <xsl:value-of select="$java_version"/> </jdk-version>
+
+ <jvm-vm-spec-version> <xsl:value-of select="$java_vm_specification_version"/> </jvm-vm-spec-version>
+
+ <jvm-name> <xsl:value-of select="$java_vm_name"/> </jvm-name>
+
+ <jvm-version> <xsl:value-of select="$java_vm_version"/> </jvm-version>
+
+ <jvm-info> <xsl:value-of select="$java_vm_info"/> </jvm-info>
+
+ <java-spec-version> <xsl:value-of select="$java_specification_version"/> </java-spec-version>
+
+ <java-class-version> <xsl:value-of select="$java_class_version"/> </java-class-version>
+
+ <os-name> <xsl:value-of select="$os_name"/> </os-name>
+
+ <os-arch> <xsl:value-of select="$os_arch"/> </os-arch>
+
+ <os-version> <xsl:value-of select="$os_version"/> </os-version>
+
+ <tests> <xsl:value-of select="$numberOfTests"/> </tests>
+
+ <successes> <xsl:value-of select="$numberOfSuccesses"/> </successes>
+
+ <errors> <xsl:value-of select="$numberOfErrors"/> </errors>
+
+ <failures> <xsl:value-of select="$numberOfFailures"/> </failures>
+
+</testsuite>
+
+</testsuitesummary>
+
+</xsl:template>
+
+</xsl:stylesheet>
Added: labs/jbossesb/trunk/qa/stylesheets/summary1.xsl
===================================================================
--- labs/jbossesb/trunk/qa/stylesheets/summary1.xsl (rev 0)
+++ labs/jbossesb/trunk/qa/stylesheets/summary1.xsl 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,85 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+<xsl:param name="thedate"/>
+<xsl:param name="java_version"/>
+<xsl:param name="java_vendor"/>
+<xsl:param name="java_vm_version"/>
+<xsl:param name="java_vm_name"/>
+<xsl:param name="java_vm_info"/>
+<xsl:param name="os_name"/>
+<xsl:param name="os_arch"/>
+<xsl:param name="os_version"/>
+
+
+<xsl:output method='text'/>
+
+<xsl:template match='/'>
+
+<xsl:variable name="numberOfTests" select="sum(//@tests)"/>
+<xsl:variable name="numberOfErrors" select="sum(//@errors)"/>
+<xsl:variable name="numberOfFailures" select="sum(//@failures)"/>
+<xsl:variable name="numberOfSuccesses" select="$numberOfTests - $numberOfErrors - $numberOfFailures"/>
+
+JBoss daily test results
+
+SUMMARY
+
+Number of tests run: <xsl:value-of select="$numberOfTests"/>
+
+--------------------------------------------
+
+Successful tests: <xsl:value-of select="$numberOfSuccesses"/>
+
+Errors: <xsl:value-of select="$numberOfErrors"/>
+
+Failures: <xsl:value-of select="$numberOfFailures"/>
+
+--------------------------------------------
+
+
+
+[time of test: <xsl:value-of select="$thedate"/> GMT]
+[java.version: <xsl:value-of select="$java_version"/>]
+[java.vendor: <xsl:value-of select="$java_vendor"/>]
+[java.vm.version: <xsl:value-of select="$java_vm_version"/>]
+[java.vm.name: <xsl:value-of select="$java_vm_name"/>]
+[java.vm.info: <xsl:value-of select="$java_vm_info"/>]
+[os.name: <xsl:value-of select="$os_name"/>]
+[os.arch: <xsl:value-of select="$os_arch"/>]
+[os.version: <xsl:value-of select="$os_version"/>]
+
+See http://lubega.com for full details
+
+NOTE: If there are any errors shown above - this mail is only highlighting
+them - it is NOT indicating that they are being looked at by anyone.
+
+It is assumed that whoever makes change(s) to jboss that
+break the test will be fixing the test or jboss, as appropriate!
+
+--------------------------------------------
+
+<xsl:if test='$numberOfFailures!=0 or $numberOfErrors!=0'>
+
+DETAILS OF ERRORS
+
+<xsl:for-each select="//error | //failure">
+
+Suite: <xsl:value-of select="../../@name"/>
+Test: <xsl:value-of select="../@name"/>
+Type: <xsl:value-of select="name()"/>
+Exception: <xsl:value-of select="@type"/>
+Message: <xsl:value-of select="@message"/>
+Stack Trace:
+<xsl:value-of select="."/>
+---------------------------------
+
+</xsl:for-each>
+
+</xsl:if>
+
+
+</xsl:template>
+
+</xsl:stylesheet>
Added: labs/jbossesb/trunk/qa/stylesheets/summary1a.xsl
===================================================================
--- labs/jbossesb/trunk/qa/stylesheets/summary1a.xsl (rev 0)
+++ labs/jbossesb/trunk/qa/stylesheets/summary1a.xsl 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,72 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+<xsl:param name="thedate"/>
+<xsl:param name="java_version"/>
+<xsl:param name="java_vendor"/>
+<xsl:param name="java_vm_version"/>
+<xsl:param name="java_vm_name"/>
+<xsl:param name="java_vm_info"/>
+<xsl:param name="os_name"/>
+<xsl:param name="os_arch"/>
+<xsl:param name="os_version"/>
+<xsl:param name="builduid"/>
+<xsl:param name="results_web"/>
+
+
+<xsl:output method='text'/>
+
+<xsl:template match='/'>
+<xsl:variable name="numberOfTests" select="sum(//@tests)"/>
+<xsl:variable name="numberOfErrors" select="sum(//@errors)"/>
+<xsl:variable name="numberOfFailures" select="sum(//@failures)"/>
+<xsl:variable name="numberOfSuccesses" select="$numberOfTests - $numberOfErrors - $numberOfFailures"/>
+Number of tests run: <xsl:value-of select="$numberOfTests"/>
+
+--------------------------------------------
+
+Successful tests: <xsl:value-of select="$numberOfSuccesses"/>
+Errors: <xsl:value-of select="$numberOfErrors"/>
+Failures: <xsl:value-of select="$numberOfFailures"/>
+
+--------------------------------------------
+
+[time of test: <xsl:value-of select="$thedate"/> GMT]
+[java.version: <xsl:value-of select="$java_version"/>]
+[java.vendor: <xsl:value-of select="$java_vendor"/>]
+[java.vm.version: <xsl:value-of select="$java_vm_version"/>]
+[java.vm.name: <xsl:value-of select="$java_vm_name"/>]
+[java.vm.info: <xsl:value-of select="$java_vm_info"/>]
+[os.name: <xsl:value-of select="$os_name"/>]
+[os.arch: <xsl:value-of select="$os_arch"/>]
+[os.version: <xsl:value-of select="$os_version"/>]
+
+Useful resources:
+
+- <xsl:value-of select="$results_web"/>/<xsl:value-of select="$builduid"/> for the junit report of this test.
+- <xsl:value-of select="$results_web"/>/<xsl:value-of select="$builduid"/>/logs/ for the logs for this test.
+
+NOTE: If there are any errors shown above - this mail is only highlighting
+them - it is NOT indicating that they are being looked at by anyone.
+Remember - if a test becomes broken after your changes - fix it or fix the test!
+
+--------------------------------------------
+
+<xsl:if test='$numberOfFailures!=0 or $numberOfErrors!=0'>
+
+Oh dear - still got some errors!
+
+</xsl:if>
+
+<xsl:if test='$numberOfFailures=0 and $numberOfErrors=0'>
+
+HURRAY - everything worked!
+
+</xsl:if>
+
+Thanks for all your effort - we really do love you!
+
+</xsl:template>
+
+</xsl:stylesheet>
Added: labs/jbossesb/trunk/qa/stylesheets/summary1b.xsl
===================================================================
--- labs/jbossesb/trunk/qa/stylesheets/summary1b.xsl (rev 0)
+++ labs/jbossesb/trunk/qa/stylesheets/summary1b.xsl 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,89 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+<xsl:param name="thedate"/>
+<xsl:param name="java_version"/>
+<xsl:param name="java_vendor"/>
+<xsl:param name="java_vm_version"/>
+<xsl:param name="java_vm_name"/>
+<xsl:param name="java_vm_info"/>
+<xsl:param name="os_name"/>
+<xsl:param name="os_arch"/>
+<xsl:param name="os_version"/>
+<xsl:param name="results_web"/>
+<xsl:param name="builduid"/>
+
+
+<xsl:output method='text'/>
+
+<xsl:template match='/'>
+
+<xsl:variable name="numberOfTests" select="sum(//@tests)"/>
+<xsl:variable name="numberOfErrors" select="sum(//@errors)"/>
+<xsl:variable name="numberOfFailures" select="sum(//@failures)"/>
+<xsl:variable name="numberOfSuccesses" select="$numberOfTests - $numberOfErrors - $numberOfFailures"/>
+
+JBoss daily test results
+
+SUMMARY
+
+Number of tests run: <xsl:value-of select="$numberOfTests"/>
+
+--------------------------------------------
+
+Successful tests: <xsl:value-of select="$numberOfSuccesses"/>
+
+Errors: <xsl:value-of select="$numberOfErrors"/>
+
+Failures: <xsl:value-of select="$numberOfFailures"/>
+
+--------------------------------------------
+
+
+
+[time of test: <xsl:value-of select="$thedate"/> GMT]
+[java.version: <xsl:value-of select="$java_version"/>]
+[java.vendor: <xsl:value-of select="$java_vendor"/>]
+[java.vm.version: <xsl:value-of select="$java_vm_version"/>]
+[java.vm.name: <xsl:value-of select="$java_vm_name"/>]
+[java.vm.info: <xsl:value-of select="$java_vm_info"/>]
+[os.name: <xsl:value-of select="$os_name"/>]
+[os.arch: <xsl:value-of select="$os_arch"/>]
+[os.version: <xsl:value-of select="$os_version"/>]
+
+Useful resources:
+
+- <xsl:value-of select="$results_web"/>/<xsl:value-of select="$builduid"/> for
+the junit report of this test.
+
+
+NOTE: If there are any errors shown above - this mail is only highlighting
+them - it is NOT indicating that they are being looked at by anyone.
+
+It is assumed that whoever makes change(s) to jboss that
+break the test will be fixing the test or jboss, as appropriate!
+
+--------------------------------------------
+
+<xsl:if test='$numberOfFailures!=0 or $numberOfErrors!=0'>
+
+DETAILS OF ERRORS
+
+<xsl:for-each select="//error | //failure">
+
+Suite: <xsl:value-of select="../../@package"/>.<xsl:value-of select="../../@name"/>
+Test: <xsl:value-of select="../@name"/>
+Type: <xsl:value-of select="name()"/>
+Exception: <xsl:value-of select="@type"/>
+Message: <xsl:value-of select="@message"/>
+---------------------------------
+
+</xsl:for-each>
+
+</xsl:if>
+
+
+</xsl:template>
+
+</xsl:stylesheet>
Added: labs/jbossesb/trunk/qa/stylesheets/summary2.xsl
===================================================================
--- labs/jbossesb/trunk/qa/stylesheets/summary2.xsl (rev 0)
+++ labs/jbossesb/trunk/qa/stylesheets/summary2.xsl 2007-03-14 03:10:16 UTC (rev 10170)
@@ -0,0 +1,225 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:param name="thedate">undefined</xsl:param>
+
+<xsl:output method='html' indent='yes' doctype-public='-//W3C//DTD HTML 3.2 FINAL//EN'/>
+
+
+<xsl:template match="/">
+
+<xsl:variable name="numberOfTests" select="sum(//@tests)"/>
+<xsl:variable name="numberOfErrors" select="sum(//@errors)"/>
+<xsl:variable name="numberOfFailures" select="sum(//@failures)"/>
+<xsl:variable name="numberOfSuccesses" select="$numberOfTests - $numberOfErrors - $numberOfFailures"/>
+
+<html>
+<head>
+
+<META NAME="ROBOTS" CONTENT="ALL"/>
+<meta name="rating" content="Safe For Kids"/>
+
+<title>JBoss Test Results</title>
+</head>
+<body bgcolor='white'>
+
+<p/>
+
+<hr/>
+
+The results of the latest <a href='http://jboss.org'>JBoss</a> daily build
+and test results - make sure the JBoss Group do not let anything slip!
+<br/>
+
+<i>The tests are run around 2:30am GMT each day on <a href="http://lubega.com">lubega.com</a> - so expect the files to be
+empty/half complete around that time. Also, the tests are run using 3 JDKs - Sun, IBM and Blackdown. Only the last
+run is shown on this web page - follow the archives link for the earlier runs.</i>
+
+<p/>
+<b>Date of last successful run: <xsl:value-of select="$thedate"/> GMT</b>
+<ul>
+ <li><a href='#tests'>Test Results</a></li>
+ <li><a href='#javadocs'>Javadocs of the JBoss modules</a></li>
+ <li><a href='#testlogs'>Test Logs</a></li>
+ <li><a href='#links'>Useful Links</a></li>
+ <li><a href='#source'>How tests were run</a></li>
+</ul>
+
+<hr/>
+
+<table width='100%' border='1'>
+<tr valign='top'><td>
+
+<a name='tests'/>
+
+<h3>Test Results</h3>
+
+
+<p/>
+
+What were the results?
+<ul>
+ <li><a href='TEST-all-test-results.log'>summary of test results</a> - that is, whats in the email</li>
+ <li><a href='TEST-all-test-results.xml'>all test results combined into one file</a></li>
+ <li><a href='testarchive/?M=D'>archive</a> - the last months worth of results</li>
+</ul>
+
+
+</td><td>
+
+<table border='1'>
+
+ <tr bgcolor='lightblue'>
+ <th>Test Name</th>
+ <th>Tests (<xsl:value-of select='$numberOfTests'/>)</th>
+ <th>Successes (<xsl:value-of select='$numberOfSuccesses'/>)</th>
+ <th>Failures (<xsl:value-of select='$numberOfFailures'/>)</th>
+ <th>Errors (<xsl:value-of select='$numberOfErrors'/>)</th>
+ <th>-</th>
+ </tr>
+
+ <xsl:for-each select="//testsuite">
+ <xsl:sort select="@name"/>
+ <tr>
+ <td>
+ <a><xsl:attribute name='href'>detailed-results.html#<xsl:value-of select='@name'/></xsl:attribute>
+ <xsl:value-of select='@name'/>
+ </a>
+ (<a><xsl:attribute name='href'>TEST-<xsl:value-of select='@name'/>.xml</xsl:attribute>
+ xml
+ </a>)
+ </td>
+ <td bgcolor='yellow'>
+ <xsl:if test='@failures!=0 or @errors!=0'><xsl:attribute name='bgcolor'>red</xsl:attribute>
+ </xsl:if>
+ <a><xsl:attribute name='href'>detailed-results.html#<xsl:value-of select='@name'/></xsl:attribute>
+ <xsl:value-of select='@tests'/>
+ </a>
+ </td>
+ <td bgcolor='gold'>
+ <a><xsl:attribute name='href'>detailed-results.html#<xsl:value-of select='@name'/></xsl:attribute>
+ <xsl:value-of select='@tests - @errors - @failures'/>
+ </a>
+ </td>
+ <td>
+ <xsl:if test='@failures=0'><xsl:attribute name='bgcolor'>lightgreen</xsl:attribute></xsl:if>
+ <xsl:if test='@failures!=0'><xsl:attribute name='bgcolor'>red</xsl:attribute></xsl:if>
+ <a><xsl:attribute name='href'>detailed-results.html#<xsl:value-of select='@name'/></xsl:attribute>
+ <xsl:value-of select='@failures'/>
+ </a>
+ </td>
+ <td>
+ <xsl:if test='@errors=0'><xsl:attribute name='bgcolor'>lightgreen</xsl:attribute></xsl:if>
+ <xsl:if test='@errors!=0'><xsl:attribute name='bgcolor'>red</xsl:attribute></xsl:if>
+ <a><xsl:attribute name='href'>detailed-results.html#<xsl:value-of select='@name'/></xsl:attribute>
+ <xsl:value-of select='@errors'/>
+ </a>
+ </td>
+ <td>
+ <xsl:if test='@failures=0 and @errors=0'><xsl:attribute name='bgcolor'>lightgreen</xsl:attribute>passed!
+ </xsl:if>
+ <xsl:if test='@failures!=0 or @errors!=0'><xsl:attribute name='bgcolor'>red</xsl:attribute>failures!
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:for-each>
+
+</table>
+
+Environment Information:<br/>
+[java.version: <xsl:value-of select="$java_version"/>]
+[java.vendor: <xsl:value-of select="$java_vendor"/>]
+[java.vm.version: <xsl:value-of select="$java_vm_version"/>]
+[java.vm.name: <xsl:value-of select="$java_vm_name"/>]
+[java.vm.info: <xsl:value-of select="$java_vm_info"/>]
+[os.name: <xsl:value-of select="$os_name"/>]
+[os.arch: <xsl:value-of select="$os_arch"/>]
+[os.version: <xsl:value-of select="$os_version"/>]
+
+</td></tr><tr valign='top'><td>
+
+<a name='javadocs'/>
+
+<h3>Javadocs</h3>
+
+The following <b>javadocs</b> are available:
+<ul>
+ <li><a href='jboss/build/docs/api/'>jboss</a></li>
+ <li><a href='jbosssx/build/docs/api/'>jbosssx</a></li>
+ <li><a href='jbosscx/build/docs/api/'>jbosscx</a></li>
+ <li><a href='jbossmx/build/docs/api/'>jbossmx</a></li>
+ <li><a href='jbosspool/build/docs/api/'>jbosspool (aka minerva)</a></li>
+ <li><a href='jboss-j2ee/build/docs/api/'>jboss-j2ee</a></li>
+ <li><a href='jbossmq/build/docs/api/'>jbossmq</a></li>
+ <li><a href='zoap/build/docs/api/'>zoap</a></li>
+ <li><a href='zola/ZOL/ZOL-2.0/docs/javadoc/'>zola</a></li>
+ <li><a href='jbosstest/build/docs/api/'>jbosstest</a></li>
+</ul>
+
+</td><td>
+
+
+<a name='testlogs'/>
+
+<h3>Test Logs</h3>
+
+<a href='cronjob.log'>Overall log file for tests</a><p/>
+
+The jboss server logs:
+<ul>
+ <li><a href='jboss/dist/log/server.log'>server.log</a></li>
+ <li><a href='jboss/dist/log/trace.log'>trace.log</a></li>
+</ul>
+<p/>
+
+The test run log is <a href='jbosstest/src/build/cronjob_test.log'>here</a>
+
+</td></tr><tr valign='top'><td>
+
+
+<a name='links'/>
+
+<h3>Useful Links</h3>
+
+<ul>
+ <li><a href='http://www.jboss.org'>JBoss</a></li>
+ <li><a href='http://java.sun.com'>Sun and Java</a></li>
+ <li><a href='http://java.sun.com/j2ee'>Sun and J2EE</a></li>
+ <li><a href='http://www.theserverside.com'>News and Tips on Java on the Server</a></li>
+</ul>
+
+</td><td>
+
+
+<a name='source'/>
+
+<h3>Source to the scripts that run the tests</h3>
+
+How are these tests performed - using these scripts
+<ul>
+ <li><a href='cronjob.sh'>cronjob.sh</a>
+ <ul>
+ <li><a href='cronjob_clean.sh'>cronjob_clean.sh</a></li>
+ <li><a href='cronjob_build.sh'>cronjob_build.sh</a></li>
+ <li><a href='cronjob_build.sh'>cronjob_javadocs.sh</a></li>
+ <li><a href='cronjob_test.sh'>cronjob_test.sh</a></li>
+ <li><a href='cronjob_setup.sh'>cronjob_setup.sh</a></li>
+ <li><a href='cronjob_mail.sh'>cronjob_mail.sh</a></li>
+ </ul>
+ </li>
+</ul>
+
+</td></tr></table>
+
+<hr/>
+
+<font color='navy'>
+<i><a href='mailto:chris at kimptoc.net'>chris at kimptoc.net</a></i>
+</font>
+
+
+</body>
+</html>
+
+</xsl:template>
+</xsl:stylesheet>
+
More information about the jboss-svn-commits
mailing list