[jboss-svn-commits] JBL Code SVN: r24207 - in labs/jbossesb/workspace/skeagh/container/microcontainer/src: main/resources/META-INF and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Dec 2 09:03:18 EST 2008
Author: beve
Date: 2008-12-02 09:03:18 -0500 (Tue, 02 Dec 2008)
New Revision: 24207
Added:
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployer.java
labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbDeployerTest.java
labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbDeployerTest.xml
Removed:
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/EsbRuntimeDeployerTest.java
labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.xml
Modified:
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/resources/META-INF/esb-deployers-jboss-beans.xml
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.xml
Log:
Renamed EsbRuntimeDeployer to EsbDeployer.
Copied: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployer.java (from rev 24205, 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/EsbDeployer.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployer.java 2008-12-02 14:03:18 UTC (rev 24207)
@@ -0,0 +1,107 @@
+/*
+ * 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.apache.log4j.Logger;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+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;
+
+/**
+ * EsbRuntimeDeployer takes care of the deployment of an {@link BeanMetaData} instance.
+ * This deployer actually only creates a BeanMetaData object describing a
+ * {@link EsbDeployment}. The MicroContainer will take care of the actual creation
+ * and starting of the deployment using it's lifecycle callbacks.
+ * <p/>
+ *
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ * @since 5.0
+ */
+public class EsbDeployer extends AbstractSimpleRealDeployer<EsbMetaData>
+{
+ /**
+ * Logger.
+ */
+ private Logger log = Logger.getLogger(EsbDeployer.class);
+
+ /**
+ * Prefix used for the BeanMetaData and for the managenment bean name.
+ */
+ private static final String BEAN_PREFIX = "jboss.esb";
+
+ /**
+ * No args constructor.
+ */
+ public EsbDeployer()
+ {
+ super(EsbMetaData.class);
+ log.info("Created EsbDeployer");
+
+ // Tell the MicroContainer that we are producing BeanMetaData.
+ setOutput(BeanMetaData.class);
+ }
+
+ /**
+ * Creates an {@link BeanMetaData} instance that describes the JBossESB deployment.
+ * The BeanMetaData is created using the information from the EsbMetaData object, such
+ * as the ESB DeploymentUnit and the archive name.
+ *
+ * The BeanMeatData is then attached to the Microcontainers deployment unit and will be
+ * picked up by the BeanMetaDataDeployer.
+ *
+ * @param deploymentUnit The deployment unit to deploy.
+ * @param esbMetaData The ESB MetaData that is associated with the deployment unit.
+ *
+ */
+ @Override
+ public final void deploy(final DeploymentUnit deploymentUnit, final EsbMetaData esbMetaData)
+ {
+ final BeanMetaData beanMetaData = createBeanMetaData(deploymentUnit, esbMetaData);
+ deploymentUnit.addAttachment(BeanMetaData.class, beanMetaData);
+
+ log.info("Created beanMetaData : " + beanMetaData);
+ }
+
+ /**
+ * Creates a {@link BeanMetaData} that describes the {@link EsbDeployment} class.
+ *
+ * @param deploymentUnit The deployment unit to deploy.
+ * @param esbMetaData The ESB MetaData that is associated with the deployment unit.
+ * @return BeanMetaData The {@link BeanMetaData} describing the EsbDeployment class
+ */
+ private BeanMetaData createBeanMetaData(final DeploymentUnit deploymentUnit, final EsbMetaData esbMetaData)
+ {
+ BeanMetaDataBuilder bmdBuilder = BeanMetaDataBuilder.createBuilder(BEAN_PREFIX + "." + deploymentUnit.getName(), EsbDeployment.class.getName());
+ // Setup the first constructor argument.
+ bmdBuilder.addConstructorParameter(String.class.getName(), esbMetaData.getAchiveName());
+ // Setup the second constructor argument.
+ bmdBuilder.addConstructorParameter(org.jboss.esb.deploy.config.DeploymentUnit.class.getName(), esbMetaData.getDeploymentUnit());
+ // Add management annotation.
+ final String mbeanName = BEAN_PREFIX + ":app=" + esbMetaData.getAchiveName();
+ bmdBuilder.addAnnotation("@org.jboss.aop.microcontainer.aspects.jmx.JMX(registerDirectly=true, exposedInterface=void.class, name=\"" + mbeanName + "\")");
+
+ return bmdBuilder.getBeanMetaData();
+ }
+
+}
Property changes on: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployer.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: 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 13:58:17 UTC (rev 24206)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java 2008-12-02 14:03:18 UTC (rev 24207)
@@ -1,107 +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.apache.log4j.Logger;
-import org.jboss.beans.metadata.spi.BeanMetaData;
-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;
-
-/**
- * EsbRuntimeDeployer takes care of the deployment of an {@link BeanMetaData} instance.
- * This deployer actually only creates a BeanMetaData object describing a
- * {@link EsbDeployment}. The MicroContainer will take care of the actual creation
- * and starting of the deployment using it's lifecycle callbacks.
- * <p/>
- *
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- * @since 5.0
- */
-public class EsbRuntimeDeployer extends AbstractSimpleRealDeployer<EsbMetaData>
-{
- /**
- * Logger.
- */
- private Logger log = Logger.getLogger(EsbRuntimeDeployer.class);
-
- /**
- * Prefix used for the BeanMetaData and for the managenment bean name.
- */
- private static final String BEAN_PREFIX = "jboss.esb";
-
- /**
- * No args constructor.
- */
- public EsbRuntimeDeployer()
- {
- super(EsbMetaData.class);
- log.info("Created EsbDeployer");
-
- // Tell the MicroContainer that we are producing BeanMetaData.
- setOutput(BeanMetaData.class);
- }
-
- /**
- * Creates an {@link BeanMetaData} instance that describes the JBossESB deployment.
- * The BeanMetaData is created using the information from the EsbMetaData object, such
- * as the ESB DeploymentUnit and the archive name.
- *
- * The BeanMeatData is then attached to the Microcontainers deployment unit and will be
- * picked up by the BeanMetaDataDeployer.
- *
- * @param deploymentUnit The deployment unit to deploy.
- * @param esbMetaData The ESB MetaData that is associated with the deployment unit.
- *
- */
- @Override
- public final void deploy(final DeploymentUnit deploymentUnit, final EsbMetaData esbMetaData)
- {
- final BeanMetaData beanMetaData = createBeanMetaData(deploymentUnit, esbMetaData);
- deploymentUnit.addAttachment(BeanMetaData.class, beanMetaData);
-
- log.info("Created beanMetaData : " + beanMetaData);
- }
-
- /**
- * Creates a {@link BeanMetaData} that describes the {@link EsbDeployment} class.
- *
- * @param deploymentUnit The deployment unit to deploy.
- * @param esbMetaData The ESB MetaData that is associated with the deployment unit.
- * @return BeanMetaData The {@link BeanMetaData} describing the EsbDeployment class
- */
- private BeanMetaData createBeanMetaData(final DeploymentUnit deploymentUnit, final EsbMetaData esbMetaData)
- {
- BeanMetaDataBuilder bmdBuilder = BeanMetaDataBuilder.createBuilder(BEAN_PREFIX + "." + deploymentUnit.getName(), EsbDeployment.class.getName());
- // Setup the first constructor argument.
- bmdBuilder.addConstructorParameter(String.class.getName(), esbMetaData.getAchiveName());
- // Setup the second constructor argument.
- bmdBuilder.addConstructorParameter(org.jboss.esb.deploy.config.DeploymentUnit.class.getName(), esbMetaData.getDeploymentUnit());
- // Add management annotation.
- final String mbeanName = BEAN_PREFIX + ":app=" + esbMetaData.getAchiveName();
- bmdBuilder.addAnnotation("@org.jboss.aop.microcontainer.aspects.jmx.JMX(registerDirectly=true, exposedInterface=void.class, name=\"" + mbeanName + "\")");
-
- return bmdBuilder.getBeanMetaData();
- }
-
-}
Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/resources/META-INF/esb-deployers-jboss-beans.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/resources/META-INF/esb-deployers-jboss-beans.xml 2008-12-02 13:58:17 UTC (rev 24206)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/resources/META-INF/esb-deployers-jboss-beans.xml 2008-12-02 14:03:18 UTC (rev 24207)
@@ -6,7 +6,7 @@
<bean name="EsbParserDeployer" class="org.jboss.esb.microcontainer.deployers.EsbParserDeployer"/>
- <bean name="EsbRuntimeDeployer" class="org.jboss.esb.microcontainer.deployers.EsbRuntimeDeployer"/>
+ <bean name="EsbDeployer" class="org.jboss.esb.microcontainer.deployers.EsbDeployer"/>
Copied: labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbDeployerTest.java (from rev 24200, 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/EsbDeployerTest.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbDeployerTest.java 2008-12-02 14:03:18 UTC (rev 24207)
@@ -0,0 +1,68 @@
+/*
+ * 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.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;
+
+/**
+ * Test for {@link EsbDeployer}.
+ *
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ *
+ */
+public class EsbDeployerTest extends MicrocontainerTest
+{
+ private VFSDeploymentUnit deploymentUnit;
+ private EsbMetaData esbMetaData;
+ private EsbDeployer runtimeDeployer;
+ private String testArchivesDir = "/test_esb_archives";
+
+ public EsbDeployerTest(final String name)
+ {
+ super(name);
+ }
+
+ public void testDeploy() throws Throwable
+ {
+ runtimeDeployer.deploy(deploymentUnit, esbMetaData);
+ BeanMetaData beanMetaData = deploymentUnit.getAttachment(BeanMetaData.class);
+ assertNotNull(beanMetaData);
+ assertEquals(EsbDeployment.class.getName(), beanMetaData.getBean());
+ }
+
+ @Override
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ final String archiveName = "exploded-esb-archive.jar";
+ final VirtualFile virtualFile = TestUtil.getVirtualFile(testArchivesDir, archiveName, this.getClass());
+ deploymentUnit = TestUtil.getDeploymentUnit(virtualFile);
+ EsbParserDeployer parserDeployer = (EsbParserDeployer) getBean("EsbParserDeployer");
+ esbMetaData = parserDeployer.parse(deploymentUnit, virtualFile, (EsbMetaData)null);
+ runtimeDeployer = (EsbDeployer) getBean("EsbDeployer");
+ }
+
+}
Property changes on: labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbDeployerTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbDeployerTest.xml (from rev 24200, 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/EsbDeployerTest.xml (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbDeployerTest.xml 2008-12-02 14:03:18 UTC (rev 24207)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="EsbParserDeployer" class="org.jboss.esb.microcontainer.deployers.EsbParserDeployer"/>
+ <bean name="EsbDeployer" class="org.jboss.esb.microcontainer.deployers.EsbDeployer"/>
+
+ <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+ <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
+ <property name="deployers"><inject bean="Deployers"/></property>
+ </bean>
+
+ <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+ <property name="structureBuilder">
+ <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
+ </property>
+ <incallback method="addDeployer"/>
+ <uncallback method="removeDeployer"/>
+ </bean>
+
+ <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+ <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
+ <incallback method="addDeployer"/>
+ <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>
Property changes on: labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbDeployerTest.xml
___________________________________________________________________
Name: svn:mergeinfo
+
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 13:58:17 UTC (rev 24206)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployerTest.java 2008-12-02 14:03:18 UTC (rev 24207)
@@ -27,7 +27,7 @@
import org.jboss.virtual.VirtualFile;
/**
- * Test for {@link EsbRuntimeDeployer}.
+ * Test for {@link EsbDeployer}.
*
* @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
*
Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployerTest.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployerTest.xml 2008-12-02 13:58:17 UTC (rev 24206)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployerTest.xml 2008-12-02 14:03:18 UTC (rev 24207)
@@ -4,7 +4,7 @@
<bean name="EsbParserDeployer" class="org.jboss.esb.microcontainer.deployers.EsbParserDeployer">
</bean>
- <bean name="EsbRuntimeDeployer" class="org.jboss.esb.microcontainer.deployers.EsbRuntimeDeployer"/>
+ <bean name="EsbDeployer" class="org.jboss.esb.microcontainer.deployers.EsbDeployer"/>
<bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
<property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
Deleted: 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 13:58:17 UTC (rev 24206)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.java 2008-12-02 14:03:18 UTC (rev 24207)
@@ -1,68 +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.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;
-
-/**
- * Test for {@link EsbRuntimeDeployer}.
- *
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- *
- */
-public class EsbRuntimeDeployerTest extends MicrocontainerTest
-{
- private VFSDeploymentUnit deploymentUnit;
- private EsbMetaData esbMetaData;
- private EsbRuntimeDeployer runtimeDeployer;
- private String testArchivesDir = "/test_esb_archives";
-
- public EsbRuntimeDeployerTest(final String name)
- {
- super(name);
- }
-
- public void testDeploy() throws Throwable
- {
- runtimeDeployer.deploy(deploymentUnit, esbMetaData);
- BeanMetaData beanMetaData = deploymentUnit.getAttachment(BeanMetaData.class);
- assertNotNull(beanMetaData);
- assertEquals(EsbDeployment.class.getName(), beanMetaData.getBean());
- }
-
- @Override
- public void setUp() throws Exception
- {
- super.setUp();
- final String archiveName = "exploded-esb-archive.jar";
- final VirtualFile virtualFile = TestUtil.getVirtualFile(testArchivesDir, archiveName, this.getClass());
- deploymentUnit = TestUtil.getDeploymentUnit(virtualFile);
- EsbParserDeployer parserDeployer = (EsbParserDeployer) getBean("EsbParserDeployer");
- esbMetaData = parserDeployer.parse(deploymentUnit, virtualFile, (EsbMetaData)null);
- runtimeDeployer = (EsbRuntimeDeployer) getBean("EsbRuntimeDeployer");
- }
-
-}
Deleted: 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 13:58:17 UTC (rev 24206)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/test/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployerTest.xml 2008-12-02 14:03:18 UTC (rev 24207)
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <bean name="EsbParserDeployer" class="org.jboss.esb.microcontainer.deployers.EsbParserDeployer"/>
- <bean name="EsbRuntimeDeployer" class="org.jboss.esb.microcontainer.deployers.EsbRuntimeDeployer"/>
-
- <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
- <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
- <property name="deployers"><inject bean="Deployers"/></property>
- </bean>
-
- <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
- <property name="structureBuilder">
- <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
- </property>
- <incallback method="addDeployer"/>
- <uncallback method="removeDeployer"/>
- </bean>
-
- <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
- <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
- <incallback method="addDeployer"/>
- <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>
More information about the jboss-svn-commits
mailing list