[jboss-cvs] JBossAS SVN: r91755 - in projects/embedded/trunk: core/src/main/java/org/jboss/embedded/core/server and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 28 21:47:36 EDT 2009
Author: ALRubinger
Date: 2009-07-28 21:47:36 -0400 (Tue, 28 Jul 2009)
New Revision: 91755
Added:
projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/incubation/deployable/vfs/VfsVdfDeployableImplTestCase.java
Modified:
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/deployable/impl/vdf/VfsVdfDeployableImpl.java
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServer.java
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java
projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/ServerTestCase.java
Log:
[EMB-32] Outfit the Embedded server to directly deploy archives
Modified: projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/deployable/impl/vdf/VfsVdfDeployableImpl.java
===================================================================
--- projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/deployable/impl/vdf/VfsVdfDeployableImpl.java 2009-07-29 00:38:48 UTC (rev 91754)
+++ projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/deployable/impl/vdf/VfsVdfDeployableImpl.java 2009-07-29 01:47:36 UTC (rev 91755)
@@ -58,6 +58,11 @@
*/
private Deployment deployment;
+ /**
+ * The underlying archive; used in calculating equals() and hashCode() only
+ */
+ private VirtualVfsArchive archive;
+
//-------------------------------------------------------------------------------------||
// Constructor ------------------------------------------------------------------------||
//-------------------------------------------------------------------------------------||
@@ -85,26 +90,13 @@
throw new IllegalArgumentException("file must be obtained from the specified archive");
}
- // Init
- this.init(file);
- }
+ // Create Deployment
+ final Deployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(file);
+ log.debug("Created deployment: " + deployment);
- /**
- * Constructor
- *
- * Creates a new Deployable from the specified virtual file
- * @throws IllegalArgumentException If the file is not specified
- */
- public VfsVdfDeployableImpl(final VirtualFile file)
- {
- // Precondition check
- if (file == null)
- {
- throw new IllegalArgumentException("file must be specified");
- }
-
- // Init
- this.init(file);
+ // Set
+ this.setDeployment(deployment);
+ this.setArchive(archive);
}
//-------------------------------------------------------------------------------------||
@@ -121,42 +113,79 @@
}
//-------------------------------------------------------------------------------------||
- // Internal Helper Methods ------------------------------------------------------------||
+ // Accessors / Mutators ---------------------------------------------------------------||
//-------------------------------------------------------------------------------------||
/**
- * Initializes the deployable by creating and
- * setting a Deployers SPI Deployment.
- *
- * @param file The root of the VDF deployment
- * @throws IllegalArgumentException If the file was not specified
+ * @param deployment the deployment to set
*/
- private void init(final VirtualFile file) throws IllegalArgumentException
+ private void setDeployment(final Deployment deployment)
{
- // Precondition check
- if (file == null)
- {
- throw new IllegalArgumentException("file must be specified");
- }
+ this.deployment = deployment;
+ }
- // Create Deployment
- final Deployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(file);
- log.debug("Created deployment: " + deployment);
+ /**
+ * @return the archive
+ */
+ private VirtualVfsArchive getArchive()
+ {
+ return archive;
+ }
- // Set
- this.setDeployment(deployment);
+ /**
+ * @param archive the archive to set
+ */
+ private void setArchive(final VirtualVfsArchive archive)
+ {
+ this.archive = archive;
}
- //-------------------------------------------------------------------------------------||
- // Accessors / Mutators ---------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
+ /**
+ * Calculates the hash code for this Deployable, taking into
+ * account the hash code of the underlying virtual archive
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((archive == null) ? 0 : archive.hashCode());
+ return result;
+ }
/**
- * @param deployment the deployment to set
+ * Determines whether this reference is equal by value to
+ * the specified object. Equal if and only if the objects compared are
+ * the same type and have equal references to underlying archives.
+ * @see java.lang.Object#equals(java.lang.Object)
*/
- private void setDeployment(final Deployment deployment)
+ @Override
+ public boolean equals(final Object obj)
{
- this.deployment = deployment;
+ // Equal references are equal
+ if (this == obj)
+ return true;
+ // Specified is null cannot be equal
+ if (obj == null)
+ return false;
+ // Different types are not equal
+ if (getClass() != obj.getClass())
+ return false;
+ // Equal refs to underlying archives are equal
+ final VfsVdfDeployableImpl other = (VfsVdfDeployableImpl) obj;
+ final VirtualVfsArchive ourArchive = this.getArchive();
+ if (ourArchive == null)
+ {
+ throw new IllegalStateException("Underlying archive can never be null");
+ }
+ final VirtualVfsArchive otherArchive = other.getArchive();
+ if (ourArchive == otherArchive)
+ {
+ return true;
+ }
+ // Otherwise not equal
+ return false;
}
}
Modified: projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServer.java
===================================================================
--- projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServer.java 2009-07-29 00:38:48 UTC (rev 91754)
+++ projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServer.java 2009-07-29 01:47:36 UTC (rev 91755)
@@ -25,6 +25,7 @@
import org.jboss.bootstrap.spi.as.server.JBossASBasedServer;
import org.jboss.embedded.core.incubation.deployable.api.Deployable;
import org.jboss.embedded.core.incubation.deployable.api.DeploymentException;
+import org.jboss.embedded.core.incubation.virtual.api.VirtualArchive;
/**
* JBossASEmbeddedServer
@@ -52,7 +53,17 @@
void deploy(Deployable... deployables) throws DeploymentException, IllegalArgumentException;
/**
- * Undeploys the specified deployables into the server as one atomic operation.
+ * Deploys the specified archives into the server as one atomic operation.
+ *
+ * @param archives
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If no archives were specified or the type of archive
+ * is not supported by this server
+ */
+ void deploy(VirtualArchive... archives) throws DeploymentException, IllegalArgumentException;
+
+ /**
+ * Undeploys the specified deployables from the server as one atomic operation.
* The deployables must have been previously deployed.
*
* @param deployables
@@ -61,4 +72,15 @@
* is not supported by this server
*/
void undeploy(Deployable... deployables) throws DeploymentException, IllegalArgumentException;
+
+ /**
+ * Undeploys the specified archives from the server as one atomic operation.
+ * The archives must have been previously deployed.
+ *
+ * @param archives
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If no archives were specified or the type of archive
+ * is not supported by this server
+ */
+ void undeploy(VirtualArchive... archives) throws DeploymentException, IllegalArgumentException;
}
Modified: projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java
===================================================================
--- projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java 2009-07-29 00:38:48 UTC (rev 91754)
+++ projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java 2009-07-29 01:47:36 UTC (rev 91755)
@@ -38,7 +38,10 @@
import org.jboss.deployers.client.spi.main.MainDeployer;
import org.jboss.embedded.core.incubation.deployable.api.Deployable;
import org.jboss.embedded.core.incubation.deployable.api.DeploymentException;
+import org.jboss.embedded.core.incubation.deployable.impl.vdf.VfsVdfDeployableImpl;
import org.jboss.embedded.core.incubation.deployable.spi.vdf.VdfDeployable;
+import org.jboss.embedded.core.incubation.virtual.api.VirtualArchive;
+import org.jboss.embedded.core.incubation.virtual.spi.vfs.VirtualVfsArchive;
import org.jboss.embedded.core.lifecycle.IgnoreXbUnorderedSequenceLifecycleEventHandler;
import org.jboss.embedded.core.lifecycle.InitLoggingManagerLifecycleEventHandler;
import org.jboss.embedded.core.lifecycle.SetRmiHostnameLifecycleEventHandler;
@@ -89,9 +92,9 @@
//-------------------------------------------------------------------------------------||
/**
- * A mapping of deployable types to their resultant deployments (so we can undeploy archives)
+ * A mapping of deployable types to their resultant deployments (so we can undeploy)
*/
- private final Map<Deployable, Deployment> deployments = new ConcurrentHashMap<Deployable, Deployment>();;
+ private final Map<Deployable, Deployment> deployableToDeploymentMap = new ConcurrentHashMap<Deployable, Deployment>();
//-------------------------------------------------------------------------------------||
// Constructor ------------------------------------------------------------------------||
@@ -154,9 +157,8 @@
// Required Implementations -----------------------------------------------------------||
//-------------------------------------------------------------------------------------||
- /*
- * (non-Javadoc)
- * @see org.jboss.embedded.core.server.JBossASEmbeddedServer#deploy(org.jboss.embedded.core.incubation.deployable.spi.Deployable[])
+ /**
+ * @see org.jboss.embedded.core.server.JBossASEmbeddedServer#deploy(org.jboss.embedded.core.incubation.deployable.api.Deployable[])
*/
@Override
public void deploy(final Deployable... deployables)
@@ -194,7 +196,7 @@
}
// Add to the map (so we can undeploy the deployable later)
- this.deployments.put(vdfDeployable, deployment);
+ this.deployableToDeploymentMap.put(vdfDeployable, deployment);
}
// Process and check
@@ -202,9 +204,8 @@
}
- /*
- * (non-Javadoc)
- * @see org.jboss.embedded.core.server.JBossASEmbeddedServer#undeploy(org.jboss.embedded.core.incubation.deployable.spi.Deployable[])
+ /**
+ * @see org.jboss.embedded.core.server.JBossASEmbeddedServer#undeploy(org.jboss.embedded.core.incubation.deployable.api.Deployable[])
*/
@Override
public void undeploy(final Deployable... deployables)
@@ -227,7 +228,7 @@
// Get the deployments for each deployable
for (final Deployable deployable : deployables)
{
- final Deployment deployment = this.getDeploymentsMap().get(deployable);
+ final Deployment deployment = this.getDeployablesToDeploymentsMap().get(deployable);
if (deployment == null)
{
log.warn("Specified deployable " + deployable + " cannot be undeployed because it is not deployed.");
@@ -246,7 +247,7 @@
}
// Remove from Map
- this.deployments.remove(deployable);
+ this.deployableToDeploymentMap.remove(deployable);
}
}
@@ -255,8 +256,7 @@
}
- /*
- * (non-Javadoc)
+ /**
* @see org.jboss.bootstrap.impl.base.server.AbstractServer#getDefaultServerConfigClass()
*/
@Override
@@ -265,6 +265,32 @@
return BasicJBossASServerConfig.class;
}
+ /**
+ * @see org.jboss.embedded.core.server.JBossASEmbeddedServer#deploy(org.jboss.embedded.core.incubation.virtual.api.VirtualArchive[])
+ */
+ @Override
+ public void deploy(final VirtualArchive... archives) throws DeploymentException, IllegalArgumentException
+ {
+ // Precondition checks and obtain as array of Deployables
+ final Deployable[] deployables = this.asDeployableArray(archives);
+
+ // Deploy
+ this.deploy(deployables);
+ }
+
+ /**
+ * @see org.jboss.embedded.core.server.JBossASEmbeddedServer#undeploy(org.jboss.embedded.core.incubation.virtual.api.VirtualArchive[])
+ */
+ @Override
+ public void undeploy(final VirtualArchive... archives) throws DeploymentException, IllegalArgumentException
+ {
+ // Precondition checks and obtain as array of Deployables
+ final Deployable[] deployables = this.asDeployableArray(archives);
+
+ // Undeploy
+ this.undeploy(deployables);
+ }
+
//-------------------------------------------------------------------------------------||
// Internal Helper Methods ------------------------------------------------------------||
//-------------------------------------------------------------------------------------||
@@ -333,6 +359,32 @@
}
/**
+ * Obtains the specified archives as an array of
+ * Deployables
+ *
+ * @param archives
+ * @throws IllegalArgumentException If the specified archives are not specified or not of acceptable
+ * (VFS) backing type
+ */
+ private Deployable[] asDeployableArray(final VirtualArchive... archives) throws IllegalArgumentException
+ {
+ // Precondition checks and obtain as VFS archives
+ final Collection<VirtualVfsArchive> vfsArchives = this.asVfsArchives(archives);
+
+ // Make a deployable from each archive
+ final Collection<Deployable> deployables = new ArrayList<Deployable>();
+ for (final VirtualVfsArchive vfsArchive : vfsArchives)
+ {
+ final Deployable deployable = new VfsVdfDeployableImpl(vfsArchive);
+ deployables.add(deployable);
+ }
+
+ // Return
+ return deployables.toArray(new Deployable[]
+ {});
+ }
+
+ /**
* Obtains the MainDeployer via MC
* @return
* @deprecated EMB-39
@@ -365,41 +417,69 @@
*/
private Collection<VdfDeployable> asVdfDeployables(final Deployable... deployables) throws IllegalArgumentException
{
+ return this.asExpectedTypeCollection(VdfDeployable.class, deployables);
+ }
+
+ /**
+ * Returns a view of the specified VirtualArchive as {@link VirtualVfsArchive}s.
+ *
+ * @param archives
+ * @return
+ * @throws IllegalArgumentException If the archives are either null, empty, or
+ * contain any non-VFS types
+ */
+ private Collection<VirtualVfsArchive> asVfsArchives(final VirtualArchive... archives)
+ throws IllegalArgumentException
+ {
+ return this.asExpectedTypeCollection(VirtualVfsArchive.class, archives);
+ }
+
+ /**
+ * Obtains the specified array of objects as a Collection of the specified
+ * type. Each object in the array must be assignable to the target type.
+ *
+ * @param <T>
+ * @param expectedType
+ * @param objects
+ * @return
+ * @throws IllegalArgumentException If the objects array is null or empty, or one of the objects
+ * in the array is not assignable to the specified type
+ */
+ private <T> Collection<T> asExpectedTypeCollection(final Class<T> expectedType, final Object[] objects)
+ throws IllegalArgumentException
+ {
/*
* Precondition checks
*/
- // Ensure deployables are specified
- if (deployables == null || deployables.length == 0)
- {
- throw new IllegalArgumentException("At least one deployable must be specified");
- }
+ // Ensure objects are specified
+ assert objects != null && objects.length > 0 : "At least one object must be specified";
- // Ensure all deployables are of VDF impls
- final Collection<VdfDeployable> vdfDeployables = new ArrayList<VdfDeployable>();
+ // Ensure all objects are of expected type
+ final Collection<T> typedCollection = new ArrayList<T>();
- // Add each deployable
- for (final Deployable deployable : deployables)
+ // For each object
+ for (final Object object : objects)
{
- // Is VDF type Deployable?
- final VdfDeployable vdfDeployable;
- if (deployable instanceof VdfDeployable)
+ // Is of expected type?
+ final T typedObject;
+ if (expectedType.isAssignableFrom(object.getClass()))
{
- vdfDeployable = (VdfDeployable) deployable;
+ typedObject = expectedType.cast(object);
}
else
{
- throw new IllegalArgumentException("Unsupported " + Deployable.class.getName() + ": " + deployable
- + "; must be of type: " + VdfDeployable.class.getName());
+ throw new IllegalArgumentException("Unsupported" + "; must be of type \"" + expectedType.getName()
+ + "\" but was " + object.getClass().getName());
}
// Add
- vdfDeployables.add(vdfDeployable);
+ typedCollection.add(typedObject);
}
// Return
- return vdfDeployables;
+ return typedCollection;
}
/**
@@ -444,9 +524,8 @@
* Returns an immutable view of the deployables/deployments map
* @return the Deployments
*/
- protected final Map<Deployable, Deployment> getDeploymentsMap()
+ protected final Map<Deployable, Deployment> getDeployablesToDeploymentsMap()
{
- return Collections.unmodifiableMap(deployments);
+ return Collections.unmodifiableMap(deployableToDeploymentMap);
}
-
}
Added: projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/incubation/deployable/vfs/VfsVdfDeployableImplTestCase.java
===================================================================
--- projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/incubation/deployable/vfs/VfsVdfDeployableImplTestCase.java (rev 0)
+++ projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/incubation/deployable/vfs/VfsVdfDeployableImplTestCase.java 2009-07-29 01:47:36 UTC (rev 91755)
@@ -0,0 +1,116 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.embedded.core.incubation.deployable.vfs;
+
+import junit.framework.Assert;
+
+import org.jboss.embedded.core.incubation.deployable.api.Deployable;
+import org.jboss.embedded.core.incubation.deployable.impl.vdf.VfsVdfDeployableImpl;
+import org.jboss.embedded.core.incubation.virtual.impl.vfs.VirtualVfsArchiveImpl;
+import org.jboss.embedded.core.incubation.virtual.spi.vfs.VirtualVfsArchive;
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VFS;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * VfsVdfDeployableImplTestCase
+ *
+ * Test Cases to ensure that that {@link VfsVdfDeployableImpl}
+ * is working as contracted
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class VfsVdfDeployableImplTestCase
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(VfsVdfDeployableImplTestCase.class);
+
+ //-------------------------------------------------------------------------------------||
+ // Lifecycle --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Initializes the Virtual File System
+ */
+ @BeforeClass
+ public static void initVfs() throws Exception
+ {
+ VFS.init();
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Tests ------------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Ensures that the equals() contract is correct; archive types
+ * are equal if and only if they have equal references to backing
+ * archives.
+ * @throws Exception
+ */
+ @Test
+ public void testEqualsAndHashCode() throws Exception
+ {
+ // Log
+ log.info("testEquals");
+
+ // Make some test archives
+ final VirtualVfsArchive archive1 = new VirtualVfsArchiveImpl("archive1");
+ final VirtualVfsArchive archive2 = new VirtualVfsArchiveImpl("archive2");
+
+ // Make some test Deployables from the archives
+ final Deployable deployable1 = new VfsVdfDeployableImpl(archive1);
+ final Deployable deployable2 = new VfsVdfDeployableImpl(archive2);
+ final Deployable deployable3 = new VfsVdfDeployableImpl(archive1);
+
+ // Test equals
+ Assert.assertTrue("Deployables pointing to same archive should be equal by value", deployable1
+ .equals(deployable3));
+ Assert.assertTrue("Deployables must be equal by symmetry; a == b then b == a", deployable3.equals(deployable1));
+ Assert.assertFalse("Deployables pointing to different archives should not be equal by value", deployable1
+ .equals(deployable2));
+ Assert.assertFalse("Deployables must not be equal to null value", deployable1.equals(null));
+
+ // Get hashCodes
+ final int deployable1HashCode = deployable1.hashCode();
+ final int deployable3HashCode = deployable3.hashCode();
+
+ // Test hashCodes
+ Assert.assertEquals("Deployables with equal values must have equal hash codes", deployable1HashCode,
+ deployable3HashCode);
+
+ /*
+ * Note we don't check for inequal hash codes between deployable1 and deployable2 because technically
+ * they could collide
+ */
+ }
+
+}
Modified: projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/ServerTestCase.java
===================================================================
--- projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/ServerTestCase.java 2009-07-29 00:38:48 UTC (rev 91754)
+++ projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/ServerTestCase.java 2009-07-29 01:47:36 UTC (rev 91755)
@@ -95,6 +95,7 @@
* at org.jboss.management.j2ee.deployers.ServiceModuleJSR77Deployer.deployJsr77(ServiceModuleJSR77Deployer.java:40)
* at org.jboss.management.j2ee.deployers.AbstractVFSJSR77Deployer.deployJsr77(AbstractVFSJSR77Deployer.java:46)
* at org.jboss.management.j2ee.deployers.AbstractJSR77Deployer.deploy(AbstractJSR77Deployer.java:173)
+ * 3) Heap errors while using Sun JDK 1.6.0.14 x86_64. Fine in i586 arch.
*
* @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
* @version $Revision: $
@@ -300,10 +301,9 @@
final VirtualArchive archive = VirtualArchiveFactory.createVirtualArchive(name).addResource(locationWebXml,
newPathWebXml).addResource(locationJsp, PATH_JSP).addClass(servletClass);
log.info(archive.toString(true));
- final Deployable deployable = DeployableFactory.createDeployable(archive);
// Deploy
- server.deploy(deployable);
+ server.deploy(archive);
// Get an HTTP Client
final HttpClient client = new DefaultHttpClient();
@@ -333,7 +333,7 @@
Assert.assertEquals(echoValue, line);
// Undeploy
- server.undeploy(deployable);
+ server.undeploy(archive);
}
/**
@@ -358,7 +358,7 @@
// Deploy
log.info(archive.toString(true));
final Deployable deployable = DeployableFactory.createDeployable(archive);
- server.deploy(deployable);
+ server.deploy(archive);
// Define a String message to send
final String message = "From in-JVM Test Message";
@@ -421,11 +421,10 @@
.addClasses(Jbossian.class, JbossianRegistrarLocalBusiness.class, JbossianRegistrarBean.class).addResource(
new URL(base, PATH_RESOURCE_DS_XML_EMBEDDED), FILENAME_EMBEDDED_DS).addResource(
new URL(base, PATH_RESOURCE_PERSISTENCE_XML_EMBEDDED), PATH_DESTINATION_PERSISTENCE_XML);
- final Deployable deployable = DeployableFactory.createDeployable(archive);
// Deploy
log.info(archive.toString(true));
- server.deploy(deployable);
+ server.deploy(archive);
// Make some JBossians
final Jbossian jgreene = new Jbossian("Jason T. Greene", "AS Hole", 12);
@@ -455,7 +454,7 @@
Assert.assertEquals(6, jbossians.size());
// Undeploy
- server.undeploy(deployable);
+ server.undeploy(archive);
}
//-------------------------------------------------------------------------------------||
More information about the jboss-cvs-commits
mailing list