[jboss-cvs] JBossAS SVN: r92051 - in projects/embedded/trunk: core and 11 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Aug 6 01:12:23 EDT 2009
Author: ALRubinger
Date: 2009-08-06 01:12:21 -0400 (Thu, 06 Aug 2009)
New Revision: 92051
Removed:
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/deployable/api/
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/deployable/impl/vdf/
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/deployable/spi/vdf/
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/virtual/api/
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/virtual/impl/base/
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/virtual/impl/jdk/
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/virtual/impl/vfs/
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/virtual/spi/jdk/
projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/incubation/virtual/spi/vfs/
projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/incubation/deployable/vfs/
projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/incubation/virtual/vfs/
Modified:
projects/embedded/trunk/build/pom.xml
projects/embedded/trunk/core/pom.xml
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/pom.xml
projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/ServerTestCase.java
Log:
[EMB-45] Consume the Deployable/Container and Archive APIs, remove the prototypes from embedded-core
Modified: projects/embedded/trunk/build/pom.xml
===================================================================
--- projects/embedded/trunk/build/pom.xml 2009-08-06 05:00:35 UTC (rev 92050)
+++ projects/embedded/trunk/build/pom.xml 2009-08-06 05:12:21 UTC (rev 92051)
@@ -28,7 +28,9 @@
<properties>
<!-- Versioning -->
- <version.junit_junit>4.6</version.junit_junit>
+ <version.junit_junit>4.6</version.junit_junit>
+ <version.org.jboss.declarchive_declarchive.impl.vfs>0.1.0-SNAPSHOT</version.org.jboss.declarchive_declarchive.impl.vfs>
+ <version.org.jboss.tmpdpl_tmpdpl.impl.vdf>0.1.0-SNAPSHOT</version.org.jboss.tmpdpl_tmpdpl.impl.vdf>
</properties>
@@ -88,7 +90,8 @@
</includes>
<forkMode>always</forkMode>
<!-- Required to bump the space for relective data like
- classes, methods, etc. EMB-41 -->
+ classes, methods, etc. EMB-41
+-->
<argLine>-XX:MaxPermSize=256m</argLine>
</configuration>
</plugin>
@@ -140,6 +143,19 @@
<version>${version.junit_junit}</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-impl-vdf</artifactId>
+ <version>${version.org.jboss.tmpdpl_tmpdpl.impl.vdf}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.declarchive</groupId>
+ <artifactId>declarchive-impl-vfs</artifactId>
+ <version>${version.org.jboss.declarchive_declarchive.impl.vfs}</version>
+ </dependency>
+
<!--
TODO: Remove
This is just until all deps for bootstrap are updated
Modified: projects/embedded/trunk/core/pom.xml
===================================================================
--- projects/embedded/trunk/core/pom.xml 2009-08-06 05:00:35 UTC (rev 92050)
+++ projects/embedded/trunk/core/pom.xml 2009-08-06 05:12:21 UTC (rev 92051)
@@ -38,7 +38,7 @@
<version.jboss.web>2.1.3.GA</version.jboss.web>
<version.jboss.messaging>1.4.3.GA</version.jboss.messaging>
<version.org.slf4j_slf4j.jboss.logging>1.0.2.GA</version.org.slf4j_slf4j.jboss.logging>
-
+
</properties>
<!-- Dependencies -->
@@ -49,6 +49,11 @@
<artifactId>junit</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-impl-vdf</artifactId>
+ </dependency>
+
<!-- AS modules and 3rdparty deps -->
<dependency>
<groupId>org.jboss.jbossas</groupId>
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-08-06 05:00:35 UTC (rev 92050)
+++ projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServer.java 2009-08-06 05:12:21 UTC (rev 92051)
@@ -23,9 +23,7 @@
import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
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;
+import org.jboss.tmpdpl.api.container.Container;
/**
* JBossASEmbeddedServer
@@ -36,51 +34,10 @@
* @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
* @version $Revision: $
*/
-public interface JBossASEmbeddedServer extends JBossASBasedServer<JBossASEmbeddedServer, JBossASServerConfig>
+public interface JBossASEmbeddedServer
+ extends
+ JBossASBasedServer<JBossASEmbeddedServer, JBossASServerConfig>,
+ Container
{
- //-------------------------------------------------------------------------------||
- // Contracts --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------||
- /**
- * Deploys the specified deployables into the server as one atomic operation.
- *
- * @param deployables
- * @throws DeploymentException
- * @throws IllegalArgumentException If no deployables were specified or the type of deployable
- * is not supported by this server
- */
- void deploy(Deployable... deployables) throws DeploymentException, IllegalArgumentException;
-
- /**
- * 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
- * @throws DeploymentException
- * @throws IllegalArgumentException If no deployables were specified or the type of deployable
- * 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-08-06 05:00:35 UTC (rev 92050)
+++ projects/embedded/trunk/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java 2009-08-06 05:12:21 UTC (rev 92051)
@@ -32,23 +32,22 @@
import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler;
import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.spi.vfs.VfsArchive;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.deployers.client.spi.Deployment;
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.jdk.VirtualJdkArchive;
-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;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.logging.Logger;
+import org.jboss.tmpdpl.api.container.DeploymentException;
+import org.jboss.tmpdpl.api.deployable.Deployable;
+import org.jboss.tmpdpl.impl.vdf.VfsVdfDeployableImpl;
+import org.jboss.tmpdpl.spi.vdf.VdfDeployable;
/**
* JBossASEmbeddedServer
@@ -159,11 +158,10 @@
//-------------------------------------------------------------------------------------||
/**
- * @see org.jboss.embedded.core.server.JBossASEmbeddedServer#deploy(org.jboss.embedded.core.incubation.deployable.api.Deployable[])
+ * @see org.jboss.tmpdpl.api.container.Container#deploy(org.jboss.tmpdpl.api.deployable.Deployable[])
*/
@Override
- public void deploy(final Deployable... deployables)
- throws org.jboss.embedded.core.incubation.deployable.api.DeploymentException, IllegalArgumentException
+ public void deploy(final Deployable... deployables) throws DeploymentException, IllegalArgumentException
{
// Precondition checks and obtain as VDF impls
final Collection<VdfDeployable> vdfDeployables = this.asVdfDeployables(deployables);
@@ -206,11 +204,10 @@
}
/**
- * @see org.jboss.embedded.core.server.JBossASEmbeddedServer#undeploy(org.jboss.embedded.core.incubation.deployable.api.Deployable[])
+ * @see org.jboss.tmpdpl.api.container.Container#undeploy(org.jboss.tmpdpl.api.deployable.Deployable[])
*/
@Override
- public void undeploy(final Deployable... deployables)
- throws org.jboss.embedded.core.incubation.deployable.api.DeploymentException, IllegalArgumentException
+ public void undeploy(final Deployable... deployables) throws DeploymentException, IllegalArgumentException
{
/*
* Precondition checks
@@ -267,10 +264,10 @@
}
/**
- * @see org.jboss.embedded.core.server.JBossASEmbeddedServer#deploy(org.jboss.embedded.core.incubation.virtual.api.VirtualArchive[])
+ * @see org.jboss.tmpdpl.api.container.Container#deploy(org.jboss.declarchive.api.Archive[])
*/
@Override
- public void deploy(final VirtualArchive... archives) throws DeploymentException, IllegalArgumentException
+ public void deploy(final Archive... archives) throws DeploymentException, IllegalArgumentException
{
// Precondition checks and obtain as array of Deployables
final Deployable[] deployables = this.asDeployableArray(archives);
@@ -280,10 +277,10 @@
}
/**
- * @see org.jboss.embedded.core.server.JBossASEmbeddedServer#undeploy(org.jboss.embedded.core.incubation.virtual.api.VirtualArchive[])
+ * @see org.jboss.tmpdpl.api.container.Container#undeploy(org.jboss.declarchive.api.Archive[])
*/
@Override
- public void undeploy(final VirtualArchive... archives) throws DeploymentException, IllegalArgumentException
+ public void undeploy(final Archive... archives) throws DeploymentException, IllegalArgumentException
{
// Precondition checks and obtain as array of Deployables
final Deployable[] deployables = this.asDeployableArray(archives);
@@ -367,14 +364,14 @@
* @throws IllegalArgumentException If the specified archives are not specified or not of acceptable
* (VFS) backing type
*/
- private Deployable[] asDeployableArray(final VirtualArchive... archives) throws IllegalArgumentException
+ private Deployable[] asDeployableArray(final Archive... archives) throws IllegalArgumentException
{
// Precondition checks and obtain as VFS archives
- final Collection<VirtualVfsArchive> vfsArchives = this.asVfsArchives(archives);
+ final Collection<VfsArchive> vfsArchives = this.asVfsArchives(archives);
// Make a deployable from each archive
final Collection<Deployable> deployables = new ArrayList<Deployable>();
- for (final VirtualVfsArchive vfsArchive : vfsArchives)
+ for (final VfsArchive vfsArchive : vfsArchives)
{
final Deployable deployable = new VfsVdfDeployableImpl(vfsArchive);
deployables.add(deployable);
@@ -429,27 +426,12 @@
* @throws IllegalArgumentException If the archives are either null, empty, or
* contain any non-VFS types
*/
- private Collection<VirtualVfsArchive> asVfsArchives(final VirtualArchive... archives)
- throws IllegalArgumentException
+ private Collection<VfsArchive> asVfsArchives(final Archive... archives) throws IllegalArgumentException
{
- return this.asExpectedTypeCollection(VirtualVfsArchive.class, archives);
+ return this.asExpectedTypeCollection(VfsArchive.class, archives);
}
/**
- * Returns a view of the specified VirtualArchive as {@link VirtualJdkArchive}s
- *
- * @param archives
- * @return
- * @throws IllegalArgumentException If the archives are either null, empty, or
- * contain any non-JDK IO types
- */
- private Collection<VirtualJdkArchive> asJdkArchives(final VirtualArchive... archives)
- throws IllegalArgumentException
- {
- return this.asExpectedTypeCollection(VirtualJdkArchive.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.
*
Modified: projects/embedded/trunk/testsuite-full-dep/pom.xml
===================================================================
--- projects/embedded/trunk/testsuite-full-dep/pom.xml 2009-08-06 05:00:35 UTC (rev 92050)
+++ projects/embedded/trunk/testsuite-full-dep/pom.xml 2009-08-06 05:12:21 UTC (rev 92051)
@@ -20,14 +20,14 @@
<name>JBossAS Embedded TestSuite for Full AS Dependency Set
</name>
<description>JBoss Application Server Embedded TestSuite with Full AS Dependency Set</description>
-
+
<!-- Properties -->
<properties>
-
+
<!-- Versioning -->
<version.org.jboss.embedded_jboss.embedded.core>0.1.0-SNAPSHOT</version.org.jboss.embedded_jboss.embedded.core>
<version.org.apache.httpcomponents_httpclient>4.0-beta2</version.org.apache.httpcomponents_httpclient>
-
+
</properties>
<!-- Dependencies -->
@@ -41,20 +41,26 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.declarchive</groupId>
+ <artifactId>declarchive-impl-vfs</artifactId>
+ <scope>test</scope>
+ </dependency>
+
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
- <!-- Apache HttpClient -->
+ <!-- Apache HttpClient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${version.org.apache.httpcomponents_httpclient}</version>
<scope>test</scope>
- </dependency>
-
+ </dependency>
+
</dependencies>
</project>
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-08-06 05:00:35 UTC (rev 92050)
+++ projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/ServerTestCase.java 2009-08-06 05:12:21 UTC (rev 92051)
@@ -54,10 +54,8 @@
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
-import org.jboss.embedded.core.incubation.deployable.api.Deployable;
-import org.jboss.embedded.core.incubation.deployable.api.DeployableFactory;
-import org.jboss.embedded.core.incubation.virtual.api.VirtualArchive;
-import org.jboss.embedded.core.incubation.virtual.api.VirtualArchiveFactory;
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.api.VfsMemoryArchiveFactory;
import org.jboss.embedded.core.server.JBossASEmbeddedServer;
import org.jboss.embedded.core.server.JBossASEmbeddedServerImpl;
import org.jboss.embedded.testsuite.fulldep.ejb3.entity.Jbossian;
@@ -68,6 +66,8 @@
import org.jboss.embedded.testsuite.fulldep.ejb3.slsb.OutputLocalBusiness;
import org.jboss.embedded.testsuite.fulldep.servlet.JspForwardingServlet;
import org.jboss.logging.Logger;
+import org.jboss.tmpdpl.api.deployable.Deployable;
+import org.jboss.tmpdpl.api.deployable.VfsVdfDeployableFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -248,10 +248,10 @@
// Make a deployment
final String name = "slsb.jar";
- final VirtualArchive archive = VirtualArchiveFactory.createVirtualArchive(name).addClasses(OutputBean.class,
+ final Archive archive = VfsMemoryArchiveFactory.createVirtualArchive(name).addClasses(OutputBean.class,
OutputLocalBusiness.class);
log.info(archive.toString(true));
- final Deployable deployable = DeployableFactory.createDeployable(archive);
+ final Deployable deployable = VfsVdfDeployableFactory.createDeployable(archive);
// Deploy
server.deploy(deployable);
@@ -297,7 +297,7 @@
final String appName = "testServletJsp";
final String name = appName + ".war";
final Class<?> servletClass = JspForwardingServlet.class;
- final VirtualArchive archive = VirtualArchiveFactory.createVirtualArchive(name).addResource(locationWebXml,
+ final Archive archive = VfsMemoryArchiveFactory.createVirtualArchive(name).addResource(locationWebXml,
newPathWebXml).addResource(locationJsp, PATH_JSP).addClass(servletClass);
log.info(archive.toString(true));
@@ -351,12 +351,12 @@
// Create a virtual archive for the MDB deployment
final String name = "jms-mdb-test.jar";
- final VirtualArchive archive = VirtualArchiveFactory.createVirtualArchive(name).addClass(MessageStoringMdb.class)
+ final Archive archive = VfsMemoryArchiveFactory.createVirtualArchive(name).addClass(MessageStoringMdb.class)
.addResource(new URL(this.getBase(), PATH_QUEUE_SERVICE_XML), FILENAME_QUEUE_SERVICE_XML);
// Deploy
log.info(archive.toString(true));
- final Deployable deployable = DeployableFactory.createDeployable(archive);
+ final Deployable deployable = VfsVdfDeployableFactory.createDeployable(archive);
server.deploy(archive);
// Define a String message to send
@@ -416,10 +416,10 @@
// Create a virtual archive for DS, persistence.xml, Entity, and SLSB
final URL base = this.getBase();
- final VirtualArchive archive = VirtualArchiveFactory.createVirtualArchive("datasource-entity-test.jar")
- .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 Archive archive = VfsMemoryArchiveFactory.createVirtualArchive("datasource-entity-test.jar").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);
// Deploy
log.info(archive.toString(true));
More information about the jboss-cvs-commits
mailing list