[jboss-svn-commits] JBL Code SVN: r24200 - in labs/jbossesb/workspace/skeagh/container/microcontainer/src: main/java/org/jboss/esb/microcontainer/deployers and 3 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Dec 2 05:16:06 EST 2008


Author: beve
Date: 2008-12-02 05:16:06 -0500 (Tue, 02 Dec 2008)
New Revision: 24200

Added:
   labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployment/
   labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployment/EsbDeployment.java
   labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployment/package.html
Removed:
   labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployment.java
Modified:
   labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java
   labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployerTest.java
   labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.java
   labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.xml
   labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/resources/log4j.xml
Log:
Minor refactoring.


Deleted: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployment.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployment.java	2008-12-02 09:32:36 UTC (rev 24199)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployment.java	2008-12-02 10:16:06 UTC (rev 24200)
@@ -1,127 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.esb.microcontainer.deployers;
-
-import org.jboss.esb.api.exception.DeploymentException;
-import org.jboss.esb.deploy.DeploymentRuntime;
-import org.jboss.esb.deploy.config.DeploymentUnit;
-import org.jboss.esb.microcontainer.config.DeploymentUnitResourceLocator;
-import org.jboss.esb.util.AssertArgument;
-
-/**
- * An EsbDeployment is a MicroContainer (MC) deployment that consists
- * of an {@link DeploymentUnit}, and a {@link EsbRuntimeDeployment}.
- * <p/>
- * An EsbDeployment is created by the Microcontainer and the Microcontainer
- * is also responsible for the lifecycle events, like createing, starting, and stopping.
- *
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- * @since 5.0
- */
-public class EsbDeployment
-{
-    /**
-     * The name of the deployment achive.
-     */
-    private String deploymentName;
-
-    /**
-     * The ESB DeploymentUnit. The collection of resouces, routers, and
-     * service that are to be deployed.
-     */
-    private DeploymentUnit deploymentUnit;
-
-    /**
-     * The Esb Runtime takes care of deploying the deployment unit.
-     */
-    private DeploymentRuntime runtime;
-
-    /**
-     * Construct.
-     *
-     * @param deploymentName   The name of the archive that this deployment came from.
-     * @param deploymentUnit    The ESB DeploymentUnit that is to be deployed.
-     */
-    public EsbDeployment(final String deploymentName, final DeploymentUnit deploymentUnit)
-    {
-        AssertArgument.isNotNull(deploymentName, "deploymentName");
-        AssertArgument.isNotNull(deploymentUnit, "deploymentUnit");
-        this.deploymentName = deploymentName;
-        this.deploymentUnit = deploymentUnit;
-    }
-
-    /**
-     * Creates the EsbDeploymentRuntime when called by the MicroContainer lifecycle.
-     *
-     * @throws DeploymentException If DeploymentRuntime could not be created.
-     */
-    public final void create() throws DeploymentException
-    {
-        // TODO: Fix classloading..make it play nicely with MC. Daniel
-        runtime = new DeploymentRuntime(new DeploymentUnitResourceLocator(getClass().getClassLoader()));
-        runtime.setDeploymentName(deploymentName);
-        runtime.addDeploymentUnit(deploymentUnit);
-    }
-
-    /**
-     * Deploys the EsbRuntimeDeployment when called by the MicroContainer lifecycle.
-     *
-     * @throws DeploymentException If an exception occurs while starting the DeploymentRuntime
-     */
-    public final void start() throws DeploymentException
-    {
-        runtime.deploy();
-    }
-
-    /**
-     * Undeploys the EsbRuntimeDeployment when called by the MicroContainer lifecycle.
-     *
-     * @throws DeploymentException If an exception occurs while stopping the DeploymentRuntime
-     */
-    public final void stop() throws DeploymentException
-    {
-        if (runtime != null)
-        {
-            runtime.undeploy();
-        }
-    }
-
-    /**
-     * Just retrieves the DeploymentUnit.
-     *
-     * @return DeploymentUnit The deployment unit for this EsbDeployment.
-     */
-    public final DeploymentUnit getDeploymentUnit()
-    {
-        return deploymentUnit;
-    }
-
-    /**
-     * Just retrieves the deployment name.
-     *
-     * @return String The name of this deployment.
-     */
-    public final String getDeploymentName()
-    {
-        return deploymentName;
-    }
-
-}

Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java	2008-12-02 09:32:36 UTC (rev 24199)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java	2008-12-02 10:16:06 UTC (rev 24200)
@@ -25,6 +25,7 @@
 import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
 import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.esb.microcontainer.deployment.EsbDeployment;
 import org.jboss.esb.microcontainer.metadata.EsbMetaData;
 
 /**

Copied: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployment/EsbDeployment.java (from rev 24197, labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployment.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployment/EsbDeployment.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployment/EsbDeployment.java	2008-12-02 10:16:06 UTC (rev 24200)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.esb.microcontainer.deployment;
+
+import org.jboss.esb.api.exception.DeploymentException;
+import org.jboss.esb.deploy.DeploymentRuntime;
+import org.jboss.esb.deploy.config.DeploymentUnit;
+import org.jboss.esb.microcontainer.config.DeploymentUnitResourceLocator;
+import org.jboss.esb.util.AssertArgument;
+
+/**
+ * An EsbDeployment is a MicroContainer (MC) deployment that consists
+ * of an {@link DeploymentUnit}, and a {@link EsbRuntimeDeployment}.
+ * <p/>
+ * An EsbDeployment is created by the Microcontainer and the Microcontainer
+ * is also responsible for the lifecycle events, like createing, starting, and stopping.
+ *
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ * @since 5.0
+ */
+public class EsbDeployment
+{
+    /**
+     * The name of the deployment achive.
+     */
+    private String deploymentName;
+
+    /**
+     * The ESB DeploymentUnit. The collection of resouces, routers, and
+     * service that are to be deployed.
+     */
+    private DeploymentUnit deploymentUnit;
+
+    /**
+     * The Esb Runtime takes care of deploying the deployment unit.
+     */
+    private DeploymentRuntime runtime;
+
+    /**
+     * Construct.
+     *
+     * @param deploymentName   The name of the archive that this deployment came from.
+     * @param deploymentUnit    The ESB DeploymentUnit that is to be deployed.
+     */
+    public EsbDeployment(final String deploymentName, final DeploymentUnit deploymentUnit)
+    {
+        AssertArgument.isNotNull(deploymentName, "deploymentName");
+        AssertArgument.isNotNull(deploymentUnit, "deploymentUnit");
+        this.deploymentName = deploymentName;
+        this.deploymentUnit = deploymentUnit;
+    }
+
+    /**
+     * Creates the EsbDeploymentRuntime when called by the MicroContainer lifecycle.
+     *
+     * @throws DeploymentException If DeploymentRuntime could not be created.
+     */
+    public final void create() throws DeploymentException
+    {
+        runtime = new DeploymentRuntime(new DeploymentUnitResourceLocator(getClass().getClassLoader()));
+        runtime.setDeploymentName(deploymentName);
+        runtime.addDeploymentUnit(deploymentUnit);
+    }
+
+    /**
+     * Deploys the EsbRuntimeDeployment when called by the MicroContainer lifecycle.
+     *
+     * @throws DeploymentException If an exception occurs while starting the DeploymentRuntime
+     */
+    public final void start() throws DeploymentException
+    {
+        runtime.deploy();
+    }
+
+    /**
+     * Undeploys the EsbRuntimeDeployment when called by the MicroContainer lifecycle.
+     *
+     * @throws DeploymentException If an exception occurs while stopping the DeploymentRuntime
+     */
+    public final void stop() throws DeploymentException
+    {
+        if (runtime != null)
+        {
+            runtime.undeploy();
+        }
+    }
+
+    /**
+     * Just retrieves the DeploymentUnit.
+     *
+     * @return DeploymentUnit The deployment unit for this EsbDeployment.
+     */
+    public final DeploymentUnit getDeploymentUnit()
+    {
+        return deploymentUnit;
+    }
+
+    /**
+     * Just retrieves the deployment name.
+     *
+     * @return String The name of this deployment.
+     */
+    public final String getDeploymentName()
+    {
+        return deploymentName;
+    }
+
+}


Property changes on: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployment/EsbDeployment.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Added: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployment/package.html
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployment/package.html	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployment/package.html	2008-12-02 10:16:06 UTC (rev 24200)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+JBoss ESB deployents for JBoss MicroContainer.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file

Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployerTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployerTest.java	2008-12-02 09:32:36 UTC (rev 24199)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployerTest.java	2008-12-02 10:16:06 UTC (rev 24200)
@@ -68,7 +68,6 @@
         VFSDeploymentUnit deploymentUnit = TestUtil.getDeploymentUnit(virtualFile);
         EsbMetaData esbMetaData = parserDeployer.parse(deploymentUnit, virtualFile, (EsbMetaData)null);
 
-        System.out.println(esbMetaData.getAchiveName());
         assertEquals(virtualFile.getName(), esbMetaData.getAchiveName());
     }
 

Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.java	2008-12-02 09:32:36 UTC (rev 24199)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.java	2008-12-02 10:16:06 UTC (rev 24200)
@@ -22,6 +22,7 @@
 
 import org.jboss.beans.metadata.spi.BeanMetaData;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.esb.microcontainer.deployment.EsbDeployment;
 import org.jboss.esb.microcontainer.metadata.EsbMetaData;
 import org.jboss.test.kernel.junit.MicrocontainerTest;
 import org.jboss.virtual.VirtualFile;

Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.xml	2008-12-02 09:32:36 UTC (rev 24199)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.xml	2008-12-02 10:16:06 UTC (rev 24200)
@@ -23,4 +23,9 @@
       <uncallback method="removeDeployer"/>
    </bean>
    
+    <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
+        <constructor><parameter class="org.jboss.kernel.Kernel"><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+    </bean>
+   
+   
 </deployment>

Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/resources/log4j.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/resources/log4j.xml	2008-12-02 09:32:36 UTC (rev 24199)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/resources/log4j.xml	2008-12-02 10:16:06 UTC (rev 24200)
@@ -35,11 +35,11 @@
    </category>
 
    <category name="org.jboss.esb">
-      <priority value="debug"/>
+      <priority value="error"/>
    </category>
    
    <category name="org.milyn">
-      <priority value="info"/>
+      <priority value="error"/>
    </category>
 
    <!-- ======================= -->




More information about the jboss-svn-commits mailing list