[jboss-cvs] JBossAS SVN: r104937 - in projects/jboss-deployers/branches/Branch_2_0: deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 18 12:06:52 EDT 2010
Author: alesj
Date: 2010-05-18 12:06:50 -0400 (Tue, 18 May 2010)
New Revision: 104937
Added:
projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/
projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/AbstractFromDeploymentDelegate.java
projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeployment.java
projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeploymentDelegate.java
projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeploymentValueMetaData.java
projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/support/FDTest.java
projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/test/FromDeploymentTestCase.java
projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/dependency/fd/
projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/dependency/fd/META-INF/
projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/dependency/fd/META-INF/jboss-beans.xml
projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/test/FromDeploymentTestCase.xml
Modified:
projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/DependencyTestSuite.java
Log:
Port from-deployment handling.
Added: projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/AbstractFromDeploymentDelegate.java
===================================================================
--- projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/AbstractFromDeploymentDelegate.java (rev 0)
+++ projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/AbstractFromDeploymentDelegate.java 2010-05-18 16:06:50 UTC (rev 104937)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.deployers.plugins.metadata;
+
+import org.jboss.dependency.spi.Controller;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.deployers.structure.spi.DeploymentRegistry;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * Get info from context's deployment.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public abstract class AbstractFromDeploymentDelegate implements FromDeploymentDelegate
+{
+ /**
+ * Get context's owning deployment.
+ *
+ * @param context the context to check
+ * @return matching deployment or null
+ */
+ protected DeploymentUnit getDeploymentUnit(ControllerContext context)
+ {
+ Controller controller = context.getController();
+ ControllerContext cc = controller.getInstalledContext(DeploymentRegistry.class);
+ if (cc != null)
+ {
+ Object target = cc.getTarget();
+ return DeploymentRegistry.class.cast(target).getDeployment(context);
+ }
+ return null;
+ }
+}
Added: projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeployment.java
===================================================================
--- projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeployment.java (rev 0)
+++ projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeployment.java 2010-05-18 16:06:50 UTC (rev 104937)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.deployers.plugins.metadata;
+
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * Get info from context's deployment.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public enum FromDeployment
+{
+ DEPLOYMENT(new DefaultFromDeploymentDelegate()),
+ SIMPLE_NAME(new SimpleNameFromDeploymentDelegate()),
+ TOP_DEPLOYMENT(new TopDeploymentDelegate()),
+ TOP_SIMPLE_NAME(new TopSimpleNameDeploymentDelegate());
+
+ private FromDeploymentDelegate delegate;
+
+ FromDeployment(FromDeploymentDelegate delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ /**
+ * Get deployment info.
+ *
+ * @param context the context
+ * @return deployment's info
+ */
+ public Object executeLookup(ControllerContext context)
+ {
+ return delegate.executeLookup(context);
+ }
+
+ /**
+ * Get matching FromDeployment enum.
+ *
+ * @param type the type string
+ * @return matching FromDeployment or exception
+ */
+ public static FromDeployment getInstance(String type)
+ {
+ if (type == null)
+ throw new IllegalArgumentException("Null type");
+
+ for (FromDeployment fd : values())
+ {
+ if (type.equalsIgnoreCase(fd.name()))
+ return fd;
+ }
+
+ throw new IllegalArgumentException("NO such FromDeployment: " + type);
+ }
+
+ private static class DefaultFromDeploymentDelegate extends AbstractFromDeploymentDelegate
+ {
+ public Object executeLookup(ControllerContext context)
+ {
+ return getDeploymentUnit(context);
+ }
+ }
+
+ private static class SimpleNameFromDeploymentDelegate extends AbstractFromDeploymentDelegate
+ {
+ public Object executeLookup(ControllerContext context)
+ {
+ DeploymentUnit unit = getDeploymentUnit(context);
+ return unit != null ? unit.getSimpleName() : null;
+ }
+ }
+
+ private static class TopDeploymentDelegate extends AbstractFromDeploymentDelegate
+ {
+ public Object executeLookup(ControllerContext context)
+ {
+ DeploymentUnit unit = getDeploymentUnit(context);
+ return unit != null ? unit.getTopLevel() : null;
+ }
+ }
+
+ private static class TopSimpleNameDeploymentDelegate extends AbstractFromDeploymentDelegate
+ {
+ public Object executeLookup(ControllerContext context)
+ {
+ DeploymentUnit unit = getDeploymentUnit(context);
+ return unit != null ? unit.getTopLevel().getSimpleName() : null;
+ }
+ }
+}
Added: projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeploymentDelegate.java
===================================================================
--- projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeploymentDelegate.java (rev 0)
+++ projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeploymentDelegate.java 2010-05-18 16:06:50 UTC (rev 104937)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.deployers.plugins.metadata;
+
+import org.jboss.dependency.spi.ControllerContext;
+
+/**
+ * Get info from context's deployment.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public interface FromDeploymentDelegate
+{
+ /**
+ * Get deployment info.
+ *
+ * @param context the context
+ * @return deployment's info
+ */
+ Object executeLookup(ControllerContext context);
+}
Added: projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeploymentValueMetaData.java
===================================================================
--- projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeploymentValueMetaData.java (rev 0)
+++ projects/jboss-deployers/branches/Branch_2_0/deployers-impl/src/main/java/org/jboss/deployers/plugins/metadata/FromDeploymentValueMetaData.java 2010-05-18 16:06:50 UTC (rev 104937)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.deployers.plugins.metadata;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
+import org.jboss.beans.metadata.spi.MetaDataVisitor;
+import org.jboss.dependency.spi.Controller;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * Deployment value meta data.
+ *
+ * It allows injection on deployment info into beans.
+ * e.g. <property name="appName"><from-deployment type="simple_name" bean="Tx"/></property>
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+ at JBossXmlSchema(namespace="urn:jboss:bean-deployer:deployment:2.0", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name="from-deployment")
+ at XmlType(name="fromDeploymentType", propOrder={})
+public class FromDeploymentValueMetaData extends AbstractValueMetaData
+{
+ private static final long serialVersionUID = 1l;
+
+ private transient ControllerContext context;
+ private FromDeployment fromDeployment;
+ private String bean;
+ private ControllerState state;
+
+ public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+ {
+ ControllerContext lookup = context;
+ if (bean != null)
+ {
+ Controller controller = context.getController();
+ lookup = controller.getContext(bean, state);
+ if (lookup == null)
+ throw new IllegalArgumentException("No such bean '" + bean + "' in state " + state);
+ }
+ return fromDeployment.executeLookup(lookup);
+ }
+
+ public void initialVisit(MetaDataVisitor vistor)
+ {
+ context = vistor.getControllerContext();
+ vistor.initialVisit(this);
+ }
+
+ @XmlAttribute(name = "type", required = true)
+ public void setFromDeployment(String type)
+ {
+ fromDeployment = FromDeployment.getInstance(type);
+ }
+
+ @XmlAttribute
+ public void setBean(String bean)
+ {
+ this.bean = bean;
+ }
+
+ @XmlAttribute
+ public void setState(String state)
+ {
+ if (state != null)
+ this.state = new ControllerState(state);
+ }
+}
Modified: projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/DependencyTestSuite.java
===================================================================
--- projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/DependencyTestSuite.java 2010-05-18 15:41:20 UTC (rev 104936)
+++ projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/DependencyTestSuite.java 2010-05-18 16:06:50 UTC (rev 104937)
@@ -21,10 +21,12 @@
*/
package org.jboss.test.deployers.vfs.dependency;
+import org.jboss.test.deployers.vfs.dependency.test.DependenciesTestCase;
+import org.jboss.test.deployers.vfs.dependency.test.FromDeploymentTestCase;
+
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
-import org.jboss.test.deployers.vfs.dependency.test.DependenciesTestCase;
/**
* DependencyTestSuite.
@@ -43,6 +45,7 @@
TestSuite suite = new TestSuite("VFS Dependency Scanning Tests");
suite.addTest(DependenciesTestCase.suite());
+ suite.addTest(FromDeploymentTestCase.suite());
return suite;
}
Added: projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/support/FDTest.java
===================================================================
--- projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/support/FDTest.java (rev 0)
+++ projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/support/FDTest.java 2010-05-18 16:06:50 UTC (rev 104937)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.dependency.support;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class FDTest
+{
+ private String appName;
+ private DeploymentUnit unit;
+
+ public String getAppName()
+ {
+ return appName;
+ }
+
+ public void setAppName(String appName)
+ {
+ this.appName = appName;
+ }
+
+ public DeploymentUnit getUnit()
+ {
+ return unit;
+ }
+
+ public void setUnit(DeploymentUnit unit)
+ {
+ this.unit = unit;
+ }
+}
Copied: projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/test/FromDeploymentTestCase.java (from rev 104929, projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/test/DependenciesTestCase.java)
===================================================================
--- projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/test/FromDeploymentTestCase.java (rev 0)
+++ projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/test/FromDeploymentTestCase.java 2010-05-18 16:06:50 UTC (rev 104937)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.test.deployers.vfs.dependency.test;
+
+import java.lang.reflect.Method;
+
+import org.jboss.deployers.plugins.metadata.FromDeploymentValueMetaData;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.test.deployers.BootstrapDeployersTest;
+import org.jboss.test.deployers.vfs.dependency.support.FDTest;
+import org.jboss.virtual.AssembledDirectory;
+import org.jboss.xb.util.JBossXBHelper;
+
+import junit.framework.Test;
+
+/**
+ * FromDeploymentTestCase.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class FromDeploymentTestCase extends BootstrapDeployersTest
+{
+ public FromDeploymentTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite()
+ {
+ return suite(FromDeploymentTestCase.class);
+ }
+
+ @Override
+ @SuppressWarnings("deprecation")
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JBossXBHelper.addClassBinding("urn:jboss:bean-deployer:deployment:2.0", FromDeploymentValueMetaData.class);
+ }
+
+ @Override
+ @SuppressWarnings("deprecation")
+ protected void tearDown() throws Exception
+ {
+ JBossXBHelper.removeClassBinding("urn:jboss:bean-deployer:deployment:2.0");
+ super.tearDown();
+ }
+
+ public void testBasic() throws Throwable
+ {
+ String appName = "fdAppName.jar";
+ AssembledDirectory root = createAssembledDirectory(appName, appName);
+ root.addClass(FDTest.class);
+ addPath(root, "/dependency/fd", "");
+
+ DeploymentUnit unit = assertDeploy(root);
+ try
+ {
+ Object test1 = assertBean("Test1", Object.class);
+ assertFromDeployment(test1, unit, appName);
+
+ Object test2 = assertBean("Test2", Object.class);
+ assertFromDeployment(test2, unit, appName);
+ }
+ finally
+ {
+ undeploy(unit);
+ }
+ }
+
+ protected static void assertFromDeployment(Object test, DeploymentUnit unit, String appName) throws Exception
+ {
+ Class<?> clazz = test.getClass();
+ Method u = clazz.getMethod("getUnit");
+ assertSame(unit, u.invoke(test));
+ Method m = clazz.getMethod("getAppName");
+ assertEquals(appName, m.invoke(test));
+ }
+}
Added: projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/dependency/fd/META-INF/jboss-beans.xml
===================================================================
--- projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/dependency/fd/META-INF/jboss-beans.xml (rev 0)
+++ projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/dependency/fd/META-INF/jboss-beans.xml 2010-05-18 16:06:50 UTC (rev 104937)
@@ -0,0 +1,13 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Test1" class="org.jboss.test.deployers.vfs.dependency.support.FDTest">
+ <property name="unit"><from-deployment xmlns="urn:jboss:bean-deployer:deployment:2.0" type="deployment"/></property>
+ <property name="appName"><from-deployment xmlns="urn:jboss:bean-deployer:deployment:2.0" type="simple_name"/></property>
+ </bean>
+
+ <bean name="Test2" class="org.jboss.test.deployers.vfs.dependency.support.FDTest">
+ <property name="unit"><from-deployment xmlns="urn:jboss:bean-deployer:deployment:2.0" type="top_deployment"/></property>
+ <property name="appName"><from-deployment xmlns="urn:jboss:bean-deployer:deployment:2.0" type="top_simple_name"/></property>
+ </bean>
+
+</deployment>
Copied: projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/test/FromDeploymentTestCase.xml (from rev 104929, projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/test/DependenciesTestCase.xml)
===================================================================
--- projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/test/FromDeploymentTestCase.xml (rev 0)
+++ projects/jboss-deployers/branches/Branch_2_0/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/test/FromDeploymentTestCase.xml 2010-05-18 16:06:50 UTC (rev 104937)
@@ -0,0 +1,12 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="DURegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry">
+ <install bean="BeanMetaDataDeployer" method="setDeploymentRegistry">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="BeanMetaDataDeployer" method="setDeploymentRegistry">
+ <parameter><null/></parameter>
+ </uninstall>
+ </bean>
+
+</deployment>
More information about the jboss-cvs-commits
mailing list