[jboss-cvs] JBossAS SVN: r81618 - in projects/jboss-deployers/trunk: deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support and 26 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 26 07:44:37 EST 2008
Author: alesj
Date: 2008-11-26 07:44:36 -0500 (Wed, 26 Nov 2008)
New Revision: 81618
Added:
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/AbstractManagedObjectUnitTest.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/AliasesParserDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesMetaData.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesMetaDataDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesParserDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependencyItemMetaData.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentAliases.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentAliasesDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependencies.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependenciesImpl.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependencyDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/package-info.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/DependencyTestSuite.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/support/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/support/MockTM.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/test/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/test/DependenciesTestCase.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/alias/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/alias/META-INF/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/alias/META-INF/aliases.txt
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/bean/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/bean/META-INF/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/bean/META-INF/jboss-dependency.xml
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/module/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/module/META-INF/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/module/META-INF/jboss-dependency.xml
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/support/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/support/META-INF/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/support/META-INF/support-jboss-beans.xml
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/test/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/test/DependenciesTestCase.xml
Modified:
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/AllowedDsTypes.java
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/AllowedTxSupportMetaData.java
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/ConnMetaData.java
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/XADataSourceMetaData.java
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/support/TestAttachment.java
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/support/TestFields.java
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/DeployerManagedDeploymentUnitTestCase.java
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/DeployerManagedObjectUnitTestCase.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/SimpleAliasTester.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/parsing/test/DeployersAltDDTestCase.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/test/FileMatcherTestCase.java
projects/jboss-deployers/trunk/pom.xml
Log:
[JBDEPLOY-16]; initial work on generic dependency.
Fixing Deployers to work against Managed 2.0.0.GA.
Update libs.
Modified: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/AllowedDsTypes.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/AllowedDsTypes.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/AllowedDsTypes.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -35,9 +35,7 @@
* @author Scott.Stark at jboss.org
* @version $Revision$
*/
-public class AllowedDsTypes
- implements ManagedPropertyConstraintsPopulatorFactory,
- ManagedPropertyConstraintsPopulator
+public class AllowedDsTypes implements ManagedPropertyConstraintsPopulatorFactory, ManagedPropertyConstraintsPopulator
{
public static HashSet<MetaValue> values = new HashSet<MetaValue>();
static
@@ -60,4 +58,13 @@
return this;
}
+ public ManagedPropertyConstraintsPopulator newInstance(String min, String max, String[] legalValues)
+ {
+ return this;
+ }
+
+ public ManagedPropertyConstraintsPopulator newInstance(String min, String max, String[] legalValues, String... strings)
+ {
+ return this;
+ }
}
Modified: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/AllowedTxSupportMetaData.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/AllowedTxSupportMetaData.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/AllowedTxSupportMetaData.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -36,9 +36,7 @@
* @author Scott.Stark at jboss.org
* @version $Revision$
*/
-public class AllowedTxSupportMetaData implements
- ManagedPropertyConstraintsPopulator,
- ManagedPropertyConstraintsPopulatorFactory
+public class AllowedTxSupportMetaData implements ManagedPropertyConstraintsPopulator, ManagedPropertyConstraintsPopulatorFactory
{
private static EnumMetaType TYPE = new EnumMetaType(TxSupportMetaData.values());
private static HashSet<MetaValue> values = new HashSet<MetaValue>();
@@ -60,4 +58,13 @@
return this;
}
+ public ManagedPropertyConstraintsPopulator newInstance(String min, String max, String[] legalValues)
+ {
+ return this;
+ }
+
+ public ManagedPropertyConstraintsPopulator newInstance(String min, String max, String[] legalValues, String... strings)
+ {
+ return this;
+ }
}
Modified: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/ConnMetaData.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/ConnMetaData.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/ConnMetaData.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -24,9 +24,11 @@
import java.io.Serializable;
import java.util.Properties;
+import org.jboss.managed.api.annotation.ConstraintsPopulatorFactory;
import org.jboss.managed.api.annotation.ManagementObject;
import org.jboss.managed.api.annotation.ManagementObjectID;
import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ManagementPropertyFactory;
import org.jboss.managed.plugins.WritethroughManagedPropertyImpl;
/**
@@ -50,8 +52,9 @@
private Properties connProperties;
private SecMetaData securityMetaData;
- @ManagementProperty(name="datasource-type", constraintsFactory=AllowedDsTypes.class,
- propertyFactory=WritethroughManagedPropertyImpl.class)
+ @ManagementProperty(name="datasource-type")
+ @ConstraintsPopulatorFactory(AllowedDsTypes.class)
+ @ManagementPropertyFactory(WritethroughManagedPropertyImpl.class)
public String getConnType()
{
return connType;
@@ -61,8 +64,9 @@
this.connType = connType;
}
- @ManagementProperty(name="jndi-name", propertyFactory=WritethroughManagedPropertyImpl.class)
+ @ManagementProperty(name="jndi-name")
@ManagementObjectID(type="DataSource")
+ @ManagementPropertyFactory(WritethroughManagedPropertyImpl.class)
public String getJndiName()
{
return jndiName;
@@ -71,7 +75,8 @@
{
this.jndiName = jndiName;
}
- @ManagementProperty(name="max-size", propertyFactory=WritethroughManagedPropertyImpl.class)
+ @ManagementProperty(name="max-size")
+ @ManagementPropertyFactory(WritethroughManagedPropertyImpl.class)
public int getMaxSize()
{
return maxSize;
@@ -80,7 +85,8 @@
{
this.maxSize = maxSize;
}
- @ManagementProperty(name="min-size", propertyFactory=WritethroughManagedPropertyImpl.class)
+ @ManagementProperty(name="min-size")
+ @ManagementPropertyFactory(WritethroughManagedPropertyImpl.class)
public int getMinSize()
{
return minSize;
@@ -89,7 +95,8 @@
{
this.minSize = minSize;
}
- @ManagementProperty(propertyFactory=WritethroughManagedPropertyImpl.class)
+ @ManagementProperty
+ @ManagementPropertyFactory(WritethroughManagedPropertyImpl.class)
public char[] getPassword()
{
return password;
@@ -98,7 +105,8 @@
{
this.password = password;
}
- @ManagementProperty(propertyFactory=WritethroughManagedPropertyImpl.class)
+ @ManagementProperty
+ @ManagementPropertyFactory(WritethroughManagedPropertyImpl.class)
public String getUsername()
{
return username;
@@ -107,7 +115,8 @@
{
this.username = username;
}
- @ManagementProperty(name="connection-properties", propertyFactory=WritethroughManagedPropertyImpl.class)
+ @ManagementProperty(name="connection-properties")
+ @ManagementPropertyFactory(WritethroughManagedPropertyImpl.class)
public Properties getConnProperties()
{
return connProperties;
@@ -128,8 +137,8 @@
this.localTransactions = localTransactions;
}
- @ManagementProperty(name="tx-metadata",
- constraintsFactory=AllowedTxSupportMetaData.class)
+ @ManagementProperty(name="tx-metadata")
+ @ConstraintsPopulatorFactory(AllowedTxSupportMetaData.class)
public TxSupportMetaData getTransactionSupportMetaData()
{
return txSupportMetaData;
Modified: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/XADataSourceMetaData.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/XADataSourceMetaData.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/deployer/support/XADataSourceMetaData.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -24,6 +24,7 @@
import org.jboss.managed.api.annotation.ManagementComponent;
import org.jboss.managed.api.annotation.ManagementObject;
import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ManagementPropertyFactory;
import org.jboss.managed.plugins.WritethroughManagedPropertyImpl;
/**
@@ -43,7 +44,8 @@
{
}
- @ManagementProperty(propertyFactory=WritethroughManagedPropertyImpl.class)
+ @ManagementProperty
+ @ManagementPropertyFactory(WritethroughManagedPropertyImpl.class)
public String getXaDataSourceClass()
{
return xaDataSourceClass;
@@ -54,7 +56,8 @@
this.xaDataSourceClass = xaDataSourceClass;
}
- @ManagementProperty(propertyFactory=WritethroughManagedPropertyImpl.class)
+ @ManagementProperty
+ @ManagementPropertyFactory(WritethroughManagedPropertyImpl.class)
public int getXaResourceTimeout()
{
return xaResourceTimeout;
Modified: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/support/TestAttachment.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/support/TestAttachment.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/support/TestAttachment.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -25,6 +25,10 @@
import java.util.HashMap;
import java.util.Map;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.MetaValueFactory;
+
/**
* TestAttachment.
*
@@ -36,16 +40,24 @@
/** The serialVersionUID */
private static final long serialVersionUID = 1L;
- private Map<String, Serializable> fields = new HashMap<String, Serializable>();
+ private Map<String, Object> fields = new HashMap<String, Object>();
- public Serializable getProperty(String name)
+ public Object getProperty(String name)
{
return fields.get(name);
}
- public void setProperty(String name, Serializable value)
+ public void setProperty(String name, Object value)
{
- fields.put(name, value);
+ MetaValue mv;
+ if (value instanceof MetaValue)
+ mv = (MetaValue)value;
+ else if (value instanceof Serializable)
+ mv = SimpleValueSupport.wrap((Serializable)value);
+ else
+ mv = MetaValueFactory.getInstance().create(value);
+
+ fields.put(name, mv);
}
public TestAttachment clone()
@@ -53,7 +65,7 @@
try
{
TestAttachment clone = (TestAttachment) super.clone();
- clone.fields = new HashMap<String, Serializable>(clone.fields);
+ clone.fields = new HashMap<String, Object>(clone.fields);
return clone;
}
catch (CloneNotSupportedException e)
Modified: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/support/TestFields.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/support/TestFields.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/support/TestFields.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -21,8 +21,6 @@
*/
package org.jboss.test.deployers.managed.support;
-import java.io.Serializable;
-
import org.jboss.managed.api.Fields;
/**
@@ -46,7 +44,7 @@
this.property = property;
}
- public Serializable getField(String name)
+ public Object getField(String name)
{
if (name == Fields.NAME)
return property;
@@ -55,7 +53,7 @@
return null;
}
- public void setField(String name, Serializable value)
+ public void setField(String name, Object value)
{
if (name == Fields.VALUE)
{
Copied: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/AbstractManagedObjectUnitTest.java (from rev 81615, projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/DeployerManagedObjectUnitTestCase.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/AbstractManagedObjectUnitTest.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/AbstractManagedObjectUnitTest.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,54 @@
+/*
+* 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.test.deployers.managed.test;
+
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.MetaValueFactory;
+import org.jboss.test.deployers.AbstractDeployerTest;
+
+/**
+ * AbstractManagedObjectUnitTest.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public abstract class AbstractManagedObjectUnitTest extends AbstractDeployerTest
+{
+ protected AbstractManagedObjectUnitTest(String name)
+ {
+ super(name);
+ }
+
+ protected MetaValueFactory getMetaValueFactory()
+ {
+ return MetaValueFactory.getInstance();
+ }
+
+ protected void assertEquals(Object object, MetaValue metaValue)
+ {
+ assertEquals(null, object, metaValue);
+ }
+
+ protected void assertEquals(String msg, Object object, MetaValue metaValue)
+ {
+ assertEquals(msg, object, getMetaValueFactory().unwrap(metaValue));
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/AbstractManagedObjectUnitTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/DeployerManagedDeploymentUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/DeployerManagedDeploymentUnitTestCase.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/DeployerManagedDeploymentUnitTestCase.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -41,12 +41,14 @@
import org.jboss.managed.api.factory.ManagedObjectFactory;
import org.jboss.metatype.api.types.SimpleMetaType;
import org.jboss.metatype.api.values.GenericValue;
-import org.jboss.test.deployers.AbstractDeployerTest;
+import org.jboss.metatype.api.values.MetaValue;
import org.jboss.test.deployers.deployer.support.ConnMetaData;
+import org.jboss.test.deployers.deployer.support.CustomName;
import org.jboss.test.deployers.deployer.support.DSMetaData;
import org.jboss.test.deployers.deployer.support.DSService;
import org.jboss.test.deployers.deployer.support.LocalDataSourceMetaData;
import org.jboss.test.deployers.deployer.support.MCFDeployer;
+import org.jboss.test.deployers.deployer.support.RuntimeComponentMetaData;
import org.jboss.test.deployers.deployer.support.SecMetaData;
import org.jboss.test.deployers.deployer.support.SecurityDeployment;
import org.jboss.test.deployers.deployer.support.SimpleMetaData;
@@ -54,8 +56,6 @@
import org.jboss.test.deployers.deployer.support.TestServiceMetaData;
import org.jboss.test.deployers.deployer.support.TestServiceMetaDataICF;
import org.jboss.test.deployers.deployer.support.XADataSourceMetaData;
-import org.jboss.test.deployers.deployer.support.RuntimeComponentMetaData;
-import org.jboss.test.deployers.deployer.support.CustomName;
import org.jboss.test.deployers.managed.support.MockProfileService;
/**
@@ -65,7 +65,7 @@
* @author Ales.Justin at jboss.org
* @version $Revision$
*/
-public class DeployerManagedDeploymentUnitTestCase extends AbstractDeployerTest
+public class DeployerManagedDeploymentUnitTestCase extends AbstractManagedObjectUnitTest
{
private MCFDeployer deployer = new MCFDeployer();
@@ -163,12 +163,13 @@
ManagedProperty prop = mc.getProperty("security-criteria");
assertNotNull(prop);
assertEquals(typeAttribute.getValue(), SimpleMetaData.SecurityDeploymentType.NONE);
- prop.setValue(SimpleMetaData.SecurityDeploymentType.APPLICATION);
+ SimpleMetaData.SecurityDeploymentType value = SimpleMetaData.SecurityDeploymentType.APPLICATION;
+ prop.setValue(getMetaValueFactory().create(value));
assertEquals(typeAttribute.getValue(), SimpleMetaData.SecurityDeploymentType.APPLICATION);
ManagedProperty targetProp = mc.getProperty("jndi-name");
assertNotNull(targetProp);
- targetProp.setValue("java:DefaultDS2");
+ targetProp.setValue(getMetaValueFactory().create("java:DefaultDS2"));
// test target runtime component invocation (if intendet here)
}
@@ -377,8 +378,8 @@
assertEquals("param description", "The int to multiple", constrainedIntx10Params[0].getDescription());
assertEquals("param type", SimpleMetaType.INTEGER, constrainedIntx10Params[0].getMetaType());
Object min = constrainedIntx10Params[0].getMinimumValue();
- assertEquals("param min is 0", new Integer(0), min);
- assertEquals("param min is 100", new Integer(100), constrainedIntx10Params[0].getMaximumValue());
+ assertEquals("param min is 0", 0, (MetaValue)min);
+ assertEquals("param min is 100", 100, (MetaValue)constrainedIntx10Params[0].getMaximumValue());
// Validate that the localDataMO includes the runtime properties
ManagedProperty rtp1 = localDataProps.get("runtimeProp1");
Modified: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/DeployerManagedObjectUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/DeployerManagedObjectUnitTestCase.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/DeployerManagedObjectUnitTestCase.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -41,7 +41,6 @@
import org.jboss.metatype.api.values.CollectionValue;
import org.jboss.metatype.api.values.GenericValue;
import org.jboss.metatype.api.values.MetaValue;
-import org.jboss.test.deployers.AbstractDeployerTest;
import org.jboss.test.deployers.deployer.support.AllowedDsTypes;
import org.jboss.test.deployers.deployer.support.ConnMetaData;
import org.jboss.test.deployers.deployer.support.DSMetaData;
@@ -57,7 +56,7 @@
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision: 1.1 $
*/
-public class DeployerManagedObjectUnitTestCase extends AbstractDeployerTest
+public class DeployerManagedObjectUnitTestCase extends AbstractManagedObjectUnitTest
{
private TestManagedObjectDeployer deployer = new TestManagedObjectDeployer();
@@ -82,8 +81,8 @@
// Check the default settings
assertNotNull(deployer.lastAttachment);
- assertEquals("initialString1", deployer.lastAttachment.getProperty("string1"));
- assertEquals("initialString2", deployer.lastAttachment.getProperty("string2"));
+ assertEquals("initialString1", (MetaValue)deployer.lastAttachment.getProperty("string1"));
+ assertEquals("initialString2", (MetaValue)deployer.lastAttachment.getProperty("string2"));
// Get the managed object
Map<String, ManagedObject> mos = main.getManagedObjects(context.getName());
@@ -107,7 +106,7 @@
assertEquals("initialString2", mo.getProperty("string2").getValue());
// Change a value
- mo.getProperty("string1").setValue("changedString1");
+ mo.getProperty("string1").setValue(getMetaValueFactory().create("changedString1"));
// Get the changed attachment
TestAttachment attachment = (TestAttachment) mo.getAttachment();
@@ -120,8 +119,8 @@
// Check the changed settings as seen by the deployer
assertNotNull(deployer.lastAttachment);
- assertEquals("changedString1", deployer.lastAttachment.getProperty("string1"));
- assertEquals("initialString2", deployer.lastAttachment.getProperty("string2"));
+ assertEquals("changedString1", (MetaValue)deployer.lastAttachment.getProperty("string1"));
+ assertEquals("initialString2", (MetaValue)deployer.lastAttachment.getProperty("string2"));
// TODO JBMICROCONT-181 shouldn't have to reget the managed object handles across redeploys?
mos = main.getManagedObjects(context.getName());
@@ -268,12 +267,12 @@
assertNotNull(minSize);
// Validate setting the properties
- displayName.setValue("testDSMetaDataManagedObjectFactoryInit");
- jndiName.setValue("java:TestDS");
- password.setValue("password".toCharArray());
- username.setValue("username");
- minSize.setValue(new Integer(10));
- maxSize.setValue(new Integer(100));
+ displayName.setValue(getMetaValueFactory().create("testDSMetaDataManagedObjectFactoryInit"));
+ jndiName.setValue(getMetaValueFactory().create("java:TestDS"));
+ password.setValue(getMetaValueFactory().create("password".toCharArray()));
+ username.setValue(getMetaValueFactory().create("username"));
+ minSize.setValue(getMetaValueFactory().create(10));
+ maxSize.setValue(getMetaValueFactory().create(100));
Object attachment = xaConnMO.getAttachment();
assertTrue("attachment is a XADataSourceMetaData("+attachment+")", attachment instanceof XADataSourceMetaData);
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/AliasesParserDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/AliasesParserDeployer.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/AliasesParserDeployer.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,88 @@
+/*
+ * 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.deployers.vfs.plugins.dependency;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * AliasesParserDeployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class AliasesParserDeployer extends AbstractVFSParsingDeployer<DeploymentAliases>
+{
+ public AliasesParserDeployer()
+ {
+ super(DeploymentAliases.class);
+ setName("aliases.txt");
+ }
+
+ protected DeploymentAliases parse(VFSDeploymentUnit unit, VirtualFile file, DeploymentAliases root) throws Exception
+ {
+ Set<Object> alises = new HashSet<Object>();
+ InputStream is = file.openStream();
+ try
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(is));
+ String line;
+ while ((line = br.readLine()) != null)
+ {
+ alises.add(line);
+ }
+ }
+ finally
+ {
+ try
+ {
+ is.close();
+ }
+ catch (IOException ignored)
+ {
+ }
+ }
+ return new DepoymentAliasesImpl(alises);
+ }
+
+ private class DepoymentAliasesImpl implements DeploymentAliases
+ {
+ private Set<Object> aliases;
+
+ private DepoymentAliasesImpl(Set<Object> aliases)
+ {
+ this.aliases = aliases;
+ }
+
+ public Set<Object> getAliases()
+ {
+ return aliases;
+ }
+ }
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesMetaData.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesMetaData.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesMetaData.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,67 @@
+/*
+ * 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.deployers.vfs.plugins.dependency;
+
+import java.io.Serializable;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * DependenciesMetaData.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+ at JBossXmlSchema(namespace="urn:jboss:dependency:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name="dependency")
+ at XmlType(name="dependencyType", propOrder={"items"})
+public class DependenciesMetaData implements Serializable
+{
+ private static final long serialVersionUID = 1;
+ /** The dependency items metadata */
+ private List<DependencyItemMetaData> items;
+
+ /**
+ * Get dependency metadata items.
+ *
+ * @return the dependency metadata items
+ */
+ public List<DependencyItemMetaData> getItems()
+ {
+ return items;
+ }
+
+ /**
+ * Set dependency metadata items.
+ *
+ * @param items the dependency metadata items
+ */
+ @XmlElement(name = "item", type = DependencyItemMetaData.class)
+ public void setItems(List<DependencyItemMetaData> items)
+ {
+ this.items = items;
+ }
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesMetaDataDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesMetaDataDeployer.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesMetaDataDeployer.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -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.deployers.vfs.plugins.dependency;
+
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * DependenciesMetaDataDeployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class DependenciesMetaDataDeployer extends AbstractSimpleRealDeployer<DependenciesMetaData>
+{
+ public DependenciesMetaDataDeployer()
+ {
+ super(DependenciesMetaData.class);
+ addOutput(DeploymentDependencies.class);
+ setStage(DeploymentStages.POST_PARSE);
+ }
+
+ public void deploy(DeploymentUnit unit, DependenciesMetaData deployment) throws DeploymentException
+ {
+ ControllerContext context = unit.getAttachment(ControllerContext.class);
+ if (context == null)
+ throw new DeploymentException("Missing deployment controller context: " + unit.getName());
+
+ Object contextName = context.getName();
+ unit.addAttachment(DeploymentDependencies.class, new DeploymentDependenciesImpl(contextName, deployment));
+ }
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesParserDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesParserDeployer.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependenciesParserDeployer.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,39 @@
+/*
+ * 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.deployers.vfs.plugins.dependency;
+
+import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
+
+/**
+ * DependenciesParserDeployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class DependenciesParserDeployer extends SchemaResolverDeployer<DependenciesMetaData>
+{
+ public DependenciesParserDeployer()
+ {
+ super(DependenciesMetaData.class);
+ setName("jboss-dependency.xml");
+ setRegisterWithJBossXB(true);
+ }
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependencyItemMetaData.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependencyItemMetaData.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DependencyItemMetaData.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,109 @@
+/*
+ * 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.deployers.vfs.plugins.dependency;
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ * DependencyItemMetaData.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+ at XmlRootElement(name="item")
+ at XmlType(name="itemType")
+public class DependencyItemMetaData implements Serializable
+{
+ private static final long serialVersionUID = 1;
+
+ private Object value;
+ private ControllerState whenRequired = ControllerState.DESCRIBED;
+ private ControllerState dependentState;
+
+ /**
+ * Get the value.
+ *
+ * @return the value
+ */
+ public Object getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Set the value.
+ *
+ * @param value the value
+ */
+ @XmlValue
+ public void setValue(Object value)
+ {
+ this.value = value;
+ }
+
+ /**
+ * Get when required state.
+ *
+ * @return the when required state
+ */
+ public ControllerState getWhenRequired()
+ {
+ return whenRequired;
+ }
+
+ /**
+ * Set when required state.
+ *
+ * @param whenRequired the when required state
+ */
+ @XmlAttribute(name = "whenRequired")
+ public void setWhenRequired(ControllerState whenRequired)
+ {
+ this.whenRequired = whenRequired;
+ }
+
+ /**
+ * Get dependent state.
+ *
+ * @return the dependent state
+ */
+ public ControllerState getDependentState()
+ {
+ return dependentState;
+ }
+
+ /**
+ * Set dependent state.
+ *
+ * @param dependentState the dependent state
+ */
+ @XmlAttribute(name = "dependentState")
+ public void setDependentState(ControllerState dependentState)
+ {
+ this.dependentState = dependentState;
+ }
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentAliases.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentAliases.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentAliases.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,39 @@
+/*
+ * 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.deployers.vfs.plugins.dependency;
+
+import java.util.Set;
+
+/**
+ * DeploymentAliases.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public interface DeploymentAliases
+{
+ /**
+ * Get a set of dependencies.
+ *
+ * @return the dependencies
+ */
+ Set<Object> getAliases();
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentAliasesDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentAliasesDeployer.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentAliasesDeployer.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,93 @@
+/*
+ * 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.deployers.vfs.plugins.dependency;
+
+import java.util.Set;
+
+import org.jboss.dependency.spi.Controller;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * DeploymentAliasesDeployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class DeploymentAliasesDeployer extends AbstractSimpleRealDeployer<DeploymentAliases>
+{
+ private Controller controller;
+
+ public DeploymentAliasesDeployer(Controller controller)
+ {
+ super(DeploymentAliases.class);
+ if (controller == null)
+ throw new IllegalArgumentException("Null controller");
+ this.controller = controller;
+ setStage(DeploymentStages.POST_PARSE);
+ }
+
+ public void deploy(DeploymentUnit unit, DeploymentAliases deployment) throws DeploymentException
+ {
+ Set<Object> aliases = deployment.getAliases();
+ if (aliases != null && aliases.isEmpty() == false)
+ {
+ ControllerContext context = unit.getAttachment(ControllerContext.class);
+ if (context == null)
+ throw new DeploymentException("Missing deployment controller context: " + unit.getName());
+
+ Object contextName = context.getName();
+ try
+ {
+ for (Object alias : aliases)
+ {
+ controller.addAlias(alias, contextName);
+ }
+ }
+ catch (Throwable t)
+ {
+ throw DeploymentException.rethrowAsDeploymentException("Exception adding alias.", t);
+ }
+ }
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit, DeploymentAliases deployment)
+ {
+ Set<Object> aliases = deployment.getAliases();
+ if (aliases != null && aliases.isEmpty() == false)
+ {
+ for (Object alias : aliases)
+ {
+ try
+ {
+ controller.removeAlias(alias);
+ }
+ catch (Throwable ignored)
+ {
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependencies.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependencies.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependencies.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,41 @@
+/*
+ * 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.deployers.vfs.plugins.dependency;
+
+import java.util.Set;
+
+import org.jboss.dependency.spi.DependencyItem;
+
+/**
+ * DeploymentDependencies.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public interface DeploymentDependencies
+{
+ /**
+ * Get a set of dependencies.
+ *
+ * @return the dependencies
+ */
+ Set<DependencyItem> getDependencies();
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependenciesImpl.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependenciesImpl.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependenciesImpl.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,83 @@
+/*
+ * 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.deployers.vfs.plugins.dependency;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import java.util.HashSet;
+
+import org.jboss.dependency.plugins.AbstractDependencyItem;
+import org.jboss.dependency.spi.DependencyItem;
+
+/**
+ * DeploymentDependenciesimpl.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class DeploymentDependenciesImpl implements DeploymentDependencies
+{
+ private Object name;
+ private DependenciesMetaData dmd;
+ private Set<DependencyItem> dependencies;
+
+ public DeploymentDependenciesImpl(Object name, DependenciesMetaData dmd)
+ {
+ if (name == null)
+ throw new IllegalArgumentException("Null name");
+ if (dmd == null)
+ throw new IllegalArgumentException("Null dmd");
+
+ this.name = name;
+ this.dmd = dmd;
+ }
+
+ /**
+ * Create dependency item.
+ *
+ * @param dimd the dependency metadata item
+ * @return new dependency item
+ */
+ protected DependencyItem createDependencyItem(DependencyItemMetaData dimd)
+ {
+ return new AbstractDependencyItem(name, dimd.getValue(), dimd.getWhenRequired(), dimd.getDependentState());
+ }
+
+ public Set<DependencyItem> getDependencies()
+ {
+ if (dependencies == null)
+ {
+ List<DependencyItemMetaData> dimds = dmd.getItems();
+ if (dimds != null && dimds.isEmpty() == false)
+ {
+ dependencies = new HashSet<DependencyItem>();
+ for (DependencyItemMetaData dimd : dimds)
+ dependencies.add(createDependencyItem(dimd));
+ }
+ else
+ {
+ dependencies = Collections.emptySet();
+ }
+ }
+ return dependencies;
+ }
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependencyDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependencyDeployer.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/DeploymentDependencyDeployer.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,76 @@
+/*
+ * 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.deployers.vfs.plugins.dependency;
+
+import java.util.Set;
+
+import org.jboss.dependency.spi.DependencyItem;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * DeploymentDependencyDeployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class DeploymentDependencyDeployer extends AbstractSimpleRealDeployer<DeploymentDependencies>
+{
+ public DeploymentDependencyDeployer()
+ {
+ super(DeploymentDependencies.class);
+ addInput(DeploymentAliases.class);
+ setStage(DeploymentStages.POST_PARSE);
+ }
+
+ public void deploy(DeploymentUnit unit, DeploymentDependencies deployment) throws DeploymentException
+ {
+ Set<DependencyItem> dependencies = deployment.getDependencies();
+ if (dependencies != null && dependencies.isEmpty() == false)
+ {
+ for (DependencyItem di : dependencies)
+ {
+ unit.addIDependOn(di);
+ }
+ }
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit, DeploymentDependencies deployment)
+ {
+ Set<DependencyItem> dependencies = deployment.getDependencies();
+ if (dependencies != null && dependencies.isEmpty() == false)
+ {
+ for (DependencyItem di : dependencies)
+ {
+ try
+ {
+ unit.removeIDependOn(di);
+ }
+ catch (Throwable ignored)
+ {
+ }
+ }
+ }
+ }
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/package-info.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/package-info.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/package-info.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,32 @@
+/*
+* 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.
+*/
+ at JBossXmlAdaptedTypes
+({
+ @JBossXmlAdaptedType(type=ControllerState.class, valueAdapter=ControllerStateValueAdapter.class)
+})
+package org.jboss.deployers.vfs.plugins.dependency;
+
+import org.jboss.beans.metadata.plugins.ControllerStateValueAdapter;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.xb.annotations.JBossXmlAdaptedType;
+import org.jboss.xb.annotations.JBossXmlAdaptedTypes;
+
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -24,7 +24,9 @@
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
+import org.jboss.test.deployers.vfs.annotations.AnnotationScanningTestSuite;
import org.jboss.test.deployers.vfs.classloader.ClassLoaderTestSuite;
+import org.jboss.test.deployers.vfs.dependency.DependencyTestSuite;
import org.jboss.test.deployers.vfs.deployer.bean.BeanDeployerTestSuite;
import org.jboss.test.deployers.vfs.deployer.facelets.FaceletsTestSuite;
import org.jboss.test.deployers.vfs.deployer.jaxp.JAXPDeployerTestSuite;
@@ -39,7 +41,6 @@
import org.jboss.test.deployers.vfs.structure.VFSStructureTestSuite;
import org.jboss.test.deployers.vfs.structurebuilder.VFSStructureBuilderTestSuite;
import org.jboss.test.deployers.vfs.xb.JBossXBDeployersTestSuite;
-import org.jboss.test.deployers.vfs.annotations.AnnotationScanningTestSuite;
/**
* Deployers VFS Test Suite.
@@ -75,6 +76,7 @@
suite.addTest(FaceletsTestSuite.suite());
suite.addTest(ValidateDeployerTestSuite.suite());
suite.addTest(AnnotationScanningTestSuite.suite());
+ suite.addTest(DependencyTestSuite.suite());
return suite;
}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/DependencyTestSuite.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/DependencyTestSuite.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/DependencyTestSuite.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,49 @@
+/*
+ * 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;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+import org.jboss.test.deployers.vfs.dependency.test.DependenciesTestCase;
+
+/**
+ * DependencyTestSuite.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class DependencyTestSuite extends TestSuite
+{
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("VFS Dependency Scanning Tests");
+
+ suite.addTest(DependenciesTestCase.suite());
+
+ return suite;
+ }
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/support/MockTM.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/support/MockTM.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/support/MockTM.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,29 @@
+/*
+ * 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;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class MockTM
+{
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/test/DependenciesTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/test/DependenciesTestCase.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/dependency/test/DependenciesTestCase.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,98 @@
+/*
+ * 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.test;
+
+import junit.framework.Test;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.test.deployers.BootstrapDeployersTest;
+
+/**
+ * DependenciesTestCase.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class DependenciesTestCase extends BootstrapDeployersTest
+{
+ public DependenciesTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite()
+ {
+ return suite(DependenciesTestCase.class);
+ }
+
+ protected void assertDeployment(DeploymentUnit unit, ControllerState state)
+ {
+ ControllerContext context = unit.getAttachment(ControllerContext.class);
+ assertNotNull(context);
+ assertEquals(state, context.getState());
+ }
+
+ public void testBeanDependency() throws Throwable
+ {
+ DeploymentUnit du = addDeployment("/dependency", "bean");
+ try
+ {
+ assertDeployment(du, new ControllerState("PreReal"));
+ DeploymentUnit tmDU = assertDeploy("/dependency", "support");
+ try
+ {
+ assertDeployment(du, ControllerState.INSTALLED);
+ }
+ finally
+ {
+ undeploy(tmDU);
+ }
+ }
+ finally
+ {
+ undeploy(du);
+ }
+ }
+
+ public void testModuleAndAliasDependency() throws Throwable
+ {
+ DeploymentUnit du = addDeployment("/dependency", "module");
+ try
+ {
+ assertDeployment(du, ControllerState.PRE_INSTALL);
+ DeploymentUnit aliasDU = assertDeploy("/dependency", "alias");
+ try
+ {
+ assertDeployment(aliasDU, ControllerState.INSTALLED);
+ assertDeployment(du, ControllerState.INSTALLED);
+ }
+ finally
+ {
+ undeploy(aliasDU);
+ }
+ }
+ finally
+ {
+ undeploy(du);
+ }
+ }
+}
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/SimpleAliasTester.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/SimpleAliasTester.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/SimpleAliasTester.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -30,9 +30,9 @@
*/
public class SimpleAliasTester extends SimpleAnnotated
{
- public static SimpleAnnotatedAlias factory()
+ public static SimpleAliasTester factory()
{
- return new SimpleAnnotatedAlias();
+ return new SimpleAliasTester();
}
public void setController(Controller controller)
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -181,6 +181,11 @@
{
return false;
}
+
+ public URL getRealURL() throws IOException, URISyntaxException
+ {
+ return null;
+ }
};
}
}
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/parsing/test/DeployersAltDDTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/parsing/test/DeployersAltDDTestCase.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/parsing/test/DeployersAltDDTestCase.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -28,16 +28,12 @@
import java.net.URISyntaxException;
import java.net.URL;
import java.util.List;
-import java.util.Map;
import junit.framework.Test;
-
-import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext;
import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.managed.api.ManagedObject;
import org.jboss.test.BaseTestCase;
import org.jboss.virtual.VirtualFile;
import org.jboss.virtual.spi.VFSContext;
@@ -204,6 +200,11 @@
{
return false;
}
+
+ public URL getRealURL() throws IOException, URISyntaxException
+ {
+ return null;
+ }
});
return altDD;
}
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/test/FileMatcherTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/test/FileMatcherTestCase.java 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/test/FileMatcherTestCase.java 2008-11-26 12:44:36 UTC (rev 81618)
@@ -230,6 +230,11 @@
{
return false;
}
+
+ public URL getRealURL() throws IOException, URISyntaxException
+ {
+ return null;
+ }
};
}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/alias/META-INF/aliases.txt
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/alias/META-INF/aliases.txt (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/alias/META-INF/aliases.txt 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1 @@
+my-simple-du-name
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/bean/META-INF/jboss-dependency.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/bean/META-INF/jboss-dependency.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/bean/META-INF/jboss-dependency.xml 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,4 @@
+<dependency xmlns="urn:jboss:dependency:1.0">
+ <item whenRequired="Real" dependentState="Create">TM</item>
+ <item>Barrier</item>
+</dependency>
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/module/META-INF/jboss-dependency.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/module/META-INF/jboss-dependency.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/module/META-INF/jboss-dependency.xml 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,3 @@
+<dependency xmlns="urn:jboss:dependency:1.0">
+ <item>my-simple-du-name</item>
+</dependency>
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/support/META-INF/support-jboss-beans.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/support/META-INF/support-jboss-beans.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/dependency/support/META-INF/support-jboss-beans.xml 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="TM" class="org.jboss.test.deployers.vfs.dependency.support.MockTM"/>
+ <bean name="Barrier" class="org.jboss.test.deployers.vfs.dependency.support.MockTM"/>
+</deployment>
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/test/DependenciesTestCase.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/test/DependenciesTestCase.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/dependency/test/DependenciesTestCase.xml 2008-11-26 12:44:36 UTC (rev 81618)
@@ -0,0 +1,13 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="DeploymentAliasesParserDeployer" class="org.jboss.deployers.vfs.plugins.dependency.AliasesParserDeployer"/>
+ <bean name="DependenciesParserDeployer" class="org.jboss.deployers.vfs.plugins.dependency.DependenciesParserDeployer"/>
+ <bean name="DependenciesMDDeployer" class="org.jboss.deployers.vfs.plugins.dependency.DependenciesMetaDataDeployer"/>
+ <bean name="DeploymentAliasesDeployer" class="org.jboss.deployers.vfs.plugins.dependency.DeploymentAliasesDeployer">
+ <constructor>
+ <parameter><inject bean="jboss.kernel:service=KernelController"/></parameter>
+ </constructor>
+ </bean>
+ <bean name="DeploymentDependenciesDeployer" class="org.jboss.deployers.vfs.plugins.dependency.DeploymentDependencyDeployer"/>
+
+</deployment>
Modified: projects/jboss-deployers/trunk/pom.xml
===================================================================
--- projects/jboss-deployers/trunk/pom.xml 2008-11-26 11:52:58 UTC (rev 81617)
+++ projects/jboss-deployers/trunk/pom.xml 2008-11-26 12:44:36 UTC (rev 81618)
@@ -21,17 +21,17 @@
</scm>
<properties>
- <version.jboss.man>2.0.0.CR4</version.jboss.man>
+ <version.jboss.man>2.0.0.GA</version.jboss.man>
<version.jboss.mdr>2.0.1.GA</version.jboss.mdr>
- <version.jboss.microcontainer>2.0.0.CR5</version.jboss.microcontainer>
- <version.jboss.classloader>2.0.0.CR5</version.jboss.classloader>
+ <version.jboss.microcontainer>2.0.0.GA</version.jboss.microcontainer>
+ <version.jboss.classloader>2.0.0.GA</version.jboss.classloader>
<version.jboss.classloading.spi>5.0.0.CR2</version.jboss.classloading.spi>
<version.jboss.common.core>2.2.9.GA</version.jboss.common.core>
<version.jboss.logging.spi>2.0.5.GA</version.jboss.logging.spi>
<version.jboss.logging.log4j>2.0.5.GA</version.jboss.logging.log4j>
<version.jbossxb>2.0.0.GA</version.jbossxb>
- <version.jboss.aop>2.0.0.GA</version.jboss.aop>
- <version.jboss.vfs>2.0.0.CR5</version.jboss.vfs>
+ <version.jboss.aop>2.0.0.SP1</version.jboss.aop>
+ <version.jboss.vfs>2.0.0.GA</version.jboss.vfs>
<version.org.jboss.test>1.1.1.GA</version.org.jboss.test>
<version.junit>4.4</version.junit>
<version.javassist>3.9.0.GA</version.javassist>
More information about the jboss-cvs-commits
mailing list