[jboss-cvs] JBossAS SVN: r95316 - in projects/bootstrap/trunk: api-embedded/src/main/java/org/jboss/bootstrap/api/embedded/server and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 21 13:42:26 EDT 2009
Author: ALRubinger
Date: 2009-10-21 13:42:26 -0400 (Wed, 21 Oct 2009)
New Revision: 95316
Modified:
projects/bootstrap/trunk/api-embedded/pom.xml
projects/bootstrap/trunk/api-embedded/src/main/java/org/jboss/bootstrap/api/embedded/server/JBossASEmbeddedServer.java
projects/bootstrap/trunk/build/pom.xml
projects/bootstrap/trunk/impl-embedded/pom.xml
projects/bootstrap/trunk/impl-embedded/src/main/java/org/jboss/bootstrap/impl/embedded/server/JBossASEmbeddedServerImpl.java
Log:
[JBBOOT-100] Upgrade TMPDPL dependencies for Embedded Bootstraps and make necessary code fixes alongside the API changes
Modified: projects/bootstrap/trunk/api-embedded/pom.xml
===================================================================
--- projects/bootstrap/trunk/api-embedded/pom.xml 2009-10-21 16:58:11 UTC (rev 95315)
+++ projects/bootstrap/trunk/api-embedded/pom.xml 2009-10-21 17:42:26 UTC (rev 95316)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.bootstrap</groupId>
<artifactId>jboss-bootstrap-build</artifactId>
- <version>2.0.0-alpha-3</version>
+ <version>2.0.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
@@ -40,10 +40,10 @@
<version>${version.org.jboss.bootstrap_jboss.bootstrap.api.as}</version>
</dependency>
- <!-- org.jboss.tmpdpl:tmpdpl-api -->
+ <!-- org.jboss.tmpdpl:tmpdpl-api-shrinkwrap -->
<dependency>
<groupId>org.jboss.tmpdpl</groupId>
- <artifactId>tmpdpl-api</artifactId>
+ <artifactId>tmpdpl-api-shrinkwrap</artifactId>
</dependency>
</dependencies>
Modified: projects/bootstrap/trunk/api-embedded/src/main/java/org/jboss/bootstrap/api/embedded/server/JBossASEmbeddedServer.java
===================================================================
--- projects/bootstrap/trunk/api-embedded/src/main/java/org/jboss/bootstrap/api/embedded/server/JBossASEmbeddedServer.java 2009-10-21 16:58:11 UTC (rev 95315)
+++ projects/bootstrap/trunk/api-embedded/src/main/java/org/jboss/bootstrap/api/embedded/server/JBossASEmbeddedServer.java 2009-10-21 17:42:26 UTC (rev 95316)
@@ -24,8 +24,8 @@
import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
import org.jboss.tmpdpl.api.container.Container;
+import org.jboss.tmpdpl.api.shrinkwrap.container.ArchiveContainer;
-
/**
* JBossASEmbeddedServer
*
@@ -38,7 +38,8 @@
public interface JBossASEmbeddedServer
extends
JBossASBasedServer<JBossASEmbeddedServer, JBossASServerConfig>,
- Container
+ Container,
+ ArchiveContainer
{
}
Modified: projects/bootstrap/trunk/build/pom.xml
===================================================================
--- projects/bootstrap/trunk/build/pom.xml 2009-10-21 16:58:11 UTC (rev 95315)
+++ projects/bootstrap/trunk/build/pom.xml 2009-10-21 17:42:26 UTC (rev 95316)
@@ -30,8 +30,10 @@
<version.org.jboss.logging_jboss.logging.spi>2.0.5.GA</version.org.jboss.logging_jboss.logging.spi>
<version.org.jboss.microcontainer_jboss.kernel>2.0.4.GA</version.org.jboss.microcontainer_jboss.kernel>
<version.org.jboss_jbossxb>2.0.0.GA</version.org.jboss_jbossxb>
- <version.org.jboss.tmpdpl_tmpdpl.api>0.1.0</version.org.jboss.tmpdpl_tmpdpl.api>
- <version.org.jboss.tmpdpl_tmpdpl.impl.vdf>0.1.0</version.org.jboss.tmpdpl_tmpdpl.impl.vdf>
+ <version.org.jboss.tmpdpl_tmpdpl.api>0.1.1-SNAPSHOT</version.org.jboss.tmpdpl_tmpdpl.api>
+ <version.org.jboss.tmpdpl_tmpdpl.api.shrinkwrap>0.1.1-SNAPSHOT</version.org.jboss.tmpdpl_tmpdpl.api.shrinkwrap>
+ <version.org.jboss.tmpdpl_tmpdpl.impl.vdf>0.1.1-SNAPSHOT</version.org.jboss.tmpdpl_tmpdpl.impl.vdf>
+ <version.org.jboss.tmpdpl_tmpdpl.impl.shrinkwrap>0.1.1-SNAPSHOT</version.org.jboss.tmpdpl_tmpdpl.impl.shrinkwrap>
<version.junit_junit>4.6</version.junit_junit>
</properties>
@@ -172,6 +174,11 @@
<!-- Deployable Containers (groupId and artifactId will change) -->
<dependency>
<groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-impl-shrinkwrap</artifactId>
+ <version>${version.org.jboss.tmpdpl_tmpdpl.impl.shrinkwrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.tmpdpl</groupId>
<artifactId>tmpdpl-impl-vdf</artifactId>
<version>${version.org.jboss.tmpdpl_tmpdpl.impl.vdf}</version>
</dependency>
@@ -180,6 +187,11 @@
<artifactId>tmpdpl-api</artifactId>
<version>${version.org.jboss.tmpdpl_tmpdpl.api}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-api-shrinkwrap</artifactId>
+ <version>${version.org.jboss.tmpdpl_tmpdpl.api.shrinkwrap}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
Modified: projects/bootstrap/trunk/impl-embedded/pom.xml
===================================================================
--- projects/bootstrap/trunk/impl-embedded/pom.xml 2009-10-21 16:58:11 UTC (rev 95315)
+++ projects/bootstrap/trunk/impl-embedded/pom.xml 2009-10-21 17:42:26 UTC (rev 95316)
@@ -2,13 +2,14 @@
<!--
vi:ts=2:sw=2:expandtab:
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!-- Parent -->
<parent>
<groupId>org.jboss.bootstrap</groupId>
<artifactId>jboss-bootstrap-build</artifactId>
- <version>2.0.0-alpha-1</version>
+ <version>2.0.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
@@ -26,7 +27,7 @@
<properties>
<!-- Versioning -->
- <version.org.jboss.bootstrap_jboss.bootstrap.api.embedded>2.0.0-alpha-1</version.org.jboss.bootstrap_jboss.bootstrap.api.embedded>
+ <version.org.jboss.bootstrap_jboss.bootstrap.api.embedded>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.api.embedded>
<version.org.jboss.bootstrap_jboss.bootstrap.impl.as>2.0.0-alpha-4</version.org.jboss.bootstrap_jboss.bootstrap.impl.as>
</properties>
@@ -48,6 +49,12 @@
<version>${version.org.jboss.bootstrap_jboss.bootstrap.impl.as}</version>
</dependency>
+ <!-- org.jboss.tmpdpl:tmpdpl-impl-shrinkwrap -->
+ <dependency>
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-impl-shrinkwrap</artifactId>
+ </dependency>
+
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
Modified: projects/bootstrap/trunk/impl-embedded/src/main/java/org/jboss/bootstrap/impl/embedded/server/JBossASEmbeddedServerImpl.java
===================================================================
--- projects/bootstrap/trunk/impl-embedded/src/main/java/org/jboss/bootstrap/impl/embedded/server/JBossASEmbeddedServerImpl.java 2009-10-21 16:58:11 UTC (rev 95315)
+++ projects/bootstrap/trunk/impl-embedded/src/main/java/org/jboss/bootstrap/impl/embedded/server/JBossASEmbeddedServerImpl.java 2009-10-21 17:42:26 UTC (rev 95316)
@@ -46,7 +46,7 @@
import org.jboss.shrinkwrap.api.Archive;
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.api.shrinkwrap.container.deployable.DeployableArchiveFactory;
import org.jboss.tmpdpl.spi.vdf.VdfDeployable;
/**
@@ -96,6 +96,11 @@
*/
private final Map<Deployable, Deployment> deployableToDeploymentMap = new ConcurrentHashMap<Deployable, Deployment>();
+ /**
+ * A mapping of archives to their resultant Deployables (so we can undeploy)
+ */
+ private final Map<Archive<?>, Deployable> archiveToDeployableMap = new ConcurrentHashMap<Archive<?>, Deployable>();
+
//-------------------------------------------------------------------------------------||
// Constructor ------------------------------------------------------------------------||
//-------------------------------------------------------------------------------------||
@@ -287,6 +292,13 @@
// Undeploy
this.undeploy(deployables);
+
+ // Remove each from the cache
+ for (final Archive<?> archive : archives)
+ {
+ this.getArchiveToDeployableMap().remove(archive);
+ }
+
}
//-------------------------------------------------------------------------------------||
@@ -376,7 +388,19 @@
final Collection<Deployable> deployables = new ArrayList<Deployable>();
for (final Archive<?> archive : archives)
{
- final Deployable deployable = VfsVdfDeployableImpl.create(archive);
+ // First check the mapping cache
+ final Map<Archive<?>, Deployable> archiveToDeployableMap = this.getArchiveToDeployableMap();
+ Deployable deployable = archiveToDeployableMap.get(archive);
+ // If not in the cache
+ if (deployable == null)
+ {
+ // Make a Deployable from the archive
+ deployable = DeployableArchiveFactory.createDeployable(archive);
+ // Add to the cache
+ this.getArchiveToDeployableMap().put(archive, deployable);
+ }
+
+ // Add to the Collection to be returned
deployables.add(deployable);
}
@@ -440,6 +464,7 @@
*/
// Ensure objects are specified
+ assert expectedType != null : "Expected type is required";
assert objects != null && objects.length > 0 : "At least one object must be specified";
// Ensure all objects are of expected type
@@ -515,4 +540,12 @@
{
return Collections.unmodifiableMap(deployableToDeploymentMap);
}
+
+ /**
+ * @return the archiveToDeployableMap
+ */
+ private Map<Archive<?>, Deployable> getArchiveToDeployableMap()
+ {
+ return archiveToDeployableMap;
+ }
}
More information about the jboss-cvs-commits
mailing list