[jboss-cvs] JBossAS SVN: r104175 - in projects/embedded/tags: 1.0.0-alpha-3 and 30 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 22 15:18:46 EDT 2010
Author: ALRubinger
Date: 2010-04-22 15:18:35 -0400 (Thu, 22 Apr 2010)
New Revision: 104175
Added:
projects/embedded/tags/1.0.0-alpha-3/
projects/embedded/tags/1.0.0-alpha-3/api/
projects/embedded/tags/1.0.0-alpha-3/api/pom.xml
projects/embedded/tags/1.0.0-alpha-3/api/src/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/Deployable.java
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/DeploymentException.java
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServer.java
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServerFactory.java
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossHomeClassLoader.java
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/SecurityActions.java
projects/embedded/tags/1.0.0-alpha-3/build/
projects/embedded/tags/1.0.0-alpha-3/build/pom.xml
projects/embedded/tags/1.0.0-alpha-3/core/
projects/embedded/tags/1.0.0-alpha-3/core/pom.xml
projects/embedded/tags/1.0.0-alpha-3/core/src/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableArchive.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableFile.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableUrl.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/IgnoreXbUnorderedSequenceLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLogManagerLevelsLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLoggingManagerLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/NoXbRepeatableParticleHandlersLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SecurityActions.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetIPv4LifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetRmiHostnameLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetSysPropIfNotSpecifiedLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/SecurityActions.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/resources/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/DeployableImplementationsUnitTest.java
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTest.java
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/ServerInitializationUnitTest.java
projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/bootstrap.xml
projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file1
projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file2
projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/log4j.xml
projects/embedded/tags/1.0.0-alpha-3/pom.xml
Removed:
projects/embedded/tags/1.0.0-alpha-3/api/
projects/embedded/tags/1.0.0-alpha-3/api/pom.xml
projects/embedded/tags/1.0.0-alpha-3/api/src/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/Deployable.java
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/DeploymentException.java
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServer.java
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServerFactory.java
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossHomeClassLoader.java
projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/SecurityActions.java
projects/embedded/tags/1.0.0-alpha-3/build/
projects/embedded/tags/1.0.0-alpha-3/build/pom.xml
projects/embedded/tags/1.0.0-alpha-3/core/
projects/embedded/tags/1.0.0-alpha-3/core/pom.xml
projects/embedded/tags/1.0.0-alpha-3/core/src/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableArchive.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableFile.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableUrl.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/IgnoreXbUnorderedSequenceLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLogManagerLevelsLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLoggingManagerLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/NoXbRepeatableParticleHandlersLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SecurityActions.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetIPv4LifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetRmiHostnameLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetSysPropIfNotSpecifiedLifecycleEventHandler.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/SecurityActions.java
projects/embedded/tags/1.0.0-alpha-3/core/src/main/resources/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/DeployableImplementationsUnitTest.java
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTest.java
projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/ServerInitializationUnitTest.java
projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/
projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/bootstrap.xml
projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file1
projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file2
projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/log4j.xml
projects/embedded/tags/1.0.0-alpha-3/pom.xml
Log:
[EMB-91] Put back the 1.0.0-alpha-3 release, it is valid
Copied: projects/embedded/tags/1.0.0-alpha-3 (from rev 104169, projects/embedded/tags/1.0.0-alpha-3)
Property changes on: projects/embedded/tags/1.0.0-alpha-3
___________________________________________________________________
Name: svn:ignore
+ target
eclipse-target
target-eclipse
bin
.settings
.classpath
.project
Copied: projects/embedded/tags/1.0.0-alpha-3/api (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api)
Property changes on: projects/embedded/tags/1.0.0-alpha-3/api
___________________________________________________________________
Name: svn:ignore
+ target
eclipse-target
target-eclipse
bin
.settings
.classpath
.project
Deleted: projects/embedded/tags/1.0.0-alpha-3/api/pom.xml
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/pom.xml 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/api/pom.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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">
-
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.embedded</groupId>
- <artifactId>jboss-embedded-build</artifactId>
- <version>1.0.0-alpha-3</version>
- <relativePath>../build/pom.xml</relativePath>
- </parent>
-
- <!-- Model Version -->
- <modelVersion>4.0.0</modelVersion>
-
- <!-- Artifact Configuration -->
- <artifactId>jboss-embedded-api</artifactId>
- <name>JBoss Embedded AS API</name>
- <description>JBoss Application Server Embedded API</description>
-
-
- <!-- Properties -->
- <properties>
-
- <!-- Versioning -->
- <version.org.jboss.bootstrap_jboss.bootstrap.api.as>2.0.0-alpha-2</version.org.jboss.bootstrap_jboss.bootstrap.api.as>
-
- </properties>
-
- <!-- Dependencies -->
- <dependencies>
-
- <!-- org.jboss.bootstrap:jboss-bootstrap-api-as -->
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-api-as</artifactId>
- <version>${version.org.jboss.bootstrap_jboss.bootstrap.api.as}</version>
- </dependency>
-
- <!-- org.jboss.shrinkwrap:shrinkwrap-api -->
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-api</artifactId>
- </dependency>
-
- </dependencies>
-</project>
Copied: projects/embedded/tags/1.0.0-alpha-3/api/pom.xml (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/pom.xml)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/pom.xml (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/api/pom.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ 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">
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.embedded</groupId>
+ <artifactId>jboss-embedded-build</artifactId>
+ <version>1.0.0-alpha-3</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Configuration -->
+ <artifactId>jboss-embedded-api</artifactId>
+ <name>JBoss Embedded AS API</name>
+ <description>JBoss Application Server Embedded API</description>
+
+
+ <!-- Properties -->
+ <properties>
+
+ <!-- Versioning -->
+ <version.org.jboss.bootstrap_jboss.bootstrap.api.as>2.0.0-alpha-2</version.org.jboss.bootstrap_jboss.bootstrap.api.as>
+
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+
+ <!-- org.jboss.bootstrap:jboss-bootstrap-api-as -->
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-api-as</artifactId>
+ <version>${version.org.jboss.bootstrap_jboss.bootstrap.api.as}</version>
+ </dependency>
+
+ <!-- org.jboss.shrinkwrap:shrinkwrap-api -->
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-api</artifactId>
+ </dependency>
+
+ </dependencies>
+</project>
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src)
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main)
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java)
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org)
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss)
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded)
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api)
Deleted: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/Deployable.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/Deployable.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/Deployable.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.embedded.api;
-
-import java.net.URL;
-
-import org.jboss.embedded.api.server.JBossASEmbeddedServer;
-
-/**
- * Represents an entity capable of being deployed into the
- * {@link JBossASEmbeddedServer}. Anything able to represent itself
- * as a {@link URL} is supported.
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface Deployable
-{
- //-------------------------------------------------------------------------------------||
- // Contracts --------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Obtains a copy of the location of the {@link Deployable};
- * multiple invocations upon this method will produce
- * different references (so that no mutable state is exported
- * to callers)
- * @return
- */
- URL getTarget();
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/Deployable.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/Deployable.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/Deployable.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/Deployable.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.embedded.api;
+
+import java.net.URL;
+
+import org.jboss.embedded.api.server.JBossASEmbeddedServer;
+
+/**
+ * Represents an entity capable of being deployed into the
+ * {@link JBossASEmbeddedServer}. Anything able to represent itself
+ * as a {@link URL} is supported.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface Deployable
+{
+ //-------------------------------------------------------------------------------------||
+ // Contracts --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Obtains a copy of the location of the {@link Deployable};
+ * multiple invocations upon this method will produce
+ * different references (so that no mutable state is exported
+ * to callers)
+ * @return
+ */
+ URL getTarget();
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/DeploymentException.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/DeploymentException.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/DeploymentException.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,92 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.embedded.api;
-
-import org.jboss.embedded.api.server.JBossASEmbeddedServer;
-
-/**
- * DeploymentException
- *
- * Indicates a problem encountered during deployment to the target
- * {@link JBossASEmbeddedServer}. The underlying error may be obtained via
- * {@link DeploymentException#getCause()}.
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class DeploymentException extends Exception
-{
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * serialVersionUID
- */
- private static final long serialVersionUID = 1L;
-
- //-------------------------------------------------------------------------------------||
- // Constructors -----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Constructs a new {@link DeploymentException} using the specified
- * message and cause
- *
- * @param message
- * @param cause
- * @throws IllegalArgumentException If the cause is not specified
- */
- public DeploymentException(final String message, final Throwable cause)
- {
- super(message, cause);
-
- // Perform assertions
- this.assertCause(cause);
- }
-
- /**
- * Constructs a new {@link DeploymentException} using the specified
- * cause
- *
- * @param cause
- * @throws IllegalArgumentException If the cause is not specified
- */
- public DeploymentException(final Throwable cause)
- {
- super(cause);
-
- // Perform assertions
- this.assertCause(cause);
- }
-
- //-------------------------------------------------------------------------------------||
- // Internal Helper Methods ------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Ensures that a cause is specified, else throws
- * {@link IllegalArgumentException}
- */
- private void assertCause(final Throwable cause)
- {
- if (cause == null)
- {
- throw new IllegalArgumentException("Cause must be specified");
- }
- }
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/DeploymentException.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/DeploymentException.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/DeploymentException.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/DeploymentException.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.embedded.api;
+
+import org.jboss.embedded.api.server.JBossASEmbeddedServer;
+
+/**
+ * DeploymentException
+ *
+ * Indicates a problem encountered during deployment to the target
+ * {@link JBossASEmbeddedServer}. The underlying error may be obtained via
+ * {@link DeploymentException#getCause()}.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class DeploymentException extends Exception
+{
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 1L;
+
+ //-------------------------------------------------------------------------------------||
+ // Constructors -----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Constructs a new {@link DeploymentException} using the specified
+ * message and cause
+ *
+ * @param message
+ * @param cause
+ * @throws IllegalArgumentException If the cause is not specified
+ */
+ public DeploymentException(final String message, final Throwable cause)
+ {
+ super(message, cause);
+
+ // Perform assertions
+ this.assertCause(cause);
+ }
+
+ /**
+ * Constructs a new {@link DeploymentException} using the specified
+ * cause
+ *
+ * @param cause
+ * @throws IllegalArgumentException If the cause is not specified
+ */
+ public DeploymentException(final Throwable cause)
+ {
+ super(cause);
+
+ // Perform assertions
+ this.assertCause(cause);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Internal Helper Methods ------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Ensures that a cause is specified, else throws
+ * {@link IllegalArgumentException}
+ */
+ private void assertCause(final Throwable cause)
+ {
+ if (cause == null)
+ {
+ throw new IllegalArgumentException("Cause must be specified");
+ }
+ }
+}
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server)
Deleted: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServer.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServer.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServer.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,128 +0,0 @@
-/*
- * 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.api.server;
-
-import java.io.File;
-import java.net.URL;
-
-import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
-import org.jboss.embedded.api.Deployable;
-import org.jboss.embedded.api.DeploymentException;
-import org.jboss.shrinkwrap.api.Archive;
-
-/**
- * JBossASEmbeddedServer
- *
- * Contract of the JBoss Application Server as seen by clients
- * wishing to embed into an existing runtime
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface JBossASEmbeddedServer extends JBossASBasedServer<JBossASEmbeddedServer, JBossASServerConfig>
-{
- //-------------------------------------------------------------------------------||
- // Contracts --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------||
-
- /**
- * Deploys the specified archives into the server as one atomic operation. Archives
- * already deployed will be ignored.
- *
- * @param archives
- * @throws DeploymentException
- * @throws IllegalArgumentException If no archives were specified
- */
- void deploy(Archive<?>... archives) throws DeploymentException, IllegalArgumentException;
-
- /**
- * Deploys the specified {@link URL}s into the server as one atomic operation. URLs
- * already deployed will be ignored.
- *
- * @param urls
- * @throws DeploymentException
- * @throws IllegalArgumentException If no urls were specified
- */
- void deploy(URL... urls) throws DeploymentException, IllegalArgumentException;
-
- /**
- * Deploys the specified {@link File}s into the server as one atomic operation. Files
- * already deployed will be ignored.
- *
- * @param files
- * @throws DeploymentException
- * @throws IllegalArgumentException If no files were specified
- */
- void deploy(File... files) throws DeploymentException, IllegalArgumentException;
-
- /**
- * Deploys the specified {@link Deployable}s into the server as one atomic operation. Deployables
- * already deployed will be ignored.
- *
- * @param deployables
- * @throws DeploymentException
- * @throws IllegalArgumentException If no deployables were specified
- */
- void deploy(Deployable... deployables) throws DeploymentException, IllegalArgumentException;
-
- /**
- * Undeploys the specified archives from the server as one atomic operation.
- * The archives must have been previously deployed, else they will be ignored.
- *
- * @param archives
- * @throws DeploymentException
- * @throws IllegalArgumentException If no archives were specified
- */
- void undeploy(Archive<?>... archives) throws DeploymentException, IllegalArgumentException;
-
- /**
- * Undeploys the specified {@link URL}s from the server as one atomic operation.
- * The URLs must have been previously deployed, else they will be ignored.
- *
- * @param urls
- * @throws DeploymentException
- * @throws IllegalArgumentException If no urls were specified
- */
- void undeploy(URL... urls) throws DeploymentException, IllegalArgumentException;
-
- /**
- * Undeploys the specified {@link File}s from the server as one atomic operation.
- * The files must have been previously deployed, else they will be ignored.
- *
- * @param files
- * @throws DeploymentException
- * @throws IllegalArgumentException If no files were specified
- */
- void undeploy(File... files) throws DeploymentException, IllegalArgumentException;
-
- /**
- * Undeploys the specified {@link Deployable}s from the server as one atomic operation.
- * The deployables must have been previously deployed, else they will be ignored.
- *
- * @param deployables
- * @throws DeploymentException
- * @throws IllegalArgumentException If no deployables were specified
- */
- void undeploy(Deployable... deployables) throws DeploymentException, IllegalArgumentException;
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServer.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServer.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServer.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServer.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,128 @@
+/*
+ * 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.api.server;
+
+import java.io.File;
+import java.net.URL;
+
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
+import org.jboss.embedded.api.Deployable;
+import org.jboss.embedded.api.DeploymentException;
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * JBossASEmbeddedServer
+ *
+ * Contract of the JBoss Application Server as seen by clients
+ * wishing to embed into an existing runtime
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface JBossASEmbeddedServer extends JBossASBasedServer<JBossASEmbeddedServer, JBossASServerConfig>
+{
+ //-------------------------------------------------------------------------------||
+ // Contracts --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * Deploys the specified archives into the server as one atomic operation. Archives
+ * already deployed will be ignored.
+ *
+ * @param archives
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If no archives were specified
+ */
+ void deploy(Archive<?>... archives) throws DeploymentException, IllegalArgumentException;
+
+ /**
+ * Deploys the specified {@link URL}s into the server as one atomic operation. URLs
+ * already deployed will be ignored.
+ *
+ * @param urls
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If no urls were specified
+ */
+ void deploy(URL... urls) throws DeploymentException, IllegalArgumentException;
+
+ /**
+ * Deploys the specified {@link File}s into the server as one atomic operation. Files
+ * already deployed will be ignored.
+ *
+ * @param files
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If no files were specified
+ */
+ void deploy(File... files) throws DeploymentException, IllegalArgumentException;
+
+ /**
+ * Deploys the specified {@link Deployable}s into the server as one atomic operation. Deployables
+ * already deployed will be ignored.
+ *
+ * @param deployables
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If no deployables were specified
+ */
+ void deploy(Deployable... deployables) throws DeploymentException, IllegalArgumentException;
+
+ /**
+ * Undeploys the specified archives from the server as one atomic operation.
+ * The archives must have been previously deployed, else they will be ignored.
+ *
+ * @param archives
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If no archives were specified
+ */
+ void undeploy(Archive<?>... archives) throws DeploymentException, IllegalArgumentException;
+
+ /**
+ * Undeploys the specified {@link URL}s from the server as one atomic operation.
+ * The URLs must have been previously deployed, else they will be ignored.
+ *
+ * @param urls
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If no urls were specified
+ */
+ void undeploy(URL... urls) throws DeploymentException, IllegalArgumentException;
+
+ /**
+ * Undeploys the specified {@link File}s from the server as one atomic operation.
+ * The files must have been previously deployed, else they will be ignored.
+ *
+ * @param files
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If no files were specified
+ */
+ void undeploy(File... files) throws DeploymentException, IllegalArgumentException;
+
+ /**
+ * Undeploys the specified {@link Deployable}s from the server as one atomic operation.
+ * The deployables must have been previously deployed, else they will be ignored.
+ *
+ * @param deployables
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If no deployables were specified
+ */
+ void undeploy(Deployable... deployables) throws DeploymentException, IllegalArgumentException;
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServerFactory.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServerFactory.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServerFactory.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,136 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.embedded.api.server;
-
-import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.api.as.server.JBossASServerFactory;
-
-/**
- * JBossASEmbeddedServerFactory
- *
- * Stateless factory used in constructing new {@link JBossASEmbeddedServer}
- * instances. Does not leak internals and allows the client compilation and
- * runtime classpath (application ClassLoader) to be free of the
- * implementation classes.
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class JBossASEmbeddedServerFactory
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * The FQN of the default server implementation class to create
- */
- private static final String DEFAULT_SERVER_IMPL_CLASS_NAME = "org.jboss.embedded.core.server.JBossASEmbeddedServerImpl";
-
- /**
- * System property denoting the location of the temp directory
- */
- private static final String SYS_PROP_TMP_DIR = "java.io.tmpdir";
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Constructor, should not be used
- *
- * @throws UnsupportedOperationException If invoked
- */
- private JBossASEmbeddedServerFactory()
- {
- // No access
- throw new UnsupportedOperationException("No instances permitted");
- }
-
- //-------------------------------------------------------------------------------------||
- // Factory Methods --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Creates a JBossASEmbeddedServer from the default implementation class name
- * {@link JBossASEmbeddedServerFactory#DEFAULT_SERVER_IMPL_CLASS_NAME}, using the
- * Thread Context ClassLoader. The returned server will additionally be created using
- * the TCCL.
- *
- * This factory method will also set up a boot.log within the system temporary
- * directory unless another location has been manually specified via the presense
- * of the system property "jboss.boot.server.log.dir".
- *
- * @return The newly-created Server
- */
- public static JBossASEmbeddedServer createServer()
- {
- return createServer(SecurityActions.getTccl());
- }
-
- /**
- * Creates a JBossASEmbeddedServer from the default implementation class name
- * {@link JBossASEmbeddedServerFactory#DEFAULT_SERVER_IMPL_CLASS_NAME}, using the
- * specified ClassLoader. The returned server will additionally be created using
- * the ClassLoader denoted.
- *
- * This factory method will also set up a boot.log within the system temporary
- * directory unless another location has been manually specified via the presense
- * of the system property "jboss.boot.server.log.dir".
- *
- * @param cl The ClassLoader used to create the new server instance
- * @throws IllegalArgumentException If the ClassLoader is null
- * @return The newly-created Server
- */
- public static JBossASEmbeddedServer createServer(final ClassLoader cl) throws IllegalArgumentException
- {
-
- /*
- * Set boot log directory to a temp directory
- */
- final String sysPropBootLogDir = "jboss.boot.server.log.dir";
- final String sysPropLogDir = JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_LOG_DIR;
- final String manualBootLogDir = SecurityActions.getSystemProperty(sysPropBootLogDir);
- final String manualLogDir = SecurityActions.getSystemProperty(sysPropLogDir);
- // If nothing's been explicitly specified
- if (manualBootLogDir == null && manualLogDir == null)
- {
- // We default it
- final String serverLogDir = SecurityActions.getSystemProperty(SYS_PROP_TMP_DIR);
- SecurityActions.setSystemProperty(sysPropBootLogDir, serverLogDir);
- System.out.println("Boot Log available in: " + serverLogDir);
- }
- // If we've got a manual log dir, use it
- else if (manualLogDir != null)
- {
- SecurityActions.setSystemProperty(sysPropBootLogDir, manualLogDir);
- }
-
- try
- {
- return JBossASServerFactory.createServer(DEFAULT_SERVER_IMPL_CLASS_NAME, cl, JBossASEmbeddedServer.class);
- }
- catch (final InstantiationException ie)
- {
- // Should really only be encountered if the impl class name above is wrong, so don't expose
- // this as a checked exception to the user, wrap in a runtime exception
- throw new RuntimeException("Server instance could not be created", ie);
- }
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServerFactory.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServerFactory.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServerFactory.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossASEmbeddedServerFactory.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,136 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.embedded.api.server;
+
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.api.as.server.JBossASServerFactory;
+
+/**
+ * JBossASEmbeddedServerFactory
+ *
+ * Stateless factory used in constructing new {@link JBossASEmbeddedServer}
+ * instances. Does not leak internals and allows the client compilation and
+ * runtime classpath (application ClassLoader) to be free of the
+ * implementation classes.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JBossASEmbeddedServerFactory
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * The FQN of the default server implementation class to create
+ */
+ private static final String DEFAULT_SERVER_IMPL_CLASS_NAME = "org.jboss.embedded.core.server.JBossASEmbeddedServerImpl";
+
+ /**
+ * System property denoting the location of the temp directory
+ */
+ private static final String SYS_PROP_TMP_DIR = "java.io.tmpdir";
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Constructor, should not be used
+ *
+ * @throws UnsupportedOperationException If invoked
+ */
+ private JBossASEmbeddedServerFactory()
+ {
+ // No access
+ throw new UnsupportedOperationException("No instances permitted");
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Factory Methods --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Creates a JBossASEmbeddedServer from the default implementation class name
+ * {@link JBossASEmbeddedServerFactory#DEFAULT_SERVER_IMPL_CLASS_NAME}, using the
+ * Thread Context ClassLoader. The returned server will additionally be created using
+ * the TCCL.
+ *
+ * This factory method will also set up a boot.log within the system temporary
+ * directory unless another location has been manually specified via the presense
+ * of the system property "jboss.boot.server.log.dir".
+ *
+ * @return The newly-created Server
+ */
+ public static JBossASEmbeddedServer createServer()
+ {
+ return createServer(SecurityActions.getTccl());
+ }
+
+ /**
+ * Creates a JBossASEmbeddedServer from the default implementation class name
+ * {@link JBossASEmbeddedServerFactory#DEFAULT_SERVER_IMPL_CLASS_NAME}, using the
+ * specified ClassLoader. The returned server will additionally be created using
+ * the ClassLoader denoted.
+ *
+ * This factory method will also set up a boot.log within the system temporary
+ * directory unless another location has been manually specified via the presense
+ * of the system property "jboss.boot.server.log.dir".
+ *
+ * @param cl The ClassLoader used to create the new server instance
+ * @throws IllegalArgumentException If the ClassLoader is null
+ * @return The newly-created Server
+ */
+ public static JBossASEmbeddedServer createServer(final ClassLoader cl) throws IllegalArgumentException
+ {
+
+ /*
+ * Set boot log directory to a temp directory
+ */
+ final String sysPropBootLogDir = "jboss.boot.server.log.dir";
+ final String sysPropLogDir = JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_LOG_DIR;
+ final String manualBootLogDir = SecurityActions.getSystemProperty(sysPropBootLogDir);
+ final String manualLogDir = SecurityActions.getSystemProperty(sysPropLogDir);
+ // If nothing's been explicitly specified
+ if (manualBootLogDir == null && manualLogDir == null)
+ {
+ // We default it
+ final String serverLogDir = SecurityActions.getSystemProperty(SYS_PROP_TMP_DIR);
+ SecurityActions.setSystemProperty(sysPropBootLogDir, serverLogDir);
+ System.out.println("Boot Log available in: " + serverLogDir);
+ }
+ // If we've got a manual log dir, use it
+ else if (manualLogDir != null)
+ {
+ SecurityActions.setSystemProperty(sysPropBootLogDir, manualLogDir);
+ }
+
+ try
+ {
+ return JBossASServerFactory.createServer(DEFAULT_SERVER_IMPL_CLASS_NAME, cl, JBossASEmbeddedServer.class);
+ }
+ catch (final InstantiationException ie)
+ {
+ // Should really only be encountered if the impl class name above is wrong, so don't expose
+ // this as a checked exception to the user, wrap in a runtime exception
+ throw new RuntimeException("Server instance could not be created", ie);
+ }
+ }
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossHomeClassLoader.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossHomeClassLoader.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossHomeClassLoader.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,232 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.embedded.api.server;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.logging.Logger;
-
-/**
- * {@link ClassLoader} implementation which is capable of booting
- * the JBoss Application Server installation located at a known
- * $JBOSS_HOME
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class JBossHomeClassLoader extends URLClassLoader
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Logger
- */
- private static final Logger log = Logger.getLogger(JBossHomeClassLoader.class.getName());
-
- /**
- * Name of the boot library directory, relative to $JBOSS_HOME
- */
- private static final String DIR_NAME_LIB = "lib/";
-
- /**
- * Libraries, relative to $JBOSS_HOME/lib, which must be visible to
- * the context ClassLoader (and the loading CL of the server)
- * in order to boot the Application Server. This is a carefully
- * pruned list in order to not leak out class references, which would
- * in turn result in {@link NoClassDefFoundError}
- */
- private static final String[] JBOSS_LIB_BOOT_LIST =
- {
- // Concurrent
- "concurrent.jar",
- // Logging
- "log4j-boot.jar",
- "jboss-logging-spi.jar",
- "jboss-logging-log4j.jar",
- "jboss-logging-jdk.jar",
- "jboss-logmanager.jar",
- "jboss-logbridge.jar",
- // Common jars
- "jboss-common-core.jar",
- "jboss-xml-binding.jar",
- // Bootstrap
- "jboss-bootstrap-spi.jar", "jboss-bootstrap-spi-as.jar", "jboss-bootstrap-spi-mc.jar",
- "jboss-bootstrap-impl-base.jar", "jboss-bootstrap-impl-as.jar", "jboss-bootstrap-impl-mc.jar",
- "jboss-bootstrap-api-as.jar",
- "jboss-bootstrap-api-mc.jar",
- "jboss-bootstrap-api.jar",
- // Microcontainer
- "javassist.jar", "jboss-reflect.jar", "jboss-mdr.jar", "jboss-dependency.jar", "jboss-kernel.jar",
- "jboss-metatype.jar",
- "jboss-managed.jar",
- // Deployers
- "jboss-deployers-core-spi.jar", "jboss-deployers-client-spi.jar", "jboss-deployers-vfs-spi.jar",
- "jboss-deployers-spi.jar", "jboss-deployers-structure-spi.jar",
- // Fixme ClassLoading
- "jboss-vfs.jar", "jboss-classloading-spi.jar", "jboss-classloader.jar", "jboss-classloading.jar",
- "jboss-classloading-vfs.jar",
- // Fixme aop
- "jboss-aop.jar", "jboss-aop-mc-int.jar", "trove.jar"};
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Constructs a new instance using the specified URLs; not exposed publicly, instead use
- * {@link JBossHomeClassLoader#newInstance(URL, URL[])} outside this class
- */
- private JBossHomeClassLoader(final URL[] urls, final ClassLoader parent) throws IllegalArgumentException,
- IllegalStateException
- {
- // Invoke super
- super(urls, parent);
- }
-
- //-------------------------------------------------------------------------------------||
- // Factory Methods --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Constructs a new instance, using the required boot libraries of the specified $JBOSS_HOME
- * as well as the the additional URLs specified (optional)
- *
- * @param jbossHome The location to JBOSS_HOME
- * @param urls Additional URLs which this ClassLoader should use; may be null
- * @param parent The parent to assign to the new ClassLoader
- * @throws IllegalArgumentException If JBOSS_HOME is not specified
- */
- public static JBossHomeClassLoader newInstance(final URL jbossHome, final URL[] urls, final ClassLoader parent)
- {
- // Precondition checks
- if (jbossHome == null)
- {
- throw new IllegalArgumentException("JBOSS_HOME must be specified");
- }
-
- // Get $JBOSS_HOME/lib URLs
- final URL[] jbossLibBootUrls = getJBossLibBootUrls(jbossHome);
-
- // Merge with the specified URLs passed in
- final URL[] merged = merge(jbossLibBootUrls, urls);
-
- // Create and return a new instance
- return new JBossHomeClassLoader(merged, parent);
- }
-
- //-------------------------------------------------------------------------------------||
- // Internal Helper Methods ------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Merges the arrays of all URLs into a unified view, with no duplicate
- * elements
- *
- * @param urls Any number of arrays to be represented as a union
- * @throws IllegalArgumentException If the URLs specified are null
- */
- private static URL[] merge(final URL[]... urls) throws IllegalArgumentException
- {
- // Precondition check
- assert urls != null : "URLs must be specified";
-
- // Create a set
- final Set<URL> urlSet = new HashSet<URL>();
-
- // Merge
- for (final URL[] current : urls)
- {
- for (final URL single : current)
- {
- urlSet.add(single);
- }
- }
-
- // Return
- return urlSet.toArray(new URL[]
- {});
-
- }
-
- /**
- * Obtains all boot libraries for which ClassLoader
- * visibility is required given the specified $JBOSS_HOME
- */
- private static URL[] getJBossLibBootUrls(final URL jbossHome)
- {
- // Get a URL to $JBOSS_HOME/lib
- final URL jbossLib;
- try
- {
- jbossLib = new URL(jbossHome, DIR_NAME_LIB);
- }
- catch (final MalformedURLException murle)
- {
- throw new RuntimeException("Error in constructing $JBOSS_HOME/lib URL", murle);
- }
-
- final Collection<URL> urls = new HashSet<URL>();
- // Add all appropriate JBOSS_HOME/lib binaries
- for (final String bootLib : JBOSS_LIB_BOOT_LIST)
- {
- final URL url;
- try
- {
- url = new URL(jbossLib, bootLib);
- }
- catch (final MalformedURLException murle)
- {
- throw new RuntimeException("Could not construct full URL for $JBOSS_HOME boot library: " + bootLib, murle);
- }
- urls.add(url);
- log.finer("Using: " + url);
-
- // Check file for existence
- final URI uri;
- try
- {
- uri = url.toURI();
- }
- catch (final URISyntaxException urise)
- {
- throw new RuntimeException(urise);
- }
- final File file = new File(uri);
- if (!file.exists())
- {
- throw new IllegalStateException("Attempting to add a library to the ClassLoader which does not exist: "
- + file + "; perhaps a corrupt $JBOSS_HOME installation? ");
- }
- }
-
- // Return
- log.fine("Using: " + urls);
- return urls.toArray(new URL[]
- {});
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossHomeClassLoader.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossHomeClassLoader.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossHomeClassLoader.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/JBossHomeClassLoader.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,232 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.embedded.api.server;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.logging.Logger;
+
+/**
+ * {@link ClassLoader} implementation which is capable of booting
+ * the JBoss Application Server installation located at a known
+ * $JBOSS_HOME
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JBossHomeClassLoader extends URLClassLoader
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(JBossHomeClassLoader.class.getName());
+
+ /**
+ * Name of the boot library directory, relative to $JBOSS_HOME
+ */
+ private static final String DIR_NAME_LIB = "lib/";
+
+ /**
+ * Libraries, relative to $JBOSS_HOME/lib, which must be visible to
+ * the context ClassLoader (and the loading CL of the server)
+ * in order to boot the Application Server. This is a carefully
+ * pruned list in order to not leak out class references, which would
+ * in turn result in {@link NoClassDefFoundError}
+ */
+ private static final String[] JBOSS_LIB_BOOT_LIST =
+ {
+ // Concurrent
+ "concurrent.jar",
+ // Logging
+ "log4j-boot.jar",
+ "jboss-logging-spi.jar",
+ "jboss-logging-log4j.jar",
+ "jboss-logging-jdk.jar",
+ "jboss-logmanager.jar",
+ "jboss-logbridge.jar",
+ // Common jars
+ "jboss-common-core.jar",
+ "jboss-xml-binding.jar",
+ // Bootstrap
+ "jboss-bootstrap-spi.jar", "jboss-bootstrap-spi-as.jar", "jboss-bootstrap-spi-mc.jar",
+ "jboss-bootstrap-impl-base.jar", "jboss-bootstrap-impl-as.jar", "jboss-bootstrap-impl-mc.jar",
+ "jboss-bootstrap-api-as.jar",
+ "jboss-bootstrap-api-mc.jar",
+ "jboss-bootstrap-api.jar",
+ // Microcontainer
+ "javassist.jar", "jboss-reflect.jar", "jboss-mdr.jar", "jboss-dependency.jar", "jboss-kernel.jar",
+ "jboss-metatype.jar",
+ "jboss-managed.jar",
+ // Deployers
+ "jboss-deployers-core-spi.jar", "jboss-deployers-client-spi.jar", "jboss-deployers-vfs-spi.jar",
+ "jboss-deployers-spi.jar", "jboss-deployers-structure-spi.jar",
+ // Fixme ClassLoading
+ "jboss-vfs.jar", "jboss-classloading-spi.jar", "jboss-classloader.jar", "jboss-classloading.jar",
+ "jboss-classloading-vfs.jar",
+ // Fixme aop
+ "jboss-aop.jar", "jboss-aop-mc-int.jar", "trove.jar"};
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Constructs a new instance using the specified URLs; not exposed publicly, instead use
+ * {@link JBossHomeClassLoader#newInstance(URL, URL[])} outside this class
+ */
+ private JBossHomeClassLoader(final URL[] urls, final ClassLoader parent) throws IllegalArgumentException,
+ IllegalStateException
+ {
+ // Invoke super
+ super(urls, parent);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Factory Methods --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Constructs a new instance, using the required boot libraries of the specified $JBOSS_HOME
+ * as well as the the additional URLs specified (optional)
+ *
+ * @param jbossHome The location to JBOSS_HOME
+ * @param urls Additional URLs which this ClassLoader should use; may be null
+ * @param parent The parent to assign to the new ClassLoader
+ * @throws IllegalArgumentException If JBOSS_HOME is not specified
+ */
+ public static JBossHomeClassLoader newInstance(final URL jbossHome, final URL[] urls, final ClassLoader parent)
+ {
+ // Precondition checks
+ if (jbossHome == null)
+ {
+ throw new IllegalArgumentException("JBOSS_HOME must be specified");
+ }
+
+ // Get $JBOSS_HOME/lib URLs
+ final URL[] jbossLibBootUrls = getJBossLibBootUrls(jbossHome);
+
+ // Merge with the specified URLs passed in
+ final URL[] merged = merge(jbossLibBootUrls, urls);
+
+ // Create and return a new instance
+ return new JBossHomeClassLoader(merged, parent);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Internal Helper Methods ------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Merges the arrays of all URLs into a unified view, with no duplicate
+ * elements
+ *
+ * @param urls Any number of arrays to be represented as a union
+ * @throws IllegalArgumentException If the URLs specified are null
+ */
+ private static URL[] merge(final URL[]... urls) throws IllegalArgumentException
+ {
+ // Precondition check
+ assert urls != null : "URLs must be specified";
+
+ // Create a set
+ final Set<URL> urlSet = new HashSet<URL>();
+
+ // Merge
+ for (final URL[] current : urls)
+ {
+ for (final URL single : current)
+ {
+ urlSet.add(single);
+ }
+ }
+
+ // Return
+ return urlSet.toArray(new URL[]
+ {});
+
+ }
+
+ /**
+ * Obtains all boot libraries for which ClassLoader
+ * visibility is required given the specified $JBOSS_HOME
+ */
+ private static URL[] getJBossLibBootUrls(final URL jbossHome)
+ {
+ // Get a URL to $JBOSS_HOME/lib
+ final URL jbossLib;
+ try
+ {
+ jbossLib = new URL(jbossHome, DIR_NAME_LIB);
+ }
+ catch (final MalformedURLException murle)
+ {
+ throw new RuntimeException("Error in constructing $JBOSS_HOME/lib URL", murle);
+ }
+
+ final Collection<URL> urls = new HashSet<URL>();
+ // Add all appropriate JBOSS_HOME/lib binaries
+ for (final String bootLib : JBOSS_LIB_BOOT_LIST)
+ {
+ final URL url;
+ try
+ {
+ url = new URL(jbossLib, bootLib);
+ }
+ catch (final MalformedURLException murle)
+ {
+ throw new RuntimeException("Could not construct full URL for $JBOSS_HOME boot library: " + bootLib, murle);
+ }
+ urls.add(url);
+ log.finer("Using: " + url);
+
+ // Check file for existence
+ final URI uri;
+ try
+ {
+ uri = url.toURI();
+ }
+ catch (final URISyntaxException urise)
+ {
+ throw new RuntimeException(urise);
+ }
+ final File file = new File(uri);
+ if (!file.exists())
+ {
+ throw new IllegalStateException("Attempting to add a library to the ClassLoader which does not exist: "
+ + file + "; perhaps a corrupt $JBOSS_HOME installation? ");
+ }
+ }
+
+ // Return
+ log.fine("Using: " + urls);
+ return urls.toArray(new URL[]
+ {});
+ }
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/SecurityActions.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/SecurityActions.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/SecurityActions.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,137 +0,0 @@
-/*
- * 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.api.server;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * SecurityActions
- *
- * Utility class for security actions, so as to provide
- * some centralization without leaking privileged actions
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-class SecurityActions
-{
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * In place to prevent instantiation
- */
- private SecurityActions()
- {
- }
-
- //-------------------------------------------------------------------------------------||
- // Protected Actions ------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Action to obtain the Thread Context ClassLoader
- */
- private enum GetTcclAction implements PrivilegedAction<ClassLoader> {
- INSTANCE;
- public ClassLoader run()
- {
- // Return the TCCL
- return Thread.currentThread().getContextClassLoader();
- }
-
- }
-
- //-------------------------------------------------------------------------------------||
- // Utility Methods --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Obtains the Thread Context ClassLoader
- *
- * @return
- */
- static ClassLoader getTccl()
- {
- return AccessController.doPrivileged(GetTcclAction.INSTANCE);
- }
-
- /**
- * Obtains the system property with the specified key
- *
- * @param key
- * @return
- * @throws IllegalArgumentException If the key is null
- */
- static String getSystemProperty(final String key) throws IllegalArgumentException
- {
- // Precondition check
- if (key == null)
- {
- throw new IllegalArgumentException("key was null");
- }
-
- // Get sysprop
- return AccessController.doPrivileged(new PrivilegedAction<String>()
- {
- public String run()
- {
- return System.getProperty(key);
- }
- });
- }
-
- /**
- * Sets the system property with the specified key and value
- *
- * @param key
- * @param value
- * @return
- * @throws IllegalArgumentException If the key or value is null
- */
- static void setSystemProperty(final String key, final String value) throws IllegalArgumentException
- {
- // Precondition check
- if (key == null)
- {
- throw new IllegalArgumentException("key was null");
- }
- if (value == null)
- {
- throw new IllegalArgumentException("value was null");
- }
-
- // Get sysprop
- AccessController.doPrivileged(new PrivilegedAction<Void>()
- {
- public Void run()
- {
- System.setProperty(key, value);
- return null;
- }
- });
- }
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/SecurityActions.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/SecurityActions.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/SecurityActions.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/api/src/main/java/org/jboss/embedded/api/server/SecurityActions.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,137 @@
+/*
+ * 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.api.server;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * SecurityActions
+ *
+ * Utility class for security actions, so as to provide
+ * some centralization without leaking privileged actions
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * In place to prevent instantiation
+ */
+ private SecurityActions()
+ {
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Protected Actions ------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Action to obtain the Thread Context ClassLoader
+ */
+ private enum GetTcclAction implements PrivilegedAction<ClassLoader> {
+ INSTANCE;
+ public ClassLoader run()
+ {
+ // Return the TCCL
+ return Thread.currentThread().getContextClassLoader();
+ }
+
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Utility Methods --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the Thread Context ClassLoader
+ *
+ * @return
+ */
+ static ClassLoader getTccl()
+ {
+ return AccessController.doPrivileged(GetTcclAction.INSTANCE);
+ }
+
+ /**
+ * Obtains the system property with the specified key
+ *
+ * @param key
+ * @return
+ * @throws IllegalArgumentException If the key is null
+ */
+ static String getSystemProperty(final String key) throws IllegalArgumentException
+ {
+ // Precondition check
+ if (key == null)
+ {
+ throw new IllegalArgumentException("key was null");
+ }
+
+ // Get sysprop
+ return AccessController.doPrivileged(new PrivilegedAction<String>()
+ {
+ public String run()
+ {
+ return System.getProperty(key);
+ }
+ });
+ }
+
+ /**
+ * Sets the system property with the specified key and value
+ *
+ * @param key
+ * @param value
+ * @return
+ * @throws IllegalArgumentException If the key or value is null
+ */
+ static void setSystemProperty(final String key, final String value) throws IllegalArgumentException
+ {
+ // Precondition check
+ if (key == null)
+ {
+ throw new IllegalArgumentException("key was null");
+ }
+ if (value == null)
+ {
+ throw new IllegalArgumentException("value was null");
+ }
+
+ // Get sysprop
+ AccessController.doPrivileged(new PrivilegedAction<Void>()
+ {
+ public Void run()
+ {
+ System.setProperty(key, value);
+ return null;
+ }
+ });
+ }
+}
Copied: projects/embedded/tags/1.0.0-alpha-3/build (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/build)
Property changes on: projects/embedded/tags/1.0.0-alpha-3/build
___________________________________________________________________
Name: svn:ignore
+ target
eclipse-target
target-eclipse
bin
.settings
.classpath
.project
Deleted: projects/embedded/tags/1.0.0-alpha-3/build/pom.xml
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/build/pom.xml 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/build/pom.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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">
-
- <!-- Parent -->
- <parent>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-parent</artifactId>
- <version>5</version>
- </parent>
-
- <!-- Model Version -->
- <modelVersion>4.0.0</modelVersion>
-
- <!-- Artifact Configuration -->
- <groupId>org.jboss.embedded</groupId>
- <artifactId>jboss-embedded-build</artifactId>
- <version>1.0.0-alpha-3</version>
- <name>JBossAS Embedded Build</name>
- <description>JBoss Application Server Embedded Build</description>
- <packaging>pom</packaging>
-
- <!-- Properties -->
- <properties>
-
- <!-- Versioning -->
- <version.junit_junit>4.7</version.junit_junit>
- <version.org.jboss.shrinkwrap>1.0.0-alpha-9</version.org.jboss.shrinkwrap>
- <version.org.jboss.bootstrap>2.1.0-alpha-4</version.org.jboss.bootstrap>
-
- </properties>
-
- <!-- SCM -->
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/embedded/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/embedded/trunk</developerConnection>
- <url>http://anonsvn.jboss.org/repos/jbossas/projects/embedded/trunk</url>
- </scm>
-
- <!-- Issues -->
- <issueManagement>
- <system>jira</system>
- <url>http://jira.jboss.com/jira/browse/EMB</url>
- </issueManagement>
-
- <!-- Build -->
- <build>
-
- <plugins>
-
- <!-- JBoss-specific Packaging -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-packaging-maven-plugin</artifactId>
- <version>2.0-beta-1</version>
- <extensions>true</extensions>
- </plugin>
-
- <!-- Compiler -->
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <showDeprecation>false</showDeprecation>
- <showWarnings>true</showWarnings>
- <optimize>true</optimize>
- <compilerVersion>1.6</compilerVersion>
- <fork>true</fork>
- <argLine>-Xmx512M</argLine>
- <executable>${JAVA_HOME}/bin/javac</executable>
- </configuration>
- </plugin>
-
- <!-- Surefire -->
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- <trimStackTrace>false</trimStackTrace>
- <printSummary>true</printSummary>
- <includes>
- <include>**/*UnitTest.java</include>
- </includes>
- <forkMode>always</forkMode>
- </configuration>
- </plugin>
-
- <!-- Maven Release Plugin Configuration -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <configuration>
- <tagBase>https://svn.jboss.org/repos/jbossas/projects/embedded/tags</tagBase>
- </configuration>
- </plugin>
-
- <!-- Enforce Maven Environment -->
- <plugin>
- <artifactId>maven-enforcer-plugin
- </artifactId>
- <executions>
- <execution>
- <id>enforce-maven-environment</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <rules>
- <requireMavenVersion>
- <version>[2.0.9,2.2.1)</version> <!-- Must be Maven 2.0.9 >= x > 2.2.1 -->
- </requireMavenVersion>
- <requireJavaVersion>
- <version>1.6.0</version> <!-- Must be JDK6 -->
- </requireJavaVersion>
- </rules>
- </configuration>
- </plugin>
-
- </plugins>
-
- </build>
-
- <!-- Dependency Management -->
- <dependencyManagement>
- <dependencies>
-
- <!-- JUnit -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${version.junit_junit}</version>
- <scope>test</scope>
- </dependency>
-
- <!-- ShrinkWrap -->
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-api</artifactId>
- <version>${version.org.jboss.shrinkwrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-impl-base</artifactId>
- <version>${version.org.jboss.shrinkwrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-spi</artifactId>
- <version>${version.org.jboss.shrinkwrap}</version>
- </dependency>
-
- <!-- org.jboss.bootstrap -->
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-api</artifactId>
- <version>${version.org.jboss.bootstrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-api-as</artifactId>
- <version>${version.org.jboss.bootstrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-api-mc</artifactId>
- <version>${version.org.jboss.bootstrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-impl-base</artifactId>
- <version>${version.org.jboss.bootstrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-impl-as</artifactId>
- <version>${version.org.jboss.bootstrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-impl-mc</artifactId>
- <version>${version.org.jboss.bootstrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-spi</artifactId>
- <version>${version.org.jboss.bootstrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-spi-as</artifactId>
- <version>${version.org.jboss.bootstrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-spi-mc</artifactId>
- <version>${version.org.jboss.bootstrap}</version>
- </dependency>
-
- </dependencies>
- </dependencyManagement>
-
-</project>
Copied: projects/embedded/tags/1.0.0-alpha-3/build/pom.xml (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/build/pom.xml)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/build/pom.xml (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/build/pom.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ 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">
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>5</version>
+ </parent>
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Configuration -->
+ <groupId>org.jboss.embedded</groupId>
+ <artifactId>jboss-embedded-build</artifactId>
+ <version>1.0.0-alpha-3</version>
+ <name>JBossAS Embedded Build</name>
+ <description>JBoss Application Server Embedded Build</description>
+ <packaging>pom</packaging>
+
+ <!-- Properties -->
+ <properties>
+
+ <!-- Versioning -->
+ <version.junit_junit>4.7</version.junit_junit>
+ <version.org.jboss.shrinkwrap>1.0.0-alpha-9</version.org.jboss.shrinkwrap>
+ <version.org.jboss.bootstrap>2.1.0-alpha-4</version.org.jboss.bootstrap>
+
+ </properties>
+
+ <!-- SCM -->
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/embedded/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/embedded/trunk</developerConnection>
+ <url>http://anonsvn.jboss.org/repos/jbossas/projects/embedded/trunk</url>
+ </scm>
+
+ <!-- Issues -->
+ <issueManagement>
+ <system>jira</system>
+ <url>http://jira.jboss.com/jira/browse/EMB</url>
+ </issueManagement>
+
+ <!-- Build -->
+ <build>
+
+ <plugins>
+
+ <!-- JBoss-specific Packaging -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-beta-1</version>
+ <extensions>true</extensions>
+ </plugin>
+
+ <!-- Compiler -->
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <showDeprecation>false</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>true</optimize>
+ <compilerVersion>1.6</compilerVersion>
+ <fork>true</fork>
+ <argLine>-Xmx512M</argLine>
+ <executable>${JAVA_HOME}/bin/javac</executable>
+ </configuration>
+ </plugin>
+
+ <!-- Surefire -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <trimStackTrace>false</trimStackTrace>
+ <printSummary>true</printSummary>
+ <includes>
+ <include>**/*UnitTest.java</include>
+ </includes>
+ <forkMode>always</forkMode>
+ </configuration>
+ </plugin>
+
+ <!-- Maven Release Plugin Configuration -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/jbossas/projects/embedded/tags</tagBase>
+ </configuration>
+ </plugin>
+
+ <!-- Enforce Maven Environment -->
+ <plugin>
+ <artifactId>maven-enforcer-plugin
+ </artifactId>
+ <executions>
+ <execution>
+ <id>enforce-maven-environment</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>[2.0.9,2.2.1)</version> <!-- Must be Maven 2.0.9 >= x > 2.2.1 -->
+ </requireMavenVersion>
+ <requireJavaVersion>
+ <version>1.6.0</version> <!-- Must be JDK6 -->
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </plugin>
+
+ </plugins>
+
+ </build>
+
+ <!-- Dependency Management -->
+ <dependencyManagement>
+ <dependencies>
+
+ <!-- JUnit -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${version.junit_junit}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- ShrinkWrap -->
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-api</artifactId>
+ <version>${version.org.jboss.shrinkwrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-impl-base</artifactId>
+ <version>${version.org.jboss.shrinkwrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-spi</artifactId>
+ <version>${version.org.jboss.shrinkwrap}</version>
+ </dependency>
+
+ <!-- org.jboss.bootstrap -->
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-api</artifactId>
+ <version>${version.org.jboss.bootstrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-api-as</artifactId>
+ <version>${version.org.jboss.bootstrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-api-mc</artifactId>
+ <version>${version.org.jboss.bootstrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-impl-base</artifactId>
+ <version>${version.org.jboss.bootstrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-impl-as</artifactId>
+ <version>${version.org.jboss.bootstrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-impl-mc</artifactId>
+ <version>${version.org.jboss.bootstrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi</artifactId>
+ <version>${version.org.jboss.bootstrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
+ <version>${version.org.jboss.bootstrap}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi-mc</artifactId>
+ <version>${version.org.jboss.bootstrap}</version>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+</project>
Copied: projects/embedded/tags/1.0.0-alpha-3/core (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core)
Property changes on: projects/embedded/tags/1.0.0-alpha-3/core
___________________________________________________________________
Name: svn:ignore
+ target
eclipse-target
target-eclipse
bin
.settings
.classpath
.project
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/pom.xml
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/pom.xml 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/pom.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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">
-
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.embedded</groupId>
- <artifactId>jboss-embedded-build</artifactId>
- <version>1.0.0-alpha-3</version>
- <relativePath>../build/pom.xml</relativePath>
- </parent>
-
- <!-- Model Version -->
- <modelVersion>4.0.0</modelVersion>
-
- <!-- Artifact Configuration -->
- <artifactId>jboss-embedded-core</artifactId>
- <name>JBoss Embedded AS Implementation Core</name>
- <description>JBoss Embedded AS Implementation Core</description>
-
- <!-- Properties -->
- <properties>
-
- <version.org.jboss.reflect>2.2.0.Alpha4</version.org.jboss.reflect>
- <version.org.jboss.deployers>2.2.0.Alpha4</version.org.jboss.deployers>
- <version.org.jboss_jboss.common.core>2.2.17.GA</version.org.jboss_jboss.common.core>
- <version.org.jboss.logging_jboss.logging>3.0.0.Beta2</version.org.jboss.logging_jboss.logging>
- <version.org.jboss.logmanager_jboss.logmanager>1.2.0.CR2</version.org.jboss.logmanager_jboss.logmanager>
-
- </properties>
-
- <!-- Dependencies -->
- <dependencies>
-
- <!-- org.jboss.embedded:jboss-embedded-api -->
- <dependency>
- <groupId>org.jboss.embedded</groupId>
- <artifactId>jboss-embedded-api</artifactId>
- <version>${version}</version>
- </dependency>
-
- <!-- org.jboss.bootstrap:jboss-bootstrap-impl-as -->
- <dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap-impl-as</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- org.jboss.deployers:jboss-deployers-vfs-spi -->
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-vfs-spi</artifactId>
- <scope>provided</scope>
- <version>${version.org.jboss.deployers}</version>
- </dependency>
-
- <!-- org.jboss:jboss-common-core -->
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- <version>${version.org.jboss_jboss.common.core}</version>
- <scope>provided</scope>
- </dependency>
-
- <!-- org.jboss.shrinkwrap -->
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-impl-base</artifactId>
- </dependency>
-
- <!-- org.jboss.logmanager -->
- <dependency>
- <groupId>org.jboss.logmanager</groupId>
- <artifactId>jboss-logmanager</artifactId>
- <version>${version.org.jboss.logmanager_jboss.logmanager}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging</artifactId>
- <version>${version.org.jboss.logging_jboss.logging}</version>
- </dependency>
-
- <!--
- Test Dependencies
- -->
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-reflect</artifactId>
- <version>${version.org.jboss.reflect}</version>
- <scope>test</scope>
- </dependency>
-
- <!-- JUnit -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
-
- </dependencies>
-</project>
Copied: projects/embedded/tags/1.0.0-alpha-3/core/pom.xml (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/pom.xml)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/pom.xml (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/pom.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ 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">
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.embedded</groupId>
+ <artifactId>jboss-embedded-build</artifactId>
+ <version>1.0.0-alpha-3</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Configuration -->
+ <artifactId>jboss-embedded-core</artifactId>
+ <name>JBoss Embedded AS Implementation Core</name>
+ <description>JBoss Embedded AS Implementation Core</description>
+
+ <!-- Properties -->
+ <properties>
+
+ <version.org.jboss.reflect>2.2.0.Alpha4</version.org.jboss.reflect>
+ <version.org.jboss.deployers>2.2.0.Alpha4</version.org.jboss.deployers>
+ <version.org.jboss_jboss.common.core>2.2.17.GA</version.org.jboss_jboss.common.core>
+ <version.org.jboss.logging_jboss.logging>3.0.0.Beta2</version.org.jboss.logging_jboss.logging>
+ <version.org.jboss.logmanager_jboss.logmanager>1.2.0.CR2</version.org.jboss.logmanager_jboss.logmanager>
+
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+
+ <!-- org.jboss.embedded:jboss-embedded-api -->
+ <dependency>
+ <groupId>org.jboss.embedded</groupId>
+ <artifactId>jboss-embedded-api</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <!-- org.jboss.bootstrap:jboss-bootstrap-impl-as -->
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-impl-as</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- org.jboss.deployers:jboss-deployers-vfs-spi -->
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <scope>provided</scope>
+ <version>${version.org.jboss.deployers}</version>
+ </dependency>
+
+ <!-- org.jboss:jboss-common-core -->
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>${version.org.jboss_jboss.common.core}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- org.jboss.shrinkwrap -->
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-impl-base</artifactId>
+ </dependency>
+
+ <!-- org.jboss.logmanager -->
+ <dependency>
+ <groupId>org.jboss.logmanager</groupId>
+ <artifactId>jboss-logmanager</artifactId>
+ <version>${version.org.jboss.logmanager_jboss.logmanager}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ <version>${version.org.jboss.logging_jboss.logging}</version>
+ </dependency>
+
+ <!--
+ Test Dependencies
+ -->
+
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-reflect</artifactId>
+ <version>${version.org.jboss.reflect}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- JUnit -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ </dependencies>
+</project>
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable)
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableArchive.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableArchive.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableArchive.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,206 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.embedded.core.deployable;
-
-import java.io.File;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Logger;
-
-import org.jboss.embedded.api.Deployable;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.exporter.ZipExporter;
-
-/**
- * {@link Deployable} view backed by a ShrinkWrap
- * {@link Archive}. Immutable and Thread-safe.
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public final class DeployableArchive implements Deployable
-{
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Logger
- */
- private static final Logger log = Logger.getLogger(DeployableArchive.class.getName());
-
- /**
- * System property denoting the location of the temp dir
- */
- private static final String SYS_PROP_TMP_DIR = "java.io.tmpdir";
-
- //-------------------------------------------------------------------------------------||
- // Instance Members -------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * The serialized view of this archive which
- * will act as the delegate
- */
- private final Deployable serializedView;
-
- /**
- * Archive from which this Deployable was created; we use
- * this in determining value equality
- */
- private final Archive<?> createdFrom;
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Creates a new {@link Deployable} backed by the specified
- * {@link Archive}
- *
- * @param archive
- * @throws IllegalArgumentException If the archive is not specified
- */
- public DeployableArchive(final Archive<?> archive) throws IllegalArgumentException
- {
- if (archive == null)
- {
- throw new IllegalArgumentException("archive must be specified");
- }
-
- /*
- * Make a temp file
- */
-
- // Get location for the new temp dir, and validate
- final String tempDirLocation = AccessController.doPrivileged(GetTempDirAction.INSTANCE);
- final File tmpDir = new File(tempDirLocation);
- if (!tmpDir.exists())
- {
- throw new IllegalStateException("Could not obtain valid temp directory: " + tmpDir.getAbsolutePath());
- }
- if (!tmpDir.isDirectory())
- {
- throw new IllegalStateException("Temp location must be a directory: " + tmpDir.getAbsolutePath());
- }
-
- // Make the new temp file
- final String name = archive.getName();
- final File tmpFile = new File(tmpDir, name);
- tmpFile.deleteOnExit();
-
- // Write the ZIP to the temp file
- archive.as(ZipExporter.class).exportZip(tmpFile, true);
-
- // Create a Deployable from the File
- final Deployable deployableFile = new DeployableFile(tmpFile);
-
- // Set
- this.createdFrom = archive;
- this.serializedView = deployableFile;
- }
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.api.Deployable#getTarget()
- */
- @Override
- public URL getTarget()
- {
- return serializedView.getTarget();
- }
-
- //-------------------------------------------------------------------------------------||
- // Inner Classes ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Privileged action to obtain the temp directory
- */
- private static enum GetTempDirAction implements PrivilegedAction<String> {
- INSTANCE;
- @Override
- public String run()
- {
- return System.getProperty(SYS_PROP_TMP_DIR);
- }
- }
-
- //-------------------------------------------------------------------------------------||
- // OVerridden Implementations ---------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * {@inheritDoc}
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((createdFrom == null) ? 0 : createdFrom.hashCode());
- return result;
- }
-
- /**
- * {@inheritDoc}
- * Value equality is based upon the underlying archive;
- * if the referents are equal, so are we.
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(final Object obj)
- {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final DeployableArchive other = (DeployableArchive) obj;
- if (createdFrom == null)
- {
- // Should never be null
- throw new IllegalStateException("Created from archive must never be null");
- }
- // If the underlying archives created from are equal, so are we
- else if (createdFrom == other.createdFrom)
- {
- return true;
- }
-
- return false;
- }
-
- /**
- * {@inheritDoc}
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString()
- {
- return this.getClass().getSimpleName() + " [archive=" + createdFrom.toString(true) + "]";
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableArchive.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableArchive.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableArchive.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableArchive.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,206 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.embedded.core.deployable;
+
+import java.io.File;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.logging.Logger;
+
+import org.jboss.embedded.api.Deployable;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.exporter.ZipExporter;
+
+/**
+ * {@link Deployable} view backed by a ShrinkWrap
+ * {@link Archive}. Immutable and Thread-safe.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public final class DeployableArchive implements Deployable
+{
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(DeployableArchive.class.getName());
+
+ /**
+ * System property denoting the location of the temp dir
+ */
+ private static final String SYS_PROP_TMP_DIR = "java.io.tmpdir";
+
+ //-------------------------------------------------------------------------------------||
+ // Instance Members -------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * The serialized view of this archive which
+ * will act as the delegate
+ */
+ private final Deployable serializedView;
+
+ /**
+ * Archive from which this Deployable was created; we use
+ * this in determining value equality
+ */
+ private final Archive<?> createdFrom;
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Creates a new {@link Deployable} backed by the specified
+ * {@link Archive}
+ *
+ * @param archive
+ * @throws IllegalArgumentException If the archive is not specified
+ */
+ public DeployableArchive(final Archive<?> archive) throws IllegalArgumentException
+ {
+ if (archive == null)
+ {
+ throw new IllegalArgumentException("archive must be specified");
+ }
+
+ /*
+ * Make a temp file
+ */
+
+ // Get location for the new temp dir, and validate
+ final String tempDirLocation = AccessController.doPrivileged(GetTempDirAction.INSTANCE);
+ final File tmpDir = new File(tempDirLocation);
+ if (!tmpDir.exists())
+ {
+ throw new IllegalStateException("Could not obtain valid temp directory: " + tmpDir.getAbsolutePath());
+ }
+ if (!tmpDir.isDirectory())
+ {
+ throw new IllegalStateException("Temp location must be a directory: " + tmpDir.getAbsolutePath());
+ }
+
+ // Make the new temp file
+ final String name = archive.getName();
+ final File tmpFile = new File(tmpDir, name);
+ tmpFile.deleteOnExit();
+
+ // Write the ZIP to the temp file
+ archive.as(ZipExporter.class).exportZip(tmpFile, true);
+
+ // Create a Deployable from the File
+ final Deployable deployableFile = new DeployableFile(tmpFile);
+
+ // Set
+ this.createdFrom = archive;
+ this.serializedView = deployableFile;
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.api.Deployable#getTarget()
+ */
+ @Override
+ public URL getTarget()
+ {
+ return serializedView.getTarget();
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Inner Classes ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Privileged action to obtain the temp directory
+ */
+ private static enum GetTempDirAction implements PrivilegedAction<String> {
+ INSTANCE;
+ @Override
+ public String run()
+ {
+ return System.getProperty(SYS_PROP_TMP_DIR);
+ }
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // OVerridden Implementations ---------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * {@inheritDoc}
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((createdFrom == null) ? 0 : createdFrom.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ * Value equality is based upon the underlying archive;
+ * if the referents are equal, so are we.
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(final Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final DeployableArchive other = (DeployableArchive) obj;
+ if (createdFrom == null)
+ {
+ // Should never be null
+ throw new IllegalStateException("Created from archive must never be null");
+ }
+ // If the underlying archives created from are equal, so are we
+ else if (createdFrom == other.createdFrom)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return this.getClass().getSimpleName() + " [archive=" + createdFrom.toString(true) + "]";
+ }
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableFile.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableFile.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableFile.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,157 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.embedded.core.deployable;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.jboss.embedded.api.Deployable;
-
-/**
- * {@link Deployable} view backed by a {@link File}.
- * Immutable and Thread-safe.
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public final class DeployableFile implements Deployable
-{
- //-------------------------------------------------------------------------------------||
- // Instance Members -------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * The backing file; used in determining
- * value equality
- */
- private final File file;
-
- /**
- * The delegate which will be representing this File as
- * a {@link Deployable}
- */
- private final Deployable delegate;
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Creates a new {@link Deployable} backed by the specified
- * {@link File}.
- *
- * @param file File or exploded directory to be represented as {@link Deployable}
- * @throws IllegalArgumentException If the file is not specified or does not exist
- */
- public DeployableFile(final File file) throws IllegalArgumentException
- {
- // Precondition checks
- if (file == null)
- {
- throw new IllegalArgumentException("file must be specified");
- }
- if (!file.exists())
- {
- throw new IllegalArgumentException("file does not exist: " + file.getAbsolutePath());
- }
-
- // Get a URL to the File
- final URL url;
- try
- {
- url = file.toURI().toURL();
- }
- catch (final MalformedURLException murle)
- {
- throw new IllegalArgumentException("URL of file is in improper form", murle);
- }
-
- // Create a deployable URL delegate
- final Deployable delegate = new DeployableUrl(url);
-
- // Set
- this.file = file;
- this.delegate = delegate;
- }
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.api.Deployable#getTarget()
- */
- @Override
- public URL getTarget()
- {
- return delegate.getTarget();
- }
-
- //-------------------------------------------------------------------------------------||
- // Overridden Implementations ---------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * {@inheritDoc}
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((file == null) ? 0 : file.hashCode());
- return result;
- }
-
- /**
- * {@inheritDoc}
- * Value equality is based upon the value equality of the underlying File
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(final Object obj)
- {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final DeployableFile other = (DeployableFile) obj;
- if (file == null)
- {
- if (other.file != null)
- return false;
- }
- else if (!file.equals(other.file))
- return false;
- return true;
- }
-
- /**
- * {@inheritDoc}
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString()
- {
- return this.getClass().getSimpleName() + " [file=" + file + "]";
- }
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableFile.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableFile.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableFile.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableFile.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,157 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.embedded.core.deployable;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.jboss.embedded.api.Deployable;
+
+/**
+ * {@link Deployable} view backed by a {@link File}.
+ * Immutable and Thread-safe.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public final class DeployableFile implements Deployable
+{
+ //-------------------------------------------------------------------------------------||
+ // Instance Members -------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * The backing file; used in determining
+ * value equality
+ */
+ private final File file;
+
+ /**
+ * The delegate which will be representing this File as
+ * a {@link Deployable}
+ */
+ private final Deployable delegate;
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Creates a new {@link Deployable} backed by the specified
+ * {@link File}.
+ *
+ * @param file File or exploded directory to be represented as {@link Deployable}
+ * @throws IllegalArgumentException If the file is not specified or does not exist
+ */
+ public DeployableFile(final File file) throws IllegalArgumentException
+ {
+ // Precondition checks
+ if (file == null)
+ {
+ throw new IllegalArgumentException("file must be specified");
+ }
+ if (!file.exists())
+ {
+ throw new IllegalArgumentException("file does not exist: " + file.getAbsolutePath());
+ }
+
+ // Get a URL to the File
+ final URL url;
+ try
+ {
+ url = file.toURI().toURL();
+ }
+ catch (final MalformedURLException murle)
+ {
+ throw new IllegalArgumentException("URL of file is in improper form", murle);
+ }
+
+ // Create a deployable URL delegate
+ final Deployable delegate = new DeployableUrl(url);
+
+ // Set
+ this.file = file;
+ this.delegate = delegate;
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.api.Deployable#getTarget()
+ */
+ @Override
+ public URL getTarget()
+ {
+ return delegate.getTarget();
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Overridden Implementations ---------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * {@inheritDoc}
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((file == null) ? 0 : file.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ * Value equality is based upon the value equality of the underlying File
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(final Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final DeployableFile other = (DeployableFile) obj;
+ if (file == null)
+ {
+ if (other.file != null)
+ return false;
+ }
+ else if (!file.equals(other.file))
+ return false;
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return this.getClass().getSimpleName() + " [file=" + file + "]";
+ }
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableUrl.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableUrl.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableUrl.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,175 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.embedded.core.deployable;
-
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.jboss.embedded.api.Deployable;
-
-/**
- * {@link Deployable} view backed by a {@link URL}.
- * Immutable and Thread-safe.
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public final class DeployableUrl implements Deployable
-{
- //-------------------------------------------------------------------------------------||
- // Instance Members -------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * The backing URL
- */
- private final URL url;
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Creates a new {@link Deployable} backed by the specified
- * {@link URL}.
- *
- * @param url URL pointing to local or remote File, or local exploded directory to be represented as {@link Deployable}
- * @throws IllegalArgumentException If the URL is not specified
- */
- public DeployableUrl(final URL url) throws IllegalArgumentException
- {
- if (url == null)
- {
- throw new IllegalArgumentException("url must be specified");
- }
-
- // Set (a defensive copy)
- this.url = copyURL(url);
- }
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.api.Deployable#getTarget()
- */
- @Override
- public URL getTarget()
- {
- return copyURL(this.url);
- }
-
- //-------------------------------------------------------------------------------------||
- // Overridden Implementations ---------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * {@inheritDoc}
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- try
- {
- result = prime * result + ((url == null) ? 0 : url.toURI().hashCode());
- }
- catch (final URISyntaxException e)
- {
- throw new RuntimeException(e);
- }
- return result;
- }
-
- /**
- * {@inheritDoc}
- * Value equality is based upon the value equality of the underlying URL
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(final Object obj)
- {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final DeployableUrl other = (DeployableUrl) obj;
- if (url == null)
- {
- if (other.url != null)
- return false;
- }
- else
- try
- {
- if (!url.toURI().equals(other.url.toURI()))
- return false;
- }
- catch (final URISyntaxException e)
- {
- throw new RuntimeException(e);
- }
- return true;
- }
-
- /**
- * {@inheritDoc}
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString()
- {
- return this.getClass().getSimpleName() + " [url=" + url.toExternalForm() + "]";
- }
-
- //-------------------------------------------------------------------------------------||
- // Internal Helper Methods ------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Copies and returns the specified URL. Used
- * to ensure we don't export mutable URLs (thread safety)
- *
- * @param url
- * @return
- */
- private static URL copyURL(final URL url)
- {
- // If null, return
- if (url == null)
- {
- return url;
- }
-
- try
- {
- // Copy
- return new URL(url.toExternalForm());
- }
- catch (MalformedURLException e)
- {
- throw new RuntimeException("Error in copying URL", e);
- }
- }
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableUrl.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableUrl.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableUrl.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/deployable/DeployableUrl.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,175 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.embedded.core.deployable;
+
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.jboss.embedded.api.Deployable;
+
+/**
+ * {@link Deployable} view backed by a {@link URL}.
+ * Immutable and Thread-safe.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public final class DeployableUrl implements Deployable
+{
+ //-------------------------------------------------------------------------------------||
+ // Instance Members -------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * The backing URL
+ */
+ private final URL url;
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Creates a new {@link Deployable} backed by the specified
+ * {@link URL}.
+ *
+ * @param url URL pointing to local or remote File, or local exploded directory to be represented as {@link Deployable}
+ * @throws IllegalArgumentException If the URL is not specified
+ */
+ public DeployableUrl(final URL url) throws IllegalArgumentException
+ {
+ if (url == null)
+ {
+ throw new IllegalArgumentException("url must be specified");
+ }
+
+ // Set (a defensive copy)
+ this.url = copyURL(url);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.api.Deployable#getTarget()
+ */
+ @Override
+ public URL getTarget()
+ {
+ return copyURL(this.url);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Overridden Implementations ---------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * {@inheritDoc}
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ try
+ {
+ result = prime * result + ((url == null) ? 0 : url.toURI().hashCode());
+ }
+ catch (final URISyntaxException e)
+ {
+ throw new RuntimeException(e);
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ * Value equality is based upon the value equality of the underlying URL
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(final Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final DeployableUrl other = (DeployableUrl) obj;
+ if (url == null)
+ {
+ if (other.url != null)
+ return false;
+ }
+ else
+ try
+ {
+ if (!url.toURI().equals(other.url.toURI()))
+ return false;
+ }
+ catch (final URISyntaxException e)
+ {
+ throw new RuntimeException(e);
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return this.getClass().getSimpleName() + " [url=" + url.toExternalForm() + "]";
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Internal Helper Methods ------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Copies and returns the specified URL. Used
+ * to ensure we don't export mutable URLs (thread safety)
+ *
+ * @param url
+ * @return
+ */
+ private static URL copyURL(final URL url)
+ {
+ // If null, return
+ if (url == null)
+ {
+ return url;
+ }
+
+ try
+ {
+ // Copy
+ return new URL(url.toExternalForm());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException("Error in copying URL", e);
+ }
+ }
+}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle)
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/IgnoreXbUnorderedSequenceLifecycleEventHandler.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/IgnoreXbUnorderedSequenceLifecycleEventHandler.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/IgnoreXbUnorderedSequenceLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,80 +0,0 @@
-/*
- * 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.lifecycle;
-
-/**
- * IgnoreXbUnorderedSequenceLifecycleEventHandler
- *
- * Lifecycle event handler which, unless otherwise specified,
- * sets the system property denoting that JBossXB should
- * ignore the order of elements when doing schema validation
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- * @deprecated Should be removed when this is no longer required by AS
- * for proper boot.
- * @see https://jira.jboss.org/jira/browse/JBAS-6924 Dependency
- * @see http://lists.jboss.org/pipermail/jboss-development/2009-May/014394.html
- */
- at Deprecated
-public class IgnoreXbUnorderedSequenceLifecycleEventHandler extends SetSysPropIfNotSpecifiedLifecycleEventHandler
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * System property telling XB whether it may ignore the order of elements, regardless of what's in the schema
- */
- private static final String SYS_PROP_XB_IGNORE_UNORDERED = "xb.builder.useUnorderedSequence";
-
- /**
- * Value for the ignore property
- */
- private static final String XB_IGNORE_VALUE = Boolean.TRUE.toString();
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /*
- * (non-Javadoc)
- * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropName()
- */
- @Override
- String getSysPropName()
- {
- return SYS_PROP_XB_IGNORE_UNORDERED;
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropValue()
- */
- @Override
- String getSysPropValue()
- {
- return XB_IGNORE_VALUE;
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/IgnoreXbUnorderedSequenceLifecycleEventHandler.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/IgnoreXbUnorderedSequenceLifecycleEventHandler.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/IgnoreXbUnorderedSequenceLifecycleEventHandler.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/IgnoreXbUnorderedSequenceLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,80 @@
+/*
+ * 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.lifecycle;
+
+/**
+ * IgnoreXbUnorderedSequenceLifecycleEventHandler
+ *
+ * Lifecycle event handler which, unless otherwise specified,
+ * sets the system property denoting that JBossXB should
+ * ignore the order of elements when doing schema validation
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ * @deprecated Should be removed when this is no longer required by AS
+ * for proper boot.
+ * @see https://jira.jboss.org/jira/browse/JBAS-6924 Dependency
+ * @see http://lists.jboss.org/pipermail/jboss-development/2009-May/014394.html
+ */
+ at Deprecated
+public class IgnoreXbUnorderedSequenceLifecycleEventHandler extends SetSysPropIfNotSpecifiedLifecycleEventHandler
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * System property telling XB whether it may ignore the order of elements, regardless of what's in the schema
+ */
+ private static final String SYS_PROP_XB_IGNORE_UNORDERED = "xb.builder.useUnorderedSequence";
+
+ /**
+ * Value for the ignore property
+ */
+ private static final String XB_IGNORE_VALUE = Boolean.TRUE.toString();
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropName()
+ */
+ @Override
+ String getSysPropName()
+ {
+ return SYS_PROP_XB_IGNORE_UNORDERED;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropValue()
+ */
+ @Override
+ String getSysPropValue()
+ {
+ return XB_IGNORE_VALUE;
+ }
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLogManagerLevelsLifecycleEventHandler.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLogManagerLevelsLifecycleEventHandler.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLogManagerLevelsLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.core.lifecycle;
-
-import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
-import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
-import org.jboss.bootstrap.api.lifecycle.LifecycleState;
-import org.jboss.logmanager.Level;
-
-/**
- * Explicitly calls upon the static initializer of
- * {@link Level} such that it may be used by the boot sequence without
- * error. Workaround for JBLOGGING-37.
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- * @deprecated Until DML can address this workaround elsewhere
- */
- at Deprecated
-public enum InitLogManagerLevelsLifecycleEventHandler implements LifecycleEventHandler {
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Singleton
- */
- INSTANCE;
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * {@inheritDoc}
- * @see org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler#handleEvent(org.jboss.bootstrap.api.lifecycle.LifecycleState)
- */
- @Override
- public void handleEvent(final LifecycleState arg0) throws LifecycleEventException
- {
- // Just init the logging system
- @SuppressWarnings("unused")
- Object obj = Level.ERROR;
-
- String pluginClass = System.getProperty("org.jboss.logging.Logger.pluginClass");
- if (pluginClass == null)
- {
- System.setProperty("org.jboss.logging.Logger.pluginClass", "org.jboss.logging.logmanager.LoggerPluginImpl");
- // disable log4j configuration, in case any early modules trigger it
- System.setProperty("log4j.defaultInitOverride", "true");
- }
-
- }
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLogManagerLevelsLifecycleEventHandler.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLogManagerLevelsLifecycleEventHandler.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLogManagerLevelsLifecycleEventHandler.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLogManagerLevelsLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.core.lifecycle;
+
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
+import org.jboss.logmanager.Level;
+
+/**
+ * Explicitly calls upon the static initializer of
+ * {@link Level} such that it may be used by the boot sequence without
+ * error. Workaround for JBLOGGING-37.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ * @deprecated Until DML can address this workaround elsewhere
+ */
+ at Deprecated
+public enum InitLogManagerLevelsLifecycleEventHandler implements LifecycleEventHandler {
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Singleton
+ */
+ INSTANCE;
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler#handleEvent(org.jboss.bootstrap.api.lifecycle.LifecycleState)
+ */
+ @Override
+ public void handleEvent(final LifecycleState arg0) throws LifecycleEventException
+ {
+ // Just init the logging system
+ @SuppressWarnings("unused")
+ Object obj = Level.ERROR;
+
+ String pluginClass = System.getProperty("org.jboss.logging.Logger.pluginClass");
+ if (pluginClass == null)
+ {
+ System.setProperty("org.jboss.logging.Logger.pluginClass", "org.jboss.logging.logmanager.LoggerPluginImpl");
+ // disable log4j configuration, in case any early modules trigger it
+ System.setProperty("log4j.defaultInitOverride", "true");
+ }
+
+ }
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLoggingManagerLifecycleEventHandler.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLoggingManagerLifecycleEventHandler.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLoggingManagerLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,77 +0,0 @@
-/*
- * 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.lifecycle;
-
-/**
- * InitLoggingManagerLifecycleEventHandler
- *
- * Lifecycle event handler which, unless otherwise specified,
- * sets the system property to initialize the JDK Logging Manager
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- * @deprecated Should be done in a jboss-beans.xml? Handled some other way? Moved to
- * Bootstrap impl-as as part of JBossASServerImpl?
- */
- at Deprecated
-public class InitLoggingManagerLifecycleEventHandler extends SetSysPropIfNotSpecifiedLifecycleEventHandler
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * System property for the logging manager
- */
- private static final String SYS_PROP_LOGGING_MANAGER = "java.util.logging.manager";
-
- /**
- * Value for the logging manager
- */
- private static final String VALUE = "org.jboss.logmanager.LogManager";
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /*
- * (non-Javadoc)
- * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropName()
- */
- @Override
- String getSysPropName()
- {
- return SYS_PROP_LOGGING_MANAGER;
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropValue()
- */
- @Override
- String getSysPropValue()
- {
- return VALUE;
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLoggingManagerLifecycleEventHandler.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLoggingManagerLifecycleEventHandler.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLoggingManagerLifecycleEventHandler.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/InitLoggingManagerLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,77 @@
+/*
+ * 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.lifecycle;
+
+/**
+ * InitLoggingManagerLifecycleEventHandler
+ *
+ * Lifecycle event handler which, unless otherwise specified,
+ * sets the system property to initialize the JDK Logging Manager
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ * @deprecated Should be done in a jboss-beans.xml? Handled some other way? Moved to
+ * Bootstrap impl-as as part of JBossASServerImpl?
+ */
+ at Deprecated
+public class InitLoggingManagerLifecycleEventHandler extends SetSysPropIfNotSpecifiedLifecycleEventHandler
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * System property for the logging manager
+ */
+ private static final String SYS_PROP_LOGGING_MANAGER = "java.util.logging.manager";
+
+ /**
+ * Value for the logging manager
+ */
+ private static final String VALUE = "org.jboss.logmanager.LogManager";
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropName()
+ */
+ @Override
+ String getSysPropName()
+ {
+ return SYS_PROP_LOGGING_MANAGER;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropValue()
+ */
+ @Override
+ String getSysPropValue()
+ {
+ return VALUE;
+ }
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/NoXbRepeatableParticleHandlersLifecycleEventHandler.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/NoXbRepeatableParticleHandlersLifecycleEventHandler.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/NoXbRepeatableParticleHandlersLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,77 +0,0 @@
-/*
- * 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.lifecycle;
-
-/**
- * Lifecycle event handler which, unless otherwise specified,
- * sets the system property denoting that JBossXB should
- * not allow repeatable particle handlers
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- * @deprecated Should be removed when this is no longer required by AS
- * for proper boot.
- * @see http://community.jboss.org/message/535319
- */
- at Deprecated
-public class NoXbRepeatableParticleHandlersLifecycleEventHandler extends SetSysPropIfNotSpecifiedLifecycleEventHandler
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * System property telling XB whether to allow repeatable particle handlers
- */
- private static final String SYS_PROP_XB_REPEATABLE_PARTICLE_HANDLERS = "xb.builder.repeatableParticleHandlers";
-
- /**
- * Value for the ignore property
- */
- private static final String XB_IGNORE_VALUE = Boolean.FALSE.toString();
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropName()
- */
- @Override
- String getSysPropName()
- {
- return SYS_PROP_XB_REPEATABLE_PARTICLE_HANDLERS;
- }
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropValue()
- */
- @Override
- String getSysPropValue()
- {
- return XB_IGNORE_VALUE;
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/NoXbRepeatableParticleHandlersLifecycleEventHandler.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/NoXbRepeatableParticleHandlersLifecycleEventHandler.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/NoXbRepeatableParticleHandlersLifecycleEventHandler.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/NoXbRepeatableParticleHandlersLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,77 @@
+/*
+ * 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.lifecycle;
+
+/**
+ * Lifecycle event handler which, unless otherwise specified,
+ * sets the system property denoting that JBossXB should
+ * not allow repeatable particle handlers
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ * @deprecated Should be removed when this is no longer required by AS
+ * for proper boot.
+ * @see http://community.jboss.org/message/535319
+ */
+ at Deprecated
+public class NoXbRepeatableParticleHandlersLifecycleEventHandler extends SetSysPropIfNotSpecifiedLifecycleEventHandler
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * System property telling XB whether to allow repeatable particle handlers
+ */
+ private static final String SYS_PROP_XB_REPEATABLE_PARTICLE_HANDLERS = "xb.builder.repeatableParticleHandlers";
+
+ /**
+ * Value for the ignore property
+ */
+ private static final String XB_IGNORE_VALUE = Boolean.FALSE.toString();
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropName()
+ */
+ @Override
+ String getSysPropName()
+ {
+ return SYS_PROP_XB_REPEATABLE_PARTICLE_HANDLERS;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropValue()
+ */
+ @Override
+ String getSysPropValue()
+ {
+ return XB_IGNORE_VALUE;
+ }
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SecurityActions.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SecurityActions.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SecurityActions.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,73 +0,0 @@
-package org.jboss.embedded.core.lifecycle;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * SecurityActions
- *
- * A set of privileged actions that are not to leak out
- * of this package
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-class SecurityActions
-{
-
- //-------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------||
- //-------------------------------------------------------------------------------||
-
- /**
- * No external instanciation
- */
- private SecurityActions()
- {
-
- }
-
- //-------------------------------------------------------------------------------||
- // Utility Methods --------------------------------------------------------------||
- //-------------------------------------------------------------------------------||
-
- /**
- * Sets the specified property with key and value
- */
- static void setSystemProperty(final String key, final String value)
- {
- AccessController.doPrivileged(new PrivilegedAction<Void>()
- {
- public Void run()
- {
- System.setProperty(key, value);
- return null;
- }
- });
- }
-
- /**
- * Obtains the system property with the specified key
- *
- * @param key
- * @return
- * @throws IllegalArgumentException If the key is null
- */
- static String getSystemProperty(final String key) throws IllegalArgumentException
- {
- // Precondition check
- if (key == null)
- {
- throw new IllegalArgumentException("key was null");
- }
-
- // Get sysprop
- return AccessController.doPrivileged(new PrivilegedAction<String>()
- {
- public String run()
- {
- return System.getProperty(key);
- }
- });
- }
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SecurityActions.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SecurityActions.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SecurityActions.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SecurityActions.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,73 @@
+package org.jboss.embedded.core.lifecycle;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * SecurityActions
+ *
+ * A set of privileged actions that are not to leak out
+ * of this package
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+ //-------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * No external instanciation
+ */
+ private SecurityActions()
+ {
+
+ }
+
+ //-------------------------------------------------------------------------------||
+ // Utility Methods --------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * Sets the specified property with key and value
+ */
+ static void setSystemProperty(final String key, final String value)
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Void>()
+ {
+ public Void run()
+ {
+ System.setProperty(key, value);
+ return null;
+ }
+ });
+ }
+
+ /**
+ * Obtains the system property with the specified key
+ *
+ * @param key
+ * @return
+ * @throws IllegalArgumentException If the key is null
+ */
+ static String getSystemProperty(final String key) throws IllegalArgumentException
+ {
+ // Precondition check
+ if (key == null)
+ {
+ throw new IllegalArgumentException("key was null");
+ }
+
+ // Get sysprop
+ return AccessController.doPrivileged(new PrivilegedAction<String>()
+ {
+ public String run()
+ {
+ return System.getProperty(key);
+ }
+ });
+ }
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetIPv4LifecycleEventHandler.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetIPv4LifecycleEventHandler.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetIPv4LifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,80 +0,0 @@
-/*
- * 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.lifecycle;
-
-/**
- * SetRmiHostnameLifecycleEventHandler
- *
- * Lifecycle event handler which, unless otherwise specified,
- * sets the system property denoting that the IPv4 Stack should be used
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- * @deprecated Always required? JGroups broadcasting fails unless specified:
- *
- * 2009-11-03 10:33:55,023 ERROR [org.jgroups.protocols.UDP] (ViewHandler,DefaultPartition,127.0.0.1:58265)
- * failed sending message to null (101 bytes)
- * java.lang.Exception: dest=/228.11.11.11:45688 (104 bytes)
- */
- at Deprecated
-public class SetIPv4LifecycleEventHandler extends SetSysPropIfNotSpecifiedLifecycleEventHandler
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * System property for the IPv4 Stack
- */
- private static final String SYS_PROP_RMI_SERVER_HOSTNAME = "java.net.preferIPv4Stack";
-
- /**
- * Value for the IPv4 Stack
- */
- private static final String IPv4Value = Boolean.TRUE.toString();
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /*
- * (non-Javadoc)
- * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropName()
- */
- @Override
- String getSysPropName()
- {
- return SYS_PROP_RMI_SERVER_HOSTNAME;
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropValue()
- */
- @Override
- String getSysPropValue()
- {
- return IPv4Value;
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetIPv4LifecycleEventHandler.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetIPv4LifecycleEventHandler.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetIPv4LifecycleEventHandler.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetIPv4LifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,80 @@
+/*
+ * 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.lifecycle;
+
+/**
+ * SetRmiHostnameLifecycleEventHandler
+ *
+ * Lifecycle event handler which, unless otherwise specified,
+ * sets the system property denoting that the IPv4 Stack should be used
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ * @deprecated Always required? JGroups broadcasting fails unless specified:
+ *
+ * 2009-11-03 10:33:55,023 ERROR [org.jgroups.protocols.UDP] (ViewHandler,DefaultPartition,127.0.0.1:58265)
+ * failed sending message to null (101 bytes)
+ * java.lang.Exception: dest=/228.11.11.11:45688 (104 bytes)
+ */
+ at Deprecated
+public class SetIPv4LifecycleEventHandler extends SetSysPropIfNotSpecifiedLifecycleEventHandler
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * System property for the IPv4 Stack
+ */
+ private static final String SYS_PROP_RMI_SERVER_HOSTNAME = "java.net.preferIPv4Stack";
+
+ /**
+ * Value for the IPv4 Stack
+ */
+ private static final String IPv4Value = Boolean.TRUE.toString();
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropName()
+ */
+ @Override
+ String getSysPropName()
+ {
+ return SYS_PROP_RMI_SERVER_HOSTNAME;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropValue()
+ */
+ @Override
+ String getSysPropValue()
+ {
+ return IPv4Value;
+ }
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetRmiHostnameLifecycleEventHandler.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetRmiHostnameLifecycleEventHandler.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetRmiHostnameLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,77 +0,0 @@
-/*
- * 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.lifecycle;
-
-/**
- * SetRmiHostnameLifecycleEventHandler
- *
- * Lifecycle event handler which, unless otherwise specified,
- * sets the system property denoting the bind hostname for the RMI Server
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- * @deprecated Why is this required to start the server? See where this is provided to
- * AS standalone (run scripts?) and standardize somewhere.
- */
- at Deprecated
-public class SetRmiHostnameLifecycleEventHandler extends SetSysPropIfNotSpecifiedLifecycleEventHandler
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * System property for the RMI server hostname
- */
- private static final String SYS_PROP_RMI_SERVER_HOSTNAME = "java.rmi.server.hostname";
-
- /**
- * Value for the hostname
- */
- private static final String HOSTNAME_VALUE = "localhost";
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /*
- * (non-Javadoc)
- * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropName()
- */
- @Override
- String getSysPropName()
- {
- return SYS_PROP_RMI_SERVER_HOSTNAME;
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropValue()
- */
- @Override
- String getSysPropValue()
- {
- return HOSTNAME_VALUE;
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetRmiHostnameLifecycleEventHandler.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetRmiHostnameLifecycleEventHandler.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetRmiHostnameLifecycleEventHandler.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetRmiHostnameLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,77 @@
+/*
+ * 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.lifecycle;
+
+/**
+ * SetRmiHostnameLifecycleEventHandler
+ *
+ * Lifecycle event handler which, unless otherwise specified,
+ * sets the system property denoting the bind hostname for the RMI Server
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ * @deprecated Why is this required to start the server? See where this is provided to
+ * AS standalone (run scripts?) and standardize somewhere.
+ */
+ at Deprecated
+public class SetRmiHostnameLifecycleEventHandler extends SetSysPropIfNotSpecifiedLifecycleEventHandler
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * System property for the RMI server hostname
+ */
+ private static final String SYS_PROP_RMI_SERVER_HOSTNAME = "java.rmi.server.hostname";
+
+ /**
+ * Value for the hostname
+ */
+ private static final String HOSTNAME_VALUE = "localhost";
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropName()
+ */
+ @Override
+ String getSysPropName()
+ {
+ return SYS_PROP_RMI_SERVER_HOSTNAME;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.embedded.core.lifecycle.SetSysPropIfNotSpecifiedLifecycleEventHandler#getSysPropValue()
+ */
+ @Override
+ String getSysPropValue()
+ {
+ return HOSTNAME_VALUE;
+ }
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetSysPropIfNotSpecifiedLifecycleEventHandler.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetSysPropIfNotSpecifiedLifecycleEventHandler.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetSysPropIfNotSpecifiedLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,103 +0,0 @@
-/*
- * 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.lifecycle;
-
-import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
-import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
-import org.jboss.bootstrap.api.lifecycle.LifecycleState;
-import org.jboss.logging.Logger;
-
-/**
- * SetSysPropIfNotSpecifiedLifecycleEventHandler
- *
- * Lifecycle event handler which sets a system property
- * unless it's been explicitly specified already
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- * @deprecated Remove when all children are expunged
- */
- at Deprecated
-abstract class SetSysPropIfNotSpecifiedLifecycleEventHandler implements LifecycleEventHandler
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Logger
- */
- private static final Logger log = Logger.getLogger(SetSysPropIfNotSpecifiedLifecycleEventHandler.class);
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /* (non-Javadoc)
- * @see org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler#handleEvent(org.jboss.bootstrap.spi.lifecycle.LifecycleState)
- */
- public void handleEvent(final LifecycleState state) throws LifecycleEventException
- {
- // Get the system property
- final String sysPropName = this.getSysPropName();
-
- // Determine if we should set the property (only if not already specified)
- boolean setProp = true;
- final String propertyExplicitlySpecified = SecurityActions.getSystemProperty(sysPropName);
- if (propertyExplicitlySpecified != null)
- {
- setProp = false;
- }
-
- // Return if we're not setting
- if (!setProp)
- {
- log.debug("Skipping setting property \"" + sysPropName + "\"; already specified: "
- + propertyExplicitlySpecified);
- return;
- }
-
- // Set
- final String sysPropValue = this.getSysPropValue();
- log.debug("Setting system property \"" + sysPropName + "\": " + sysPropValue);
- SecurityActions.setSystemProperty(sysPropName, sysPropValue);
- }
-
- //-------------------------------------------------------------------------------------||
- // Contracts --------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Returns the name of the system property in question
- * @return
- */
- abstract String getSysPropName();
-
- /**
- * Returns the value to set upon the system property
- * if it's not already set
- * @return
- */
- abstract String getSysPropValue();
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetSysPropIfNotSpecifiedLifecycleEventHandler.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetSysPropIfNotSpecifiedLifecycleEventHandler.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetSysPropIfNotSpecifiedLifecycleEventHandler.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/lifecycle/SetSysPropIfNotSpecifiedLifecycleEventHandler.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,103 @@
+/*
+ * 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.lifecycle;
+
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
+import org.jboss.logging.Logger;
+
+/**
+ * SetSysPropIfNotSpecifiedLifecycleEventHandler
+ *
+ * Lifecycle event handler which sets a system property
+ * unless it's been explicitly specified already
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ * @deprecated Remove when all children are expunged
+ */
+ at Deprecated
+abstract class SetSysPropIfNotSpecifiedLifecycleEventHandler implements LifecycleEventHandler
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(SetSysPropIfNotSpecifiedLifecycleEventHandler.class);
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /* (non-Javadoc)
+ * @see org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler#handleEvent(org.jboss.bootstrap.spi.lifecycle.LifecycleState)
+ */
+ public void handleEvent(final LifecycleState state) throws LifecycleEventException
+ {
+ // Get the system property
+ final String sysPropName = this.getSysPropName();
+
+ // Determine if we should set the property (only if not already specified)
+ boolean setProp = true;
+ final String propertyExplicitlySpecified = SecurityActions.getSystemProperty(sysPropName);
+ if (propertyExplicitlySpecified != null)
+ {
+ setProp = false;
+ }
+
+ // Return if we're not setting
+ if (!setProp)
+ {
+ log.debug("Skipping setting property \"" + sysPropName + "\"; already specified: "
+ + propertyExplicitlySpecified);
+ return;
+ }
+
+ // Set
+ final String sysPropValue = this.getSysPropValue();
+ log.debug("Setting system property \"" + sysPropName + "\": " + sysPropValue);
+ SecurityActions.setSystemProperty(sysPropName, sysPropValue);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Contracts --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Returns the name of the system property in question
+ * @return
+ */
+ abstract String getSysPropName();
+
+ /**
+ * Returns the value to set upon the system property
+ * if it's not already set
+ * @return
+ */
+ abstract String getSysPropValue();
+
+}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server)
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,612 +0,0 @@
-/*
- * 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.server;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.api.config.InvalidConfigurationException;
-import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
-import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
-import org.jboss.bootstrap.api.lifecycle.LifecycleState;
-import org.jboss.bootstrap.impl.as.config.BasicJBossASServerConfig;
-import org.jboss.bootstrap.impl.as.server.AbstractJBossASServerBase;
-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.deployers.vfs.spi.client.VFSDeploymentFactory;
-import org.jboss.embedded.api.Deployable;
-import org.jboss.embedded.api.DeploymentException;
-import org.jboss.embedded.api.server.JBossASEmbeddedServer;
-import org.jboss.embedded.core.deployable.DeployableArchive;
-import org.jboss.embedded.core.deployable.DeployableFile;
-import org.jboss.embedded.core.deployable.DeployableUrl;
-import org.jboss.embedded.core.lifecycle.IgnoreXbUnorderedSequenceLifecycleEventHandler;
-import org.jboss.embedded.core.lifecycle.InitLogManagerLevelsLifecycleEventHandler;
-import org.jboss.embedded.core.lifecycle.InitLoggingManagerLifecycleEventHandler;
-import org.jboss.embedded.core.lifecycle.NoXbRepeatableParticleHandlersLifecycleEventHandler;
-import org.jboss.embedded.core.lifecycle.SetIPv4LifecycleEventHandler;
-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.shrinkwrap.api.Archive;
-import org.jboss.vfs.VFS;
-import org.jboss.vfs.VirtualFile;
-
-/**
- * JBossASEmbeddedServer
- *
- * Extension of the JBossAS Server implementation
- * for use in Embedded environments
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class JBossASEmbeddedServerImpl extends AbstractJBossASServerBase<JBossASEmbeddedServer, JBossASServerConfig>
- implements
- JBossASEmbeddedServer
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Logger
- */
- private static final Logger log = Logger.getLogger(JBossASEmbeddedServerImpl.class);
-
- /**
- * Environment Variable name for JBOSS_HOME
- */
- public static final String ENV_VAR_JBOSS_HOME = "JBOSS_HOME";
-
- /**
- * System property name for JBOSS_HOME
- */
- public static final String SYS_PROP_JBOSS_HOME = "jboss.home";
-
- /**
- * Name under which the MainDeployer is registered with MC
- */
- private static final String MC_NAME_MAIN_DEPLOYER = "MainDeployer";
-
- //-------------------------------------------------------------------------------------||
- // Instance Members -------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * A mapping of {@link Deployable} types to their resultant {@link Deployment}s which have been deployed
- * (so we can undeploy). Synchronized on "this" so that we can guarantee all operations are atomic
- * (like adding all Deployments, removing Deployments, etc.) Using a java.util.Concurrent
- * implementation alone won't suit this need.
- */
- private final Map<Deployable, Deployment> deployed = new HashMap<Deployable, Deployment>();
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Constructor
- *
- * Creates a new instance, finding JBOSS_HOME from either:
- *
- * 1) Environment variable "JBOSS_HOME"
- * 2) System property "jboss.home"
- *
- * ...with preference to the system property
- *
- * @throws IllegalStateException
- */
- public JBossASEmbeddedServerImpl() throws IllegalStateException
- {
- // Call Super
- super(JBossASEmbeddedServer.class);
- }
-
- /**
- * Constructor
- *
- * Creates a new instance, manually specifying JBOSS_HOME
- *
- * @param Absolute location of JBOSS_HOME on the filesystem
- * @throws IllegalArgumentException If jbossHome is not specified
- */
- public JBossASEmbeddedServerImpl(final String jbossHome) throws IllegalArgumentException
- {
- // Call super
- super(JBossASEmbeddedServer.class);
-
- // Precondition check
- if (jbossHome == null || jbossHome.length() == 0)
- {
- throw new IllegalArgumentException("JBOSS_HOME must be specified");
- }
-
- // Override JBOSS_HOME by setting the system property
- SecurityActions.setJBossHomeSystemProperty(jbossHome);
- }
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * @see org.jboss.bootstrap.impl.base.server.AbstractServer#getDefaultServerConfigClass()
- */
- @Override
- protected Class<? extends JBossASServerConfig> getDefaultServerConfigClass()
- {
- return BasicJBossASServerConfig.class;
- }
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#deploy(java.net.URL[])
- */
- @Override
- public void deploy(final URL... urls) throws DeploymentException, IllegalArgumentException
- {
- // Make new Deployables
- final Collection<Deployable> deployables = this.asDeployables(urls);
-
- // Deploy
- deploy(deployables);
- }
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#deploy(java.io.File[])
- */
- @Override
- public void deploy(final File... files) throws DeploymentException, IllegalArgumentException
- {
- // Make new Deployables
- final Collection<Deployable> deployables = this.asDeployables(files);
-
- // Deploy
- deploy(deployables);
- }
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#deploy(org.jboss.shrinkwrap.api.Archive<?>[])
- */
- @Override
- public void deploy(final Archive<?>... archives) throws DeploymentException, IllegalArgumentException
- {
- // Make new Deployables
- final Collection<Deployable> deployables = this.asDeployables(archives);
-
- // Deploy
- deploy(deployables);
- }
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#deploy(org.jboss.embedded.api.Deployable[])
- */
- @Override
- public synchronized void deploy(final Deployable... deployables) throws DeploymentException,
- IllegalArgumentException
- {
- // Precondition checks
- if (deployables == null)
- {
- throw new IllegalArgumentException("deployables must not be null");
- }
-
- // Get the MainDeployer
- //TODO Use ProfileService - EMB-39
- final MainDeployer mainDeployer = this.getMainDeployer();
-
- // Record the deployments to be added
- final Map<Deployable, Deployment> deploymentsToBeAdded = new HashMap<Deployable, Deployment>();
-
- // For all Deployables
- for (final Deployable deployable : deployables)
- {
-
- // If already deployed
- if (deployed.containsKey(deployable))
- {
- log.warn("Attempting to re-deploy " + deployable + "; ignoring.");
- }
-
- // Make a VFS Deployment
- final URL target = deployable.getTarget();
- final VirtualFile vf;
- try
- {
- vf = VFS.getChild(target);
- }
- catch (final URISyntaxException e)
- {
- throw new RuntimeException("Could not create new VFS root from " + target, e);
- }
- final Deployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(vf);
-
- // Add to the MainDeployer
- log.debug("Adding to " + mainDeployer + ": " + deployment);
- try
- {
- // Add the deployment to the MainDeployer
- mainDeployer.addDeployment(deployment);
- deploymentsToBeAdded.put(deployable, deployment);
- }
- catch (final org.jboss.deployers.spi.DeploymentException de)
- {
-
- // Construct a new DeploymentException of this API
- final DeploymentException wrappedException = new DeploymentException(de);
-
- // Remove all previously-added deployables from further MainDeployer processing
- final Iterator<Entry<Deployable, Deployment>> it = deploymentsToBeAdded.entrySet().iterator();
- while (it.hasNext())
- {
- final Entry<Deployable, Deployment> next = it.next();
- final Deployable thisDeployable = next.getKey();
- try
- {
- mainDeployer.removeDeployment(deploymentsToBeAdded.get(thisDeployable));
- }
- catch (org.jboss.deployers.spi.DeploymentException e)
- {
- log.warn("Atomic deployment of " + Arrays.asList(deployables) + " failed due to " + de.getMessage()
- + ", and we could not remove " + thisDeployable + " from further processing");
- }
- }
-
- // Throw the wrapped exception
- throw wrappedException;
- }
-
- // Process and check
- this.processAndCheckMainDeployer(mainDeployer);
-
- // Record deployed
- this.deployed.putAll(deploymentsToBeAdded);
- }
-
- }
-
- /**
- * @see org.jboss.tmpdpl.api.container.Container#undeploy(org.jboss.shrinkwrap.api.Archive[])
- */
- @Override
- public void undeploy(final Archive<?>... archives) throws DeploymentException, IllegalArgumentException
- {
- // Make new Deployables
- final Collection<Deployable> deployables = this.asDeployables(archives);
-
- // Undeploy
- undeploy(deployables);
- }
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#undeploy(java.net.URL[])
- */
- @Override
- public void undeploy(final URL... urls) throws DeploymentException, IllegalArgumentException
- {
- // Make new Deployables
- final Collection<Deployable> deployables = this.asDeployables(urls);
-
- // Undeploy
- undeploy(deployables);
-
- }
-
- /**
- * {@inheritDoc}
- * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#undeploy(java.io.File[])
- */
- @Override
- public void undeploy(final File... files) throws DeploymentException, IllegalArgumentException
- {
- // Make new Deployables
- final Collection<Deployable> deployables = this.asDeployables(files);
-
- // Undeploy
- undeploy(deployables);
- }
-
- /**
- * {@inheritDoc}
- * Synchronized so that we may atomically remove all deployables in {@link JBossASEmbeddedServerImpl#deployed}
- * without fear of intrusion from the outside (there is no atomic Map.removeAll)
- *
- * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#undeploy(org.jboss.embedded.api.Deployable[])
- */
- @Override
- public synchronized void undeploy(final Deployable... deployables) throws DeploymentException,
- IllegalArgumentException
- {
- /*
- * Precondition checks
- */
-
- // Ensure deployables are specified
- if (deployables == null || deployables.length == 0)
- {
- throw new IllegalArgumentException("At least one deployable must be specified");
- }
-
- // Get the MainDeployer
- //TODO Use ProfileService - EMB-39
- final MainDeployer mainDeployer = this.getMainDeployer();
-
- // Record deployables to remove
- final Collection<Deployable> deployablesToRemove = new ArrayList<Deployable>();
-
- // Get the deployments for each deployable
- for (final Deployable deployable : deployables)
- {
- final Deployment deployment = this.deployed.get(deployable);
- if (deployment == null)
- {
- log.warn("Specified deployable " + deployable + " cannot be undeployed because it is not deployed.");
- }
- else
- {
- // Remove from MainDeployer
- try
- {
- mainDeployer.removeDeployment(deployment);
- }
- catch (org.jboss.deployers.spi.DeploymentException de)
- {
- // Wrap in our own API's DeploymentException
- throw new DeploymentException(de);
- }
-
- // Mark to remove
- deployablesToRemove.add(deployable);
- }
- }
-
- // Process and check
- this.processAndCheckMainDeployer(mainDeployer);
-
- // Mark removed
- for (final Deployable deployable : deployablesToRemove)
- {
- this.deployed.remove(deployable);
- }
-
- }
-
- //-------------------------------------------------------------------------------------||
- // Internal Helper Methods ------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /* (non-Javadoc)
- * @see org.jboss.bootstrap.impl.as.server.AbstractJBossASServerBase#doInitialize()
- */
- @Override
- protected void doInitialize() throws IllegalStateException, InvalidConfigurationException, LifecycleEventException
- {
- // Invoke super
- super.doInitialize();
-
- // Set some lifecycle handlers
- @SuppressWarnings("deprecation")
- final LifecycleEventHandler ignoreXbOrder = new IgnoreXbUnorderedSequenceLifecycleEventHandler();
- this.registerEventHandler(LifecycleState.INITIALIZED, ignoreXbOrder);
- @SuppressWarnings("deprecation")
- final LifecycleEventHandler setRmiHostname = new SetRmiHostnameLifecycleEventHandler();
- this.registerEventHandler(LifecycleState.INITIALIZED, setRmiHostname);
- @SuppressWarnings("deprecation")
- final LifecycleEventHandler initLoggingManager = new InitLoggingManagerLifecycleEventHandler();
- this.registerEventHandler(LifecycleState.INITIALIZED, initLoggingManager);
- @SuppressWarnings("deprecation")
- final LifecycleEventHandler ipv4Handler = new SetIPv4LifecycleEventHandler();
- this.registerEventHandler(LifecycleState.INITIALIZED, ipv4Handler);
- @SuppressWarnings("deprecation")
- final LifecycleEventHandler repeatableParticleHandlers = new NoXbRepeatableParticleHandlersLifecycleEventHandler();
- this.registerEventHandler(LifecycleState.INITIALIZED, repeatableParticleHandlers);
- // Init Logging levels
- //TODO Remove when we can JBLOGGING-37
- this.registerEventHandler(InitLogManagerLevelsLifecycleEventHandler.INSTANCE, LifecycleState.INITIALIZED);
- }
-
- /**
- * Represents the specified {@link URL}s as a {@link Collection} of
- * {@link Deployable}s
- *
- * @param urls
- * @return
- * @throws IllegalArgumentException If the URLs are not specified
- */
- private Collection<Deployable> asDeployables(final URL... urls) throws IllegalArgumentException
- {
- // Precondition checks
- if (urls == null)
- {
- throw new IllegalArgumentException("urls must not be null");
- }
-
- // Make new Deployables
- final Collection<Deployable> deployables = new ArrayList<Deployable>(urls.length);
- for (final URL url : urls)
- {
- final Deployable deployable = new DeployableUrl(url);
- deployables.add(deployable);
- }
- return deployables;
- }
-
- /**
- * Represents the specified {@link Archive}s as a {@link Collection} of
- * {@link Deployable}s
- *
- * @param archives
- * @return
- * @throws IllegalArgumentException If the URLs are not specified
- */
- private Collection<Deployable> asDeployables(final Archive<?>... archives) throws IllegalArgumentException
- {
- // Precondition checks
- if (archives == null)
- {
- throw new IllegalArgumentException("archives must not be null");
- }
-
- // Make new Deployables
- final Collection<Deployable> deployables = new ArrayList<Deployable>(archives.length);
- for (final Archive<?> archive : archives)
- {
- final Deployable deployable = new DeployableArchive(archive);
- deployables.add(deployable);
- }
- return deployables;
- }
-
- /**
- * Represents the specified {@link File}s as a {@link Collection} of
- * {@link Deployable}s
- *
- * @param archives
- * @return
- * @throws IllegalArgumentException If the URLs are not specified
- */
- private Collection<Deployable> asDeployables(final File... files) throws IllegalArgumentException
- {
- // Precondition checks
- if (files == null)
- {
- throw new IllegalArgumentException("files must not be null");
- }
-
- // Make new Deployables
- final Collection<Deployable> deployables = new ArrayList<Deployable>(files.length);
- for (final File file : files)
- {
- final Deployable deployable = new DeployableFile(file);
- deployables.add(deployable);
- }
- return deployables;
- }
-
- /**
- * Deploys the specified {@link Deployable}s
- *
- * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#deploy(org.jboss.embedded.api.Deployable[])
- * @param deployables
- * @throws DeploymentException
- * @throws IllegalArgumentException
- */
- private void deploy(final Collection<Deployable> deployables) throws DeploymentException, IllegalArgumentException
- {
- // Pass over as an array
- final Deployable[] deployablesArray = deployables.toArray(new Deployable[]
- {});
- this.deploy(deployablesArray);
- }
-
- /**
- * Undeploys the specified {@link Deployable}s
- *
- * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#undeploy(Deployable...)
- * @param deployables
- * @throws DeploymentException
- * @throws IllegalArgumentException
- */
- private void undeploy(final Collection<Deployable> deployables) throws DeploymentException, IllegalArgumentException
- {
- // Pass over as an array
- final Deployable[] deployablesArray = deployables.toArray(new Deployable[]
- {});
- this.undeploy(deployablesArray);
- }
-
- /**
- * Obtains the MainDeployer via MC
- * @return
- * @deprecated EMB-39
- */
- @Deprecated
- protected final MainDeployer getMainDeployer()
- {
- // Get the MainDeployer
- final Kernel kernel = this.getKernel();
- final KernelController controller = kernel.getController();
- final ControllerContext context = controller.getContext(MC_NAME_MAIN_DEPLOYER, ControllerState.INSTALLED);
- if (context == null)
- {
- throw new IllegalStateException("Main deployer could not be found");
- }
- final Object target = context.getTarget();
- final MainDeployer mainDeployer = MainDeployer.class.cast(target);
-
- // Return
- return mainDeployer;
- }
-
- /**
- * Processes and checks the specified MainDeployer
- * @param mainDeployer
- * @throws DeploymentException
- * @throws IllegalArgumentException If the mainDeployer is not specified
- * @deprecated EMB-39
- */
- @Deprecated
- private void processAndCheckMainDeployer(final MainDeployer mainDeployer) throws DeploymentException,
- IllegalArgumentException
- {
- // Precondition check
- if (mainDeployer == null)
- {
- throw new IllegalArgumentException("mainDeployer must be specified");
- }
-
- // Process All
- log.debug("Processing: " + mainDeployer);
- mainDeployer.process();
-
- // Check all completed OK
- try
- {
- log.debug("Checking: " + mainDeployer);
- mainDeployer.checkComplete();
- }
- catch (org.jboss.deployers.spi.DeploymentException de)
- {
- // Wrap in our own API's DeploymentException
- throw new DeploymentException(de);
- }
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/JBossASEmbeddedServerImpl.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,612 @@
+/*
+ * 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.server;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
+import org.jboss.bootstrap.impl.as.config.BasicJBossASServerConfig;
+import org.jboss.bootstrap.impl.as.server.AbstractJBossASServerBase;
+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.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.embedded.api.Deployable;
+import org.jboss.embedded.api.DeploymentException;
+import org.jboss.embedded.api.server.JBossASEmbeddedServer;
+import org.jboss.embedded.core.deployable.DeployableArchive;
+import org.jboss.embedded.core.deployable.DeployableFile;
+import org.jboss.embedded.core.deployable.DeployableUrl;
+import org.jboss.embedded.core.lifecycle.IgnoreXbUnorderedSequenceLifecycleEventHandler;
+import org.jboss.embedded.core.lifecycle.InitLogManagerLevelsLifecycleEventHandler;
+import org.jboss.embedded.core.lifecycle.InitLoggingManagerLifecycleEventHandler;
+import org.jboss.embedded.core.lifecycle.NoXbRepeatableParticleHandlersLifecycleEventHandler;
+import org.jboss.embedded.core.lifecycle.SetIPv4LifecycleEventHandler;
+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.shrinkwrap.api.Archive;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+
+/**
+ * JBossASEmbeddedServer
+ *
+ * Extension of the JBossAS Server implementation
+ * for use in Embedded environments
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JBossASEmbeddedServerImpl extends AbstractJBossASServerBase<JBossASEmbeddedServer, JBossASServerConfig>
+ implements
+ JBossASEmbeddedServer
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(JBossASEmbeddedServerImpl.class);
+
+ /**
+ * Environment Variable name for JBOSS_HOME
+ */
+ public static final String ENV_VAR_JBOSS_HOME = "JBOSS_HOME";
+
+ /**
+ * System property name for JBOSS_HOME
+ */
+ public static final String SYS_PROP_JBOSS_HOME = "jboss.home";
+
+ /**
+ * Name under which the MainDeployer is registered with MC
+ */
+ private static final String MC_NAME_MAIN_DEPLOYER = "MainDeployer";
+
+ //-------------------------------------------------------------------------------------||
+ // Instance Members -------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * A mapping of {@link Deployable} types to their resultant {@link Deployment}s which have been deployed
+ * (so we can undeploy). Synchronized on "this" so that we can guarantee all operations are atomic
+ * (like adding all Deployments, removing Deployments, etc.) Using a java.util.Concurrent
+ * implementation alone won't suit this need.
+ */
+ private final Map<Deployable, Deployment> deployed = new HashMap<Deployable, Deployment>();
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * Creates a new instance, finding JBOSS_HOME from either:
+ *
+ * 1) Environment variable "JBOSS_HOME"
+ * 2) System property "jboss.home"
+ *
+ * ...with preference to the system property
+ *
+ * @throws IllegalStateException
+ */
+ public JBossASEmbeddedServerImpl() throws IllegalStateException
+ {
+ // Call Super
+ super(JBossASEmbeddedServer.class);
+ }
+
+ /**
+ * Constructor
+ *
+ * Creates a new instance, manually specifying JBOSS_HOME
+ *
+ * @param Absolute location of JBOSS_HOME on the filesystem
+ * @throws IllegalArgumentException If jbossHome is not specified
+ */
+ public JBossASEmbeddedServerImpl(final String jbossHome) throws IllegalArgumentException
+ {
+ // Call super
+ super(JBossASEmbeddedServer.class);
+
+ // Precondition check
+ if (jbossHome == null || jbossHome.length() == 0)
+ {
+ throw new IllegalArgumentException("JBOSS_HOME must be specified");
+ }
+
+ // Override JBOSS_HOME by setting the system property
+ SecurityActions.setJBossHomeSystemProperty(jbossHome);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * @see org.jboss.bootstrap.impl.base.server.AbstractServer#getDefaultServerConfigClass()
+ */
+ @Override
+ protected Class<? extends JBossASServerConfig> getDefaultServerConfigClass()
+ {
+ return BasicJBossASServerConfig.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#deploy(java.net.URL[])
+ */
+ @Override
+ public void deploy(final URL... urls) throws DeploymentException, IllegalArgumentException
+ {
+ // Make new Deployables
+ final Collection<Deployable> deployables = this.asDeployables(urls);
+
+ // Deploy
+ deploy(deployables);
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#deploy(java.io.File[])
+ */
+ @Override
+ public void deploy(final File... files) throws DeploymentException, IllegalArgumentException
+ {
+ // Make new Deployables
+ final Collection<Deployable> deployables = this.asDeployables(files);
+
+ // Deploy
+ deploy(deployables);
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#deploy(org.jboss.shrinkwrap.api.Archive<?>[])
+ */
+ @Override
+ public void deploy(final Archive<?>... archives) throws DeploymentException, IllegalArgumentException
+ {
+ // Make new Deployables
+ final Collection<Deployable> deployables = this.asDeployables(archives);
+
+ // Deploy
+ deploy(deployables);
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#deploy(org.jboss.embedded.api.Deployable[])
+ */
+ @Override
+ public synchronized void deploy(final Deployable... deployables) throws DeploymentException,
+ IllegalArgumentException
+ {
+ // Precondition checks
+ if (deployables == null)
+ {
+ throw new IllegalArgumentException("deployables must not be null");
+ }
+
+ // Get the MainDeployer
+ //TODO Use ProfileService - EMB-39
+ final MainDeployer mainDeployer = this.getMainDeployer();
+
+ // Record the deployments to be added
+ final Map<Deployable, Deployment> deploymentsToBeAdded = new HashMap<Deployable, Deployment>();
+
+ // For all Deployables
+ for (final Deployable deployable : deployables)
+ {
+
+ // If already deployed
+ if (deployed.containsKey(deployable))
+ {
+ log.warn("Attempting to re-deploy " + deployable + "; ignoring.");
+ }
+
+ // Make a VFS Deployment
+ final URL target = deployable.getTarget();
+ final VirtualFile vf;
+ try
+ {
+ vf = VFS.getChild(target);
+ }
+ catch (final URISyntaxException e)
+ {
+ throw new RuntimeException("Could not create new VFS root from " + target, e);
+ }
+ final Deployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(vf);
+
+ // Add to the MainDeployer
+ log.debug("Adding to " + mainDeployer + ": " + deployment);
+ try
+ {
+ // Add the deployment to the MainDeployer
+ mainDeployer.addDeployment(deployment);
+ deploymentsToBeAdded.put(deployable, deployment);
+ }
+ catch (final org.jboss.deployers.spi.DeploymentException de)
+ {
+
+ // Construct a new DeploymentException of this API
+ final DeploymentException wrappedException = new DeploymentException(de);
+
+ // Remove all previously-added deployables from further MainDeployer processing
+ final Iterator<Entry<Deployable, Deployment>> it = deploymentsToBeAdded.entrySet().iterator();
+ while (it.hasNext())
+ {
+ final Entry<Deployable, Deployment> next = it.next();
+ final Deployable thisDeployable = next.getKey();
+ try
+ {
+ mainDeployer.removeDeployment(deploymentsToBeAdded.get(thisDeployable));
+ }
+ catch (org.jboss.deployers.spi.DeploymentException e)
+ {
+ log.warn("Atomic deployment of " + Arrays.asList(deployables) + " failed due to " + de.getMessage()
+ + ", and we could not remove " + thisDeployable + " from further processing");
+ }
+ }
+
+ // Throw the wrapped exception
+ throw wrappedException;
+ }
+
+ // Process and check
+ this.processAndCheckMainDeployer(mainDeployer);
+
+ // Record deployed
+ this.deployed.putAll(deploymentsToBeAdded);
+ }
+
+ }
+
+ /**
+ * @see org.jboss.tmpdpl.api.container.Container#undeploy(org.jboss.shrinkwrap.api.Archive[])
+ */
+ @Override
+ public void undeploy(final Archive<?>... archives) throws DeploymentException, IllegalArgumentException
+ {
+ // Make new Deployables
+ final Collection<Deployable> deployables = this.asDeployables(archives);
+
+ // Undeploy
+ undeploy(deployables);
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#undeploy(java.net.URL[])
+ */
+ @Override
+ public void undeploy(final URL... urls) throws DeploymentException, IllegalArgumentException
+ {
+ // Make new Deployables
+ final Collection<Deployable> deployables = this.asDeployables(urls);
+
+ // Undeploy
+ undeploy(deployables);
+
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#undeploy(java.io.File[])
+ */
+ @Override
+ public void undeploy(final File... files) throws DeploymentException, IllegalArgumentException
+ {
+ // Make new Deployables
+ final Collection<Deployable> deployables = this.asDeployables(files);
+
+ // Undeploy
+ undeploy(deployables);
+ }
+
+ /**
+ * {@inheritDoc}
+ * Synchronized so that we may atomically remove all deployables in {@link JBossASEmbeddedServerImpl#deployed}
+ * without fear of intrusion from the outside (there is no atomic Map.removeAll)
+ *
+ * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#undeploy(org.jboss.embedded.api.Deployable[])
+ */
+ @Override
+ public synchronized void undeploy(final Deployable... deployables) throws DeploymentException,
+ IllegalArgumentException
+ {
+ /*
+ * Precondition checks
+ */
+
+ // Ensure deployables are specified
+ if (deployables == null || deployables.length == 0)
+ {
+ throw new IllegalArgumentException("At least one deployable must be specified");
+ }
+
+ // Get the MainDeployer
+ //TODO Use ProfileService - EMB-39
+ final MainDeployer mainDeployer = this.getMainDeployer();
+
+ // Record deployables to remove
+ final Collection<Deployable> deployablesToRemove = new ArrayList<Deployable>();
+
+ // Get the deployments for each deployable
+ for (final Deployable deployable : deployables)
+ {
+ final Deployment deployment = this.deployed.get(deployable);
+ if (deployment == null)
+ {
+ log.warn("Specified deployable " + deployable + " cannot be undeployed because it is not deployed.");
+ }
+ else
+ {
+ // Remove from MainDeployer
+ try
+ {
+ mainDeployer.removeDeployment(deployment);
+ }
+ catch (org.jboss.deployers.spi.DeploymentException de)
+ {
+ // Wrap in our own API's DeploymentException
+ throw new DeploymentException(de);
+ }
+
+ // Mark to remove
+ deployablesToRemove.add(deployable);
+ }
+ }
+
+ // Process and check
+ this.processAndCheckMainDeployer(mainDeployer);
+
+ // Mark removed
+ for (final Deployable deployable : deployablesToRemove)
+ {
+ this.deployed.remove(deployable);
+ }
+
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Internal Helper Methods ------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /* (non-Javadoc)
+ * @see org.jboss.bootstrap.impl.as.server.AbstractJBossASServerBase#doInitialize()
+ */
+ @Override
+ protected void doInitialize() throws IllegalStateException, InvalidConfigurationException, LifecycleEventException
+ {
+ // Invoke super
+ super.doInitialize();
+
+ // Set some lifecycle handlers
+ @SuppressWarnings("deprecation")
+ final LifecycleEventHandler ignoreXbOrder = new IgnoreXbUnorderedSequenceLifecycleEventHandler();
+ this.registerEventHandler(LifecycleState.INITIALIZED, ignoreXbOrder);
+ @SuppressWarnings("deprecation")
+ final LifecycleEventHandler setRmiHostname = new SetRmiHostnameLifecycleEventHandler();
+ this.registerEventHandler(LifecycleState.INITIALIZED, setRmiHostname);
+ @SuppressWarnings("deprecation")
+ final LifecycleEventHandler initLoggingManager = new InitLoggingManagerLifecycleEventHandler();
+ this.registerEventHandler(LifecycleState.INITIALIZED, initLoggingManager);
+ @SuppressWarnings("deprecation")
+ final LifecycleEventHandler ipv4Handler = new SetIPv4LifecycleEventHandler();
+ this.registerEventHandler(LifecycleState.INITIALIZED, ipv4Handler);
+ @SuppressWarnings("deprecation")
+ final LifecycleEventHandler repeatableParticleHandlers = new NoXbRepeatableParticleHandlersLifecycleEventHandler();
+ this.registerEventHandler(LifecycleState.INITIALIZED, repeatableParticleHandlers);
+ // Init Logging levels
+ //TODO Remove when we can JBLOGGING-37
+ this.registerEventHandler(InitLogManagerLevelsLifecycleEventHandler.INSTANCE, LifecycleState.INITIALIZED);
+ }
+
+ /**
+ * Represents the specified {@link URL}s as a {@link Collection} of
+ * {@link Deployable}s
+ *
+ * @param urls
+ * @return
+ * @throws IllegalArgumentException If the URLs are not specified
+ */
+ private Collection<Deployable> asDeployables(final URL... urls) throws IllegalArgumentException
+ {
+ // Precondition checks
+ if (urls == null)
+ {
+ throw new IllegalArgumentException("urls must not be null");
+ }
+
+ // Make new Deployables
+ final Collection<Deployable> deployables = new ArrayList<Deployable>(urls.length);
+ for (final URL url : urls)
+ {
+ final Deployable deployable = new DeployableUrl(url);
+ deployables.add(deployable);
+ }
+ return deployables;
+ }
+
+ /**
+ * Represents the specified {@link Archive}s as a {@link Collection} of
+ * {@link Deployable}s
+ *
+ * @param archives
+ * @return
+ * @throws IllegalArgumentException If the URLs are not specified
+ */
+ private Collection<Deployable> asDeployables(final Archive<?>... archives) throws IllegalArgumentException
+ {
+ // Precondition checks
+ if (archives == null)
+ {
+ throw new IllegalArgumentException("archives must not be null");
+ }
+
+ // Make new Deployables
+ final Collection<Deployable> deployables = new ArrayList<Deployable>(archives.length);
+ for (final Archive<?> archive : archives)
+ {
+ final Deployable deployable = new DeployableArchive(archive);
+ deployables.add(deployable);
+ }
+ return deployables;
+ }
+
+ /**
+ * Represents the specified {@link File}s as a {@link Collection} of
+ * {@link Deployable}s
+ *
+ * @param archives
+ * @return
+ * @throws IllegalArgumentException If the URLs are not specified
+ */
+ private Collection<Deployable> asDeployables(final File... files) throws IllegalArgumentException
+ {
+ // Precondition checks
+ if (files == null)
+ {
+ throw new IllegalArgumentException("files must not be null");
+ }
+
+ // Make new Deployables
+ final Collection<Deployable> deployables = new ArrayList<Deployable>(files.length);
+ for (final File file : files)
+ {
+ final Deployable deployable = new DeployableFile(file);
+ deployables.add(deployable);
+ }
+ return deployables;
+ }
+
+ /**
+ * Deploys the specified {@link Deployable}s
+ *
+ * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#deploy(org.jboss.embedded.api.Deployable[])
+ * @param deployables
+ * @throws DeploymentException
+ * @throws IllegalArgumentException
+ */
+ private void deploy(final Collection<Deployable> deployables) throws DeploymentException, IllegalArgumentException
+ {
+ // Pass over as an array
+ final Deployable[] deployablesArray = deployables.toArray(new Deployable[]
+ {});
+ this.deploy(deployablesArray);
+ }
+
+ /**
+ * Undeploys the specified {@link Deployable}s
+ *
+ * @see org.jboss.embedded.api.server.JBossASEmbeddedServer#undeploy(Deployable...)
+ * @param deployables
+ * @throws DeploymentException
+ * @throws IllegalArgumentException
+ */
+ private void undeploy(final Collection<Deployable> deployables) throws DeploymentException, IllegalArgumentException
+ {
+ // Pass over as an array
+ final Deployable[] deployablesArray = deployables.toArray(new Deployable[]
+ {});
+ this.undeploy(deployablesArray);
+ }
+
+ /**
+ * Obtains the MainDeployer via MC
+ * @return
+ * @deprecated EMB-39
+ */
+ @Deprecated
+ protected final MainDeployer getMainDeployer()
+ {
+ // Get the MainDeployer
+ final Kernel kernel = this.getKernel();
+ final KernelController controller = kernel.getController();
+ final ControllerContext context = controller.getContext(MC_NAME_MAIN_DEPLOYER, ControllerState.INSTALLED);
+ if (context == null)
+ {
+ throw new IllegalStateException("Main deployer could not be found");
+ }
+ final Object target = context.getTarget();
+ final MainDeployer mainDeployer = MainDeployer.class.cast(target);
+
+ // Return
+ return mainDeployer;
+ }
+
+ /**
+ * Processes and checks the specified MainDeployer
+ * @param mainDeployer
+ * @throws DeploymentException
+ * @throws IllegalArgumentException If the mainDeployer is not specified
+ * @deprecated EMB-39
+ */
+ @Deprecated
+ private void processAndCheckMainDeployer(final MainDeployer mainDeployer) throws DeploymentException,
+ IllegalArgumentException
+ {
+ // Precondition check
+ if (mainDeployer == null)
+ {
+ throw new IllegalArgumentException("mainDeployer must be specified");
+ }
+
+ // Process All
+ log.debug("Processing: " + mainDeployer);
+ mainDeployer.process();
+
+ // Check all completed OK
+ try
+ {
+ log.debug("Checking: " + mainDeployer);
+ mainDeployer.checkComplete();
+ }
+ catch (org.jboss.deployers.spi.DeploymentException de)
+ {
+ // Wrap in our own API's DeploymentException
+ throw new DeploymentException(de);
+ }
+ }
+
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/SecurityActions.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/SecurityActions.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/SecurityActions.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,108 +0,0 @@
-package org.jboss.embedded.core.server;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-import org.jboss.bootstrap.api.as.config.JBossASBasedServerConfig;
-
-/**
- * SecurityActions
- *
- * A set of privileged actions that are not to leak out
- * of this package
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-class SecurityActions
-{
-
- //-------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------||
- //-------------------------------------------------------------------------------||
-
- /**
- * No external instanciation
- */
- private SecurityActions()
- {
-
- }
-
- //-------------------------------------------------------------------------------||
- // Utility Methods --------------------------------------------------------------||
- //-------------------------------------------------------------------------------||
-
- /**
- * Obtains the system property with the specified key
- *
- * @param key
- * @return
- * @throws IllegalArgumentException If the key is null
- */
- static String getSystemProperty(final String key) throws IllegalArgumentException
- {
- // Precondition check
- if (key == null)
- {
- throw new IllegalArgumentException("key was null");
- }
-
- // Get sysprop
- return AccessController.doPrivileged(new PrivilegedAction<String>()
- {
- public String run()
- {
- return System.getProperty(key);
- }
- });
- }
-
- /**
- * Obtains the environment variable with the specified key
- *
- * @param key
- * @return
- * @throws IllegalArgumentException If the key is null
- */
- static String getEnvironmentVariable(final String key) throws IllegalArgumentException
- {
- // Precondition check
- if (key == null)
- {
- throw new IllegalArgumentException("key was null");
- }
-
- // Get envvar
- return AccessController.doPrivileged(new PrivilegedAction<String>()
- {
- public String run()
- {
- return System.getenv(key);
- }
- });
- }
-
- /**
- * Sets the system property "jboss.home" to the specified value
- * @param jbossHome
- */
- static void setJBossHomeSystemProperty(final String jbossHome)
- {
- // Precondition check
- assert jbossHome != null && jbossHome.length() > 0 : "JBOSS_HOME must be specified";
-
- // Set sysprop
- AccessController.doPrivileged(new PrivilegedAction<Void>()
- {
-
- @Override
- public Void run()
- {
- System.setProperty(JBossASBasedServerConfig.PROP_KEY_JBOSSAS_HOME, jbossHome);
- return null;
- }
-
- });
- }
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/SecurityActions.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/SecurityActions.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/SecurityActions.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/main/java/org/jboss/embedded/core/server/SecurityActions.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,108 @@
+package org.jboss.embedded.core.server;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import org.jboss.bootstrap.api.as.config.JBossASBasedServerConfig;
+
+/**
+ * SecurityActions
+ *
+ * A set of privileged actions that are not to leak out
+ * of this package
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+ //-------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * No external instanciation
+ */
+ private SecurityActions()
+ {
+
+ }
+
+ //-------------------------------------------------------------------------------||
+ // Utility Methods --------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the system property with the specified key
+ *
+ * @param key
+ * @return
+ * @throws IllegalArgumentException If the key is null
+ */
+ static String getSystemProperty(final String key) throws IllegalArgumentException
+ {
+ // Precondition check
+ if (key == null)
+ {
+ throw new IllegalArgumentException("key was null");
+ }
+
+ // Get sysprop
+ return AccessController.doPrivileged(new PrivilegedAction<String>()
+ {
+ public String run()
+ {
+ return System.getProperty(key);
+ }
+ });
+ }
+
+ /**
+ * Obtains the environment variable with the specified key
+ *
+ * @param key
+ * @return
+ * @throws IllegalArgumentException If the key is null
+ */
+ static String getEnvironmentVariable(final String key) throws IllegalArgumentException
+ {
+ // Precondition check
+ if (key == null)
+ {
+ throw new IllegalArgumentException("key was null");
+ }
+
+ // Get envvar
+ return AccessController.doPrivileged(new PrivilegedAction<String>()
+ {
+ public String run()
+ {
+ return System.getenv(key);
+ }
+ });
+ }
+
+ /**
+ * Sets the system property "jboss.home" to the specified value
+ * @param jbossHome
+ */
+ static void setJBossHomeSystemProperty(final String jbossHome)
+ {
+ // Precondition check
+ assert jbossHome != null && jbossHome.length() > 0 : "JBOSS_HOME must be specified";
+
+ // Set sysprop
+ AccessController.doPrivileged(new PrivilegedAction<Void>()
+ {
+
+ @Override
+ public Void run()
+ {
+ System.setProperty(JBossASBasedServerConfig.PROP_KEY_JBOSSAS_HOME, jbossHome);
+ return null;
+ }
+
+ });
+ }
+}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/main/resources (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/main/resources)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/java)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core)
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable)
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/DeployableImplementationsUnitTest.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/DeployableImplementationsUnitTest.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/DeployableImplementationsUnitTest.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,224 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.embedded.core.deployable;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.jboss.embedded.api.Deployable;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.exporter.ZipExporter;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.junit.Test;
-
-/**
- * Test Cases to ensure that the implementations for
- * {@link Deployable} types are working as expected
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class DeployableImplementationsUnitTest
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Name of the first test file
- */
- private static final String NAME_FILE1 = "file1";
-
- /**
- * Name of the second test file
- */
- private static final String NAME_FILE2 = "file2";
-
- //-------------------------------------------------------------------------------------||
- // Tests ------------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Ensures that {@link Deployable} types backed by an
- * {@link Archive} are working
- */
- @Test
- public void testDeployableArchive() throws Exception
- {
- // Create an archive
- final JavaArchive archive = ShrinkWrap.create("archive.jar", JavaArchive.class).addClass(this.getClass());
-
- // Make a Deployable
- final Deployable deployable = new DeployableArchive(archive);
-
- // Get the Deployable target
- final URL target = deployable.getTarget();
-
- // Test the streams for equal contents
- final InputStream expectedStream = archive.as(ZipExporter.class).exportZip();
- final InputStream roundtripStream = target.openStream();
- this.assertEqualStreamContents(expectedStream, roundtripStream);
-
- // Test Equality
- final JavaArchive unequalArchive = ShrinkWrap.create("unequal.jar", JavaArchive.class).addClass(this.getClass());
- final Deployable unequalDeployable = new DeployableArchive(unequalArchive);
- final Deployable equalDeployable = new DeployableArchive(archive);
- this.assertEquality(deployable, equalDeployable, unequalDeployable);
-
- }
-
- /**
- * Ensures that {@link Deployable} types backed by a
- * {@link File} are working
- */
- @Test
- public void testDeployableFile() throws Exception
- {
- // Create a File
- final File file = new File(this.getUrl(NAME_FILE1).toURI());
-
- // Make a Deployable
- final Deployable deployable = new DeployableFile(file);
-
- // Get the Deployable target
- final URL target = deployable.getTarget();
-
- // Test the streams for equal contents
- final InputStream expectedStream = file.toURI().toURL().openStream();
- final InputStream roundtripStream = target.openStream();
- this.assertEqualStreamContents(expectedStream, roundtripStream);
-
- // Test Equality
- final File unequalFile = new File(this.getUrl(NAME_FILE2).toURI());
- final Deployable unequalDeployable = new DeployableFile(unequalFile);
- final Deployable equalDeployable = new DeployableFile(file);
- this.assertEquality(deployable, equalDeployable, unequalDeployable);
-
- // Test preconditions
- try
- {
- new DeployableFile(null);
- TestCase.fail("New deployable file with null backing file should be invalid");
- }
- catch (final IllegalArgumentException iae)
- {
- // Expected
- }
- try
- {
- final File nonExistantFile = new File("made_up_file");
- TestCase.assertTrue("Test file should not exist", !nonExistantFile.exists());
- new DeployableFile(nonExistantFile);
- TestCase.fail("New deployable file with nonexistant backing file should be invalid");
- }
- catch (final IllegalArgumentException iae)
- {
- // Expected
- }
- }
-
- /**
- * Ensures that {@link Deployable} types backed by a
- * {@link URL} are working
- */
- @Test
- public void testDeployableUrl() throws Exception
- {
- // Create a URL
- final URL url = this.getUrl(NAME_FILE1);
-
- // Make a Deployable
- final Deployable deployable = new DeployableUrl(url);
-
- // Get the Deployable target
- final URL target = deployable.getTarget();
-
- // Test the streams for equal contents
- final InputStream expectedStream = url.openStream();
- final InputStream roundtripStream = target.openStream();
- this.assertEqualStreamContents(expectedStream, roundtripStream);
-
- // Test Equality
- final URL unequalUrl = this.getUrl(NAME_FILE2);
- final Deployable unequalDeployable = new DeployableUrl(unequalUrl);
- final Deployable equalDeployable = new DeployableUrl(url);
- this.assertEquality(deployable, equalDeployable, unequalDeployable);
- }
-
- //-------------------------------------------------------------------------------------||
- // Internal Helper Methods ------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Ensures that the {@link Object#equals(Object)} and {@link Object#hashCode()}
- * methods are working as contracted
- *
- * @param original The original deployable
- * @param expectedEqual A deployable expected to be equal to the original
- * @param expectedUnequal A deployable expected to be unequal to the original
- */
- private void assertEquality(final Deployable original, final Deployable expectedEqual,
- final Deployable expectedUnequal)
- {
- TestCase.assertEquals("Deployable archives with equal backing archives should be equal", original, expectedEqual);
- TestCase.assertNotSame("Deployable archives with inequal backing archives should not be equal", original,
- expectedUnequal);
- TestCase.assertEquals("Hash codes of equal objects mus tbe equal", original.hashCode(), expectedEqual.hashCode());
- }
-
- /**
- * Ensures that the contents of the given streams are equal
- * @param expected
- * @param deployable
- * @throws IOException
- */
- private void assertEqualStreamContents(final InputStream expected, final InputStream deployable) throws IOException
- {
- int read = 0;
- while ((read = expected.read()) != -1)
- {
- int readFromRoundtrip = deployable.read();
- TestCase.assertEquals("Contents of streams are not equal", read, readFromRoundtrip);
- }
- // Also ensure we're at the end of the second stream
- TestCase.assertEquals(-1, deployable.read());
- }
-
- /**
- * Obtains the resource of the given name
- * @param fileName
- * @return
- * @throws IllegalArgumentException If the name is not specified
- */
- private URL getUrl(final String resourceName) throws IllegalArgumentException
- {
- // Precondition check
- if (resourceName == null || resourceName.length() == 0)
- {
- throw new IllegalArgumentException("name must be specified");
- }
- // Return
- return this.getClass().getClassLoader().getResource(resourceName);
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/DeployableImplementationsUnitTest.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/DeployableImplementationsUnitTest.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/DeployableImplementationsUnitTest.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/deployable/DeployableImplementationsUnitTest.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,224 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.embedded.core.deployable;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.jboss.embedded.api.Deployable;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.exporter.ZipExporter;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Test;
+
+/**
+ * Test Cases to ensure that the implementations for
+ * {@link Deployable} types are working as expected
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class DeployableImplementationsUnitTest
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Name of the first test file
+ */
+ private static final String NAME_FILE1 = "file1";
+
+ /**
+ * Name of the second test file
+ */
+ private static final String NAME_FILE2 = "file2";
+
+ //-------------------------------------------------------------------------------------||
+ // Tests ------------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Ensures that {@link Deployable} types backed by an
+ * {@link Archive} are working
+ */
+ @Test
+ public void testDeployableArchive() throws Exception
+ {
+ // Create an archive
+ final JavaArchive archive = ShrinkWrap.create("archive.jar", JavaArchive.class).addClass(this.getClass());
+
+ // Make a Deployable
+ final Deployable deployable = new DeployableArchive(archive);
+
+ // Get the Deployable target
+ final URL target = deployable.getTarget();
+
+ // Test the streams for equal contents
+ final InputStream expectedStream = archive.as(ZipExporter.class).exportZip();
+ final InputStream roundtripStream = target.openStream();
+ this.assertEqualStreamContents(expectedStream, roundtripStream);
+
+ // Test Equality
+ final JavaArchive unequalArchive = ShrinkWrap.create("unequal.jar", JavaArchive.class).addClass(this.getClass());
+ final Deployable unequalDeployable = new DeployableArchive(unequalArchive);
+ final Deployable equalDeployable = new DeployableArchive(archive);
+ this.assertEquality(deployable, equalDeployable, unequalDeployable);
+
+ }
+
+ /**
+ * Ensures that {@link Deployable} types backed by a
+ * {@link File} are working
+ */
+ @Test
+ public void testDeployableFile() throws Exception
+ {
+ // Create a File
+ final File file = new File(this.getUrl(NAME_FILE1).toURI());
+
+ // Make a Deployable
+ final Deployable deployable = new DeployableFile(file);
+
+ // Get the Deployable target
+ final URL target = deployable.getTarget();
+
+ // Test the streams for equal contents
+ final InputStream expectedStream = file.toURI().toURL().openStream();
+ final InputStream roundtripStream = target.openStream();
+ this.assertEqualStreamContents(expectedStream, roundtripStream);
+
+ // Test Equality
+ final File unequalFile = new File(this.getUrl(NAME_FILE2).toURI());
+ final Deployable unequalDeployable = new DeployableFile(unequalFile);
+ final Deployable equalDeployable = new DeployableFile(file);
+ this.assertEquality(deployable, equalDeployable, unequalDeployable);
+
+ // Test preconditions
+ try
+ {
+ new DeployableFile(null);
+ TestCase.fail("New deployable file with null backing file should be invalid");
+ }
+ catch (final IllegalArgumentException iae)
+ {
+ // Expected
+ }
+ try
+ {
+ final File nonExistantFile = new File("made_up_file");
+ TestCase.assertTrue("Test file should not exist", !nonExistantFile.exists());
+ new DeployableFile(nonExistantFile);
+ TestCase.fail("New deployable file with nonexistant backing file should be invalid");
+ }
+ catch (final IllegalArgumentException iae)
+ {
+ // Expected
+ }
+ }
+
+ /**
+ * Ensures that {@link Deployable} types backed by a
+ * {@link URL} are working
+ */
+ @Test
+ public void testDeployableUrl() throws Exception
+ {
+ // Create a URL
+ final URL url = this.getUrl(NAME_FILE1);
+
+ // Make a Deployable
+ final Deployable deployable = new DeployableUrl(url);
+
+ // Get the Deployable target
+ final URL target = deployable.getTarget();
+
+ // Test the streams for equal contents
+ final InputStream expectedStream = url.openStream();
+ final InputStream roundtripStream = target.openStream();
+ this.assertEqualStreamContents(expectedStream, roundtripStream);
+
+ // Test Equality
+ final URL unequalUrl = this.getUrl(NAME_FILE2);
+ final Deployable unequalDeployable = new DeployableUrl(unequalUrl);
+ final Deployable equalDeployable = new DeployableUrl(url);
+ this.assertEquality(deployable, equalDeployable, unequalDeployable);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Internal Helper Methods ------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Ensures that the {@link Object#equals(Object)} and {@link Object#hashCode()}
+ * methods are working as contracted
+ *
+ * @param original The original deployable
+ * @param expectedEqual A deployable expected to be equal to the original
+ * @param expectedUnequal A deployable expected to be unequal to the original
+ */
+ private void assertEquality(final Deployable original, final Deployable expectedEqual,
+ final Deployable expectedUnequal)
+ {
+ TestCase.assertEquals("Deployable archives with equal backing archives should be equal", original, expectedEqual);
+ TestCase.assertNotSame("Deployable archives with inequal backing archives should not be equal", original,
+ expectedUnequal);
+ TestCase.assertEquals("Hash codes of equal objects mus tbe equal", original.hashCode(), expectedEqual.hashCode());
+ }
+
+ /**
+ * Ensures that the contents of the given streams are equal
+ * @param expected
+ * @param deployable
+ * @throws IOException
+ */
+ private void assertEqualStreamContents(final InputStream expected, final InputStream deployable) throws IOException
+ {
+ int read = 0;
+ while ((read = expected.read()) != -1)
+ {
+ int readFromRoundtrip = deployable.read();
+ TestCase.assertEquals("Contents of streams are not equal", read, readFromRoundtrip);
+ }
+ // Also ensure we're at the end of the second stream
+ TestCase.assertEquals(-1, deployable.read());
+ }
+
+ /**
+ * Obtains the resource of the given name
+ * @param fileName
+ * @return
+ * @throws IllegalArgumentException If the name is not specified
+ */
+ private URL getUrl(final String resourceName) throws IllegalArgumentException
+ {
+ // Precondition check
+ if (resourceName == null || resourceName.length() == 0)
+ {
+ throw new IllegalArgumentException("name must be specified");
+ }
+ // Return
+ return this.getClass().getClassLoader().getResource(resourceName);
+ }
+
+}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server)
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTest.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTest.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTest.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.embedded.core.server;
-
-import junit.framework.TestCase;
-
-import org.jboss.embedded.api.server.JBossASEmbeddedServer;
-import org.jboss.embedded.api.server.JBossASEmbeddedServerFactory;
-import org.junit.Test;
-
-/**
- * Tests to ensure that the API's Server Factory is working as expected
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class JBossASEmbeddedServerFactoryUnitTest
-{
- //-------------------------------------------------------------------------------------||
- // Tests ------------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Ensures that a new server instance may be created from the API's Server Factory
- */
- @Test
- public void testServerFactory() throws Exception
- {
- final JBossASEmbeddedServer server = JBossASEmbeddedServerFactory.createServer();
- // Ensure we have a non-null type (because the compiler will ensure that the runtime type is OK from this end)
- TestCase.assertNotNull("Server factory returned a null server instance", server);
- }
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTest.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTest.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTest.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTest.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.embedded.core.server;
+
+import junit.framework.TestCase;
+
+import org.jboss.embedded.api.server.JBossASEmbeddedServer;
+import org.jboss.embedded.api.server.JBossASEmbeddedServerFactory;
+import org.junit.Test;
+
+/**
+ * Tests to ensure that the API's Server Factory is working as expected
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JBossASEmbeddedServerFactoryUnitTest
+{
+ //-------------------------------------------------------------------------------------||
+ // Tests ------------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Ensures that a new server instance may be created from the API's Server Factory
+ */
+ @Test
+ public void testServerFactory() throws Exception
+ {
+ final JBossASEmbeddedServer server = JBossASEmbeddedServerFactory.createServer();
+ // Ensure we have a non-null type (because the compiler will ensure that the runtime type is OK from this end)
+ TestCase.assertNotNull("Server factory returned a null server instance", server);
+ }
+}
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/ServerInitializationUnitTest.java
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/ServerInitializationUnitTest.java 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/ServerInitializationUnitTest.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,149 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.embedded.core.server;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-import junit.framework.TestCase;
-
-import org.jboss.bootstrap.spi.server.ServerProvider;
-import org.jboss.embedded.api.server.JBossASEmbeddedServer;
-import org.jboss.embedded.api.server.JBossASEmbeddedServerFactory;
-import org.jboss.logging.Logger;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Test Cases to ensure that the Server Initialization contracts
- * hold
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class ServerInitializationUnitTest
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Logger
- */
- private static final Logger log = Logger.getLogger(ServerInitializationUnitTest.class);
-
- /**
- * Server for testing
- */
- private static JBossASEmbeddedServer server;
-
- //-------------------------------------------------------------------------------------||
- // Lifecycle --------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Creates and initializes the server
- */
- @BeforeClass
- public static void createAndInitServer() throws Exception
- {
- // Create
- server = JBossASEmbeddedServerFactory.createServer();
- // Don't do any validation of JBOSS_HOME or related environment
- ((ServerProvider<?, ?>) server).setValidator(null);
- // Set a dummy bootstrap so we don't err out in parsing
- server.getConfiguration().bootstrapHome(
- ServerInitializationUnitTest.class.getProtectionDomain().getCodeSource().getLocation());
- // Init
- server.initialize();
- }
-
- //-------------------------------------------------------------------------------------||
- // Required Implementations -----------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Ensures that JBossXB is configured to use the unordered sequence in parsing
- */
- @Test
- public void testXbUnorderedSequence() throws Exception
- {
- this.assertSysProp("xb.builder.useUnorderedSequence", Boolean.TRUE.toString());
- }
-
- /**
- * Ensures that JBossXB is configured to not use repeatable paticle handlers
- */
- @Test
- public void testXbNoRepeatableParticleHandlers() throws Exception
- {
- this.assertSysProp("xb.builder.repeatableParticleHandlers", Boolean.FALSE.toString());
- }
-
- /**
- * Ensures that the RMI server hostname is set to localhost
- */
- @Test
- public void testRmiServerHostnameLocalhost() throws Exception
- {
- this.assertSysProp("java.rmi.server.hostname", "localhost");
- }
-
- /**
- * Ensures that the Log Manager is set to JBoss LogManager
- */
- @Test
- public void testLogManagerIsJBossLogManager() throws Exception
- {
- this.assertSysProp("java.util.logging.manager", "org.jboss.logmanager.LogManager");
- }
-
- /**
- * Ensures that the system property for IPv4 Stack is set
- */
- @Test
- public void testIpv4() throws Exception
- {
- this.assertSysProp("java.net.preferIPv4Stack", "true");
- }
-
- //-------------------------------------------------------------------------------------||
- // Helper Methods ---------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Ensures the system property of specified name has the specified value,
- * else fails the test
- */
- private void assertSysProp(final String propName, final String expectedValue)
- {
- // Get the prop value
- final String propValue = AccessController.doPrivileged(new PrivilegedAction<String>()
- {
- @Override
- public String run()
- {
- return System.getProperty(propName);
- }
-
- });
- // Ensure expected
- TestCase.assertEquals("Required system property was not set as expected", expectedValue, propValue);
- }
-
-}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/ServerInitializationUnitTest.java (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/ServerInitializationUnitTest.java)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/ServerInitializationUnitTest.java (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/java/org/jboss/embedded/core/server/ServerInitializationUnitTest.java 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.embedded.core.server;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import junit.framework.TestCase;
+
+import org.jboss.bootstrap.spi.server.ServerProvider;
+import org.jboss.embedded.api.server.JBossASEmbeddedServer;
+import org.jboss.embedded.api.server.JBossASEmbeddedServerFactory;
+import org.jboss.logging.Logger;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Test Cases to ensure that the Server Initialization contracts
+ * hold
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ServerInitializationUnitTest
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(ServerInitializationUnitTest.class);
+
+ /**
+ * Server for testing
+ */
+ private static JBossASEmbeddedServer server;
+
+ //-------------------------------------------------------------------------------------||
+ // Lifecycle --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Creates and initializes the server
+ */
+ @BeforeClass
+ public static void createAndInitServer() throws Exception
+ {
+ // Create
+ server = JBossASEmbeddedServerFactory.createServer();
+ // Don't do any validation of JBOSS_HOME or related environment
+ ((ServerProvider<?, ?>) server).setValidator(null);
+ // Set a dummy bootstrap so we don't err out in parsing
+ server.getConfiguration().bootstrapHome(
+ ServerInitializationUnitTest.class.getProtectionDomain().getCodeSource().getLocation());
+ // Init
+ server.initialize();
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Ensures that JBossXB is configured to use the unordered sequence in parsing
+ */
+ @Test
+ public void testXbUnorderedSequence() throws Exception
+ {
+ this.assertSysProp("xb.builder.useUnorderedSequence", Boolean.TRUE.toString());
+ }
+
+ /**
+ * Ensures that JBossXB is configured to not use repeatable paticle handlers
+ */
+ @Test
+ public void testXbNoRepeatableParticleHandlers() throws Exception
+ {
+ this.assertSysProp("xb.builder.repeatableParticleHandlers", Boolean.FALSE.toString());
+ }
+
+ /**
+ * Ensures that the RMI server hostname is set to localhost
+ */
+ @Test
+ public void testRmiServerHostnameLocalhost() throws Exception
+ {
+ this.assertSysProp("java.rmi.server.hostname", "localhost");
+ }
+
+ /**
+ * Ensures that the Log Manager is set to JBoss LogManager
+ */
+ @Test
+ public void testLogManagerIsJBossLogManager() throws Exception
+ {
+ this.assertSysProp("java.util.logging.manager", "org.jboss.logmanager.LogManager");
+ }
+
+ /**
+ * Ensures that the system property for IPv4 Stack is set
+ */
+ @Test
+ public void testIpv4() throws Exception
+ {
+ this.assertSysProp("java.net.preferIPv4Stack", "true");
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Helper Methods ---------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Ensures the system property of specified name has the specified value,
+ * else fails the test
+ */
+ private void assertSysProp(final String propName, final String expectedValue)
+ {
+ // Get the prop value
+ final String propValue = AccessController.doPrivileged(new PrivilegedAction<String>()
+ {
+ @Override
+ public String run()
+ {
+ return System.getProperty(propName);
+ }
+
+ });
+ // Ensure expected
+ TestCase.assertEquals("Required system property was not set as expected", expectedValue, propValue);
+ }
+
+}
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources)
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/bootstrap.xml
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/bootstrap.xml 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/bootstrap.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bootstrap xmlns="urn:jboss:bootstrap:1.0">
-
-
- <!--
- Dummy file for testing, would ordinarily contain:
-
- <url>something.xml</url>
- -->
-
-</bootstrap>
\ No newline at end of file
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/bootstrap.xml (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/bootstrap.xml)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/bootstrap.xml (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/bootstrap.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bootstrap xmlns="urn:jboss:bootstrap:1.0">
+
+
+ <!--
+ Dummy file for testing, would ordinarily contain:
+
+ <url>something.xml</url>
+ -->
+
+</bootstrap>
\ No newline at end of file
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file1
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file1 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file1 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1 +0,0 @@
-Test File 1
\ No newline at end of file
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file1 (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file1)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file1 (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file1 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1 @@
+Test File 1
\ No newline at end of file
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file2
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file2 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file2 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1 +0,0 @@
-Test File 2
\ No newline at end of file
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file2 (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file2)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file2 (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/file2 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1 @@
+Test File 2
\ No newline at end of file
Deleted: projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/log4j.xml
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/log4j.xml 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/log4j.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Log4j Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id: log4j.xml 68671 2008-01-08 10:04:25Z wolfc $ -->
-
-<!--
- | For more configuration infromation and examples see the Jakarta Log4j
- | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
- <!-- ================================= -->
- <!-- Preserve messages in a local file -->
- <!-- ================================= -->
-
- <!-- A time/date based rolling appender -->
- <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
- <param name="File" value="target/test.log"/>
- <param name="Threshold" value="INFO"/>
- <param name="Append" value="false"/>
-
- <!-- Rollover at midnight each day -->
- <param name="DatePattern" value="'.'yyyy-MM-dd"/>
-
- <!-- Rollover at the top of each hour
- <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
- -->
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
-
- <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
- <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
- -->
- </layout>
- </appender>
-
- <!-- ============================== -->
- <!-- Append messages to the console -->
- <!-- ============================== -->
-
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.out"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
- </layout>
- </appender>
-
-
- <!-- ================ -->
- <!-- Limit categories -->
- <!-- ================ -->
-
- <category name="org.jboss">
- <priority value="INFO"/>
- </category>
-
- <category name="org.jnp">
- <priority value="INFO"/>
- </category>
-
- <category name="org.jboss.embedded">
- <priority value="ALL"/>
- </category>
-
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root>
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="FILE"/>
- </root>
-
-</log4j:configuration>
Copied: projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/log4j.xml (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/log4j.xml)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/log4j.xml (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/core/src/test/resources/log4j.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 68671 2008-01-08 10:04:25Z wolfc $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <param name="File" value="target/test.log"/>
+ <param name="Threshold" value="INFO"/>
+ <param name="Append" value="false"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <!-- Rollover at the top of each hour
+ <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+ -->
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+ <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+ <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss">
+ <priority value="INFO"/>
+ </category>
+
+ <category name="org.jnp">
+ <priority value="INFO"/>
+ </category>
+
+ <category name="org.jboss.embedded">
+ <priority value="ALL"/>
+ </category>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Deleted: projects/embedded/tags/1.0.0-alpha-3/pom.xml
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/pom.xml 2010-04-22 17:38:03 UTC (rev 104169)
+++ projects/embedded/tags/1.0.0-alpha-3/pom.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!--
- vi:ts=2:sw=2:expandtab:
--->
- <!--
-
- JBoss Embedded APIs for AS Aggregator POM
-
--->
-<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</groupId>
- <artifactId>jboss-parent</artifactId>
- <version>5</version>
- </parent>
-
- <!-- Model Information -->
- <modelVersion>4.0.0</modelVersion>
-
- <!-- Artifact Information -->
- <groupId>org.jboss.embedded</groupId>
- <artifactId>jboss-embedded-parent</artifactId>
- <version>1.0.0-alpha-3</version>
- <packaging>pom</packaging>
- <name>JBossAS Embedded Aggregator</name>
- <url>http://www.jboss.org</url>
- <description>JBossAS Embedded Aggregator</description>
-
- <!-- Build Configuration -->
- <build>
-
- </build>
-
- <!-- Aggregate Modules -->
- <modules>
- <module>api</module>
- <module>build</module>
- <module>core</module>
- </modules>
-
-</project>
Copied: projects/embedded/tags/1.0.0-alpha-3/pom.xml (from rev 104169, projects/embedded/tags/1.0.0-alpha-3/pom.xml)
===================================================================
--- projects/embedded/tags/1.0.0-alpha-3/pom.xml (rev 0)
+++ projects/embedded/tags/1.0.0-alpha-3/pom.xml 2010-04-22 19:18:35 UTC (rev 104175)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ vi:ts=2:sw=2:expandtab:
+-->
+ <!--
+
+ JBoss Embedded APIs for AS Aggregator POM
+
+-->
+<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</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>5</version>
+ </parent>
+
+ <!-- Model Information -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Information -->
+ <groupId>org.jboss.embedded</groupId>
+ <artifactId>jboss-embedded-parent</artifactId>
+ <version>1.0.0-alpha-3</version>
+ <packaging>pom</packaging>
+ <name>JBossAS Embedded Aggregator</name>
+ <url>http://www.jboss.org</url>
+ <description>JBossAS Embedded Aggregator</description>
+
+ <!-- Build Configuration -->
+ <build>
+
+ </build>
+
+ <!-- Aggregate Modules -->
+ <modules>
+ <module>api</module>
+ <module>build</module>
+ <module>core</module>
+ </modules>
+
+</project>
More information about the jboss-cvs-commits
mailing list