[jboss-cvs] JBossAS SVN: r87279 - in projects/ejb3/trunk/profile3_1/src: it and 36 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 14 08:36:07 EDT 2009


Author: jaikiran
Date: 2009-04-14 08:36:06 -0400 (Tue, 14 Apr 2009)
New Revision: 87279

Added:
   projects/ejb3/trunk/profile3_1/src/it/
   projects/ejb3/trunk/profile3_1/src/it/build/
   projects/ejb3/trunk/profile3_1/src/it/build/goals.txt
   projects/ejb3/trunk/profile3_1/src/it/build/pom.xml
   projects/ejb3/trunk/profile3_1/src/it/common/
   projects/ejb3/trunk/profile3_1/src/it/common/goals.txt
   projects/ejb3/trunk/profile3_1/src/it/common/pom.xml
   projects/ejb3/trunk/profile3_1/src/it/common/src/
   projects/ejb3/trunk/profile3_1/src/it/common/src/main/
   projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/
   projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/org/
   projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/org/jboss/
   projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/org/jboss/ejb3/
   projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/org/jboss/ejb3/profile3_1/
   projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/org/jboss/ejb3/profile3_1/test/
   projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/org/jboss/ejb3/profile3_1/test/common/
   projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/org/jboss/ejb3/profile3_1/test/common/AbstractProfile3_1_TestCase.java
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/goals.txt
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/pom.xml
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSB.java
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSBLocal.java
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSBRemote.java
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/ejb3/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/ejb3/profile3_1/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/ejb3/profile3_1/test/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/ejb3/profile3_1/test/common/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/ejb3/profile3_1/test/deployment/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/ejb3/profile3_1/test/deployment/unit/
   projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/ejb3/profile3_1/test/deployment/unit/Profile3_1_DeploymentTestCase.java
   projects/ejb3/trunk/profile3_1/src/it/pom.xml
   projects/ejb3/trunk/profile3_1/src/main/java/org/jboss/ejb3/profile3_1/common/
   projects/ejb3/trunk/profile3_1/src/main/java/org/jboss/ejb3/profile3_1/common/SimpleJavaEEModuleInformer.java
   projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/
   projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/classloading.xml
   projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/maindeployer.xml
   projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/naming.xml
Removed:
   projects/ejb3/trunk/profile3_1/src/main/resources/conf/deploy/transactionmanager-beans.xml
   projects/ejb3/trunk/profile3_1/src/test/
Modified:
   projects/ejb3/trunk/profile3_1/src/main/resources/conf/deploy/ejb-container-beans.xml
   projects/ejb3/trunk/profile3_1/src/main/resources/conf/deployers/ejb3-deployers-jboss-beans.xml
   projects/ejb3/trunk/profile3_1/src/main/resources/conf/deployers/jpa-deployers-jboss-beans.xml
Log:
EJBTHREE-1711 Shitty plugin (yes, that's the actual name of the plugin) for integration testing - Work in progress

Added: projects/ejb3/trunk/profile3_1/src/it/build/goals.txt
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/build/goals.txt	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/build/goals.txt	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1 @@
+clean install 

Added: projects/ejb3/trunk/profile3_1/src/it/build/pom.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/build/pom.xml	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/build/pom.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,176 @@
+<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>
+    <groupId>org.jboss.ejb3</groupId>
+    <artifactId>jboss-ejb3-build</artifactId>
+    <version>1.0.0-Beta11</version>
+    
+  </parent>  
+  <!-- POM Model Version -->
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Artifact Information -->
+  <groupId>org.jboss.ejb3</groupId>
+  <artifactId>profile3_1-it-build</artifactId>
+  <packaging>pom</packaging>
+  <version>testing</version>
+  <name>Profile3_1 Integration test build</name>
+  <url>http://labs.jboss.com/jbossejb3</url>
+  <description>Profile3_1 Integration test build</description>
+  
+  <properties>
+    <version.org.jboss.ejb3.jboss-ejb3-embedded>1.0.0-SNAPSHOT</version.org.jboss.ejb3.jboss-ejb3-embedded>
+    <version.org.jboss.deployers>2.0.3.GA</version.org.jboss.deployers>
+    <version.org.jboss_jboss-vfs>2.0.1.GA</version.org.jboss_jboss-vfs>
+    <version.org.jboss.bootstrap_jboss-bootstrap>1.0.0-Beta-1</version.org.jboss.bootstrap_jboss-bootstrap>
+    <version.org.jboss.jpa_jboss-jpa-deployers>1.0.0-Beta6</version.org.jboss.jpa_jboss-jpa-deployers>
+    <version.org.jboss.ejb3_jboss-ejb3-deployers>1.0.1-SNAPSHOT</version.org.jboss.ejb3_jboss-ejb3-deployers>
+    <version.org.jboss.ejb3_jboss-ejb3-nointerface>1.0.0-SNAPSHOT</version.org.jboss.ejb3_jboss-ejb3-nointerface>
+    <version.org.jboss.ejb3_jboss-ejb3-jta-profile>0.1.0-SNAPSHOT</version.org.jboss.ejb3_jboss-ejb3-jta-profile>
+
+  </properties>
+
+  
+    
+  <dependencies>
+    <!--  EJB3 Embedded dependency. Needs to be removed once the
+    deployers in Embedded are moved to ejb3-deployers. EJBTHREE-1712 -->
+      <dependency>
+        <groupId>org.jboss.ejb3</groupId>
+        <artifactId>jboss-ejb3-embedded</artifactId>
+        <version>${version.org.jboss.ejb3.jboss-ejb3-embedded}</version>
+         <exclusions>
+          <exclusion>
+                <groupId>org.jboss</groupId>
+                <artifactId>jboss-vfs</artifactId>
+            </exclusion>
+          <exclusion>
+                <groupId>org.jboss.deployers</groupId>
+                <artifactId>jboss-deployers-vfs</artifactId>
+            </exclusion>
+            <exclusion>
+                <groupId>org.jboss.deployers</groupId>
+                <artifactId>jboss-deployers-core-spi</artifactId>
+            </exclusion>
+        <exclusion>
+                <groupId>org.jboss.deployers</groupId>
+                <artifactId>jboss-deployers-impl</artifactId>
+            </exclusion>
+        <exclusion>
+                <groupId>org.jboss.deployers</groupId>
+                <artifactId>jboss-deployers-structure-spi</artifactId>
+            </exclusion>
+        <exclusion>
+                <groupId>org.jboss.jbossas</groupId>
+                <artifactId>jboss-as-bootstrap</artifactId>
+            </exclusion>
+
+        </exclusions>
+      </dependency>
+
+    <!-- Bootstrap -->
+      <dependency>
+        <groupId>org.jboss.bootstrap</groupId>
+        <artifactId>jboss-bootstrap</artifactId>
+        <version>${version.org.jboss.bootstrap_jboss-bootstrap}</version>
+        <scope>test</scope>
+      </dependency>
+
+    <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+	<scope>test</scope>
+      </dependency>
+      <!-- JBoss deployers -->
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-vfs</artifactId>
+        <version>${version.org.jboss.deployers}</version>
+        <scope>test</scope>
+      </dependency>
+
+      <!-- EJB3 deployers -->
+       <dependency>
+            <groupId>org.jboss.ejb3</groupId>
+            <artifactId>jboss-ejb3-deployers</artifactId>
+            <version>${version.org.jboss.ejb3_jboss-ejb3-deployers}</version>
+       </dependency>
+
+
+      <dependency>
+          <groupId>org.jboss</groupId>
+          <artifactId>jboss-vfs</artifactId>
+        <version>${version.org.jboss_jboss-vfs}</version>
+      </dependency>
+
+
+     <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-impl</artifactId>
+        <version>${version.org.jboss.deployers}</version>
+
+      </dependency>
+
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-structure-spi</artifactId>
+        <version>${version.org.jboss.deployers}</version>
+      </dependency>
+
+       <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-core-spi</artifactId>
+        <version>${version.org.jboss.deployers}</version>
+      </dependency>
+
+      <!--  JPA deployers -->
+      <dependency>
+        <groupId>org.jboss.jpa</groupId>
+        <artifactId>jboss-jpa-deployers</artifactId>
+        <version>${version.org.jboss.jpa_jboss-jpa-deployers}</version>
+
+      </dependency>
+
+      <!-- AOP Deployers -->
+      <dependency>
+        <groupId>org.jboss.ejb3</groupId>
+        <artifactId>jboss-ejb3-aop-deployers</artifactId>
+        <version>0.1.0-SNAPSHOT</version>
+      </dependency>
+
+
+        <!-- JTA profile -->
+        <dependency>
+            <groupId>org.jboss.ejb3</groupId>
+            <artifactId>jboss-ejb3-jta-profile</artifactId>
+            <version>${version.org.jboss.ejb3_jboss-ejb3-jta-profile}</version>
+        </dependency>
+
+          <!--  EJB3.1 no-interface support -->
+        <dependency>
+           <groupId>org.jboss.ejb3</groupId>
+           <artifactId>jboss-ejb3-nointerface</artifactId>
+           <version>${version.org.jboss.ejb3_jboss-ejb3-nointerface}</version>
+           <scope>runtime</scope>
+        </dependency>
+
+        <!-- TODO: Remove this dependency -->
+        <dependency>
+            <groupId>org.jboss.jbossas</groupId>
+            <artifactId>jboss-as-ejb3</artifactId>
+            <version>5.0.0.GA</version>
+        </dependency>
+	
+	<!-- Doesn't look right, this dependency -->
+	<!--<dependency>
+	  <groupId>org.jboss.ejb3</groupId>
+	  <artifactId>jboss-ejb3-profile3_1</artifactId>
+	  <version>1.0.0-SNAPSHOT</version>
+	</dependency>-->
+        
+  </dependencies>
+  
+  
+</project>  
+ 
+ 

Added: projects/ejb3/trunk/profile3_1/src/it/common/goals.txt
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/common/goals.txt	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/common/goals.txt	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1 @@
+clean install 

Added: projects/ejb3/trunk/profile3_1/src/it/common/pom.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/common/pom.xml	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/common/pom.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,48 @@
+<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.ejb3</groupId>
+    <artifactId>profile3_1-it-build</artifactId>
+    <version>testing</version>
+    <relativePath>../build/pom.xml</relativePath>
+  </parent>
+
+  <!-- POM Model Version -->
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Artifact Information -->
+  <groupId>org.jboss.ejb3</groupId>
+  <artifactId>profile3_1-it-common</artifactId>
+  <packaging>jar</packaging>
+  <version>testing</version>
+  <name>Profile3_1 Deployment Test</name>
+  <url>http://labs.jboss.com/jbossejb3</url>
+  <description>Common test framework</description>
+<build>
+<plugins>
+<plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+		<version>2.0.2</version>
+                <configuration>
+                  <source>1.6</source>
+                  <target>1.6</target>
+                  <executable>${JDK6_HOME}/bin/javac</executable>
+                </configuration>
+            </plugin>
+	    <plugin>
+              <artifactId>maven-surefire-plugin</artifactId>
+              <configuration>
+                
+                     <redirectTestOutputToFile>true</redirectTestOutputToFile>
+                     <printSummary>true</printSummary>
+                     <forkMode>once</forkMode>
+                    <jvm>${JDK6_HOME}/bin/java</jvm>
+              </configuration>
+          </plugin>
+	    	</plugins>
+    </build>
+
+  
+</project>  
+ 

Added: projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/org/jboss/ejb3/profile3_1/test/common/AbstractProfile3_1_TestCase.java
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/org/jboss/ejb3/profile3_1/test/common/AbstractProfile3_1_TestCase.java	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/common/src/main/java/org/jboss/ejb3/profile3_1/test/common/AbstractProfile3_1_TestCase.java	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,369 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.profile3_1.test.common;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import org.jboss.bootstrap.microcontainer.ServerImpl;
+import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.microcontainer.MCServer;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * AbstractProfile3_1_TestCase
+ *
+ * This provides the necessary "profile3_1" profile for integration testing of
+ * components that make up this profile.
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public abstract class AbstractProfile3_1_TestCase
+{
+
+   /**
+    * The server
+    */
+   private static MCServer server;
+
+   /**
+    * Logger
+    */
+   private static Logger logger = Logger.getLogger(AbstractProfile3_1_TestCase.class);
+
+   /**
+    * The home of our server runtime environment
+    */
+   protected static final String SERVER_HOME_DIR_PATH = "target/profile3_1_bootstrap";
+
+   /**
+    * The home of our "profile3_1" server profile runtime environment
+    */
+   protected static final String SERVER_PROFILE3_1_HOME_DIR_PATH = SERVER_HOME_DIR_PATH + "/server/profile3_1";
+
+   // The following are all mandated by the bootstrap server, so let's just have them even
+   // though they are not used in our tests
+   /**
+    * "profile3_1" data dir
+    */
+   protected static final String SERVER_PROFILE3_1_DATA_DIR_PATH = SERVER_PROFILE3_1_HOME_DIR_PATH + "/data";
+
+   /**
+    * "profile3_1" log dir
+    */
+   protected static final String SERVER_PROFILE3_1_LOG_DIR_PATH = SERVER_PROFILE3_1_HOME_DIR_PATH + "/log";
+
+   /**
+    * "profile3_1" tmp dir
+    */
+   protected static final String SERVER_PROFILE3_1_TMP_DIR_PATH = SERVER_PROFILE3_1_HOME_DIR_PATH + "/tmp";
+
+   /**
+    * "profile3_1" tmp/deploy dir
+    */
+   protected static final String SERVER_PROFILE3_1_TMP_DEPLOY_DIR_PATH = SERVER_PROFILE3_1_TMP_DIR_PATH + "/deploy";
+
+   /**
+    * "profile3_1" tmp/native dir
+    */
+   protected static final String SERVER_PROFILE3_1_TMP_NATIVE_DIR_PATH = SERVER_PROFILE3_1_TMP_DIR_PATH + "/native";
+
+   /**
+    * This is where we have our bootstrap configurations for our
+    *  "profile3_1" tests. This is the place where we place our bootstrap.xml.
+    *
+    */
+   protected static final String SERVER_PROFILE3_1_CONFIG_DIR_PATH = "src/main/resources/conf";
+
+   /**
+    * This is where we place our configuration files which provide the runtime environment
+    * for our "profile3_1". Ex: ejb3-deployer-jboss-beans.xml is placed here
+    */
+   protected static final String SERVER_PROFILE3_1_DEPLOYERS_DIR_PATH = "src/main/resources/conf/deployers";
+
+   /**
+    * This is where we place our applications to be deployed. The "applications" can also include
+    * EJB3 remoting connectors, interceptors etc...
+    */
+   protected static final String SERVER_PROFILE3_1_DEPLOY_DIR_PATH = "src/main/resources/conf/deploy";
+
+   /**
+    * Bootstrap the server.
+    * It first creates a server through the bootstrap.xml. This does not start the profile3_1
+    * (i.e. it does NOT deploy the deployers or the applications).
+    *
+    * @see #startProfile()
+    * @throws Exception
+    */
+   public static void bootstrap() throws Exception
+   {
+      server = new ServerImpl();
+      Properties serverBootstrapProperties = createBootstrapEnv();
+      server.init(serverBootstrapProperties);
+      logger.trace("Inited profile3_1 server");
+      long start = System.currentTimeMillis();
+      server.start();
+      long end = System.currentTimeMillis();
+      logger.info("Profile3_1 bootstrap started in " + (end - start) + " milli sec.");
+
+
+   }
+
+   /**
+    * Shutdown the server
+    * @throws Exception
+    */
+   public static void shutdown() throws Exception
+   {
+      if (server != null)
+      {
+         server.shutdown();
+         logger.info("Profile3_1 server has been shutdown");
+      }
+   }
+
+   /**
+    * Deploys the deployers and the applications
+    * to start the profile3_1
+    *
+    * @throws Exception
+    */
+   public static void startProfile() throws Exception
+   {
+      logger.debug("Starting Profile3_1");
+      deployDeployers();
+
+      // Some of the deployers/mc beans come from the classpath jars (ex: For JTA support,
+      // jboss-jta-profile.jar/META-INF/jboss-beans.xml). We need to deploy those too.
+      // This approach of leniently deploying all META-INF/jboss-beans.xml from the
+      // classpath is OK as long as we know that those are non-conflicting and are infact
+      // required to be deployed.
+      deployClasspathJBossBeans();
+
+
+      logger.debug("Profile3_1 deployers ready");
+      deployApplications();
+      logger.debug("Profile3_1 completely started");
+   }
+
+   protected static void deployClasspathJBossBeans() throws Exception
+   {
+      Enumeration<URL> urls = Thread.currentThread().getContextClassLoader().getResources("META-INF/jboss-beans.xml");
+      while(urls.hasMoreElements())
+      {
+         URL url = urls.nextElement();
+         logger.debug("Deploying META-INF/jboss-beans.xml from classpath: " + url);
+         deploy(url);
+      }
+   }
+
+   /**
+    * Deploys the deployers
+    *
+    * @throws Exception
+    */
+   public static void deployDeployers() throws Exception
+   {
+      // now deploy the Profile3_1 deployers
+      deploy(new File(SERVER_PROFILE3_1_DEPLOYERS_DIR_PATH).toURL());
+   }
+
+   /**
+    * Deploy the applications (in deploy folder)
+    *
+    * @throws Exception
+    */
+   public static void deployApplications() throws Exception
+   {
+      deploy(new File(SERVER_PROFILE3_1_DEPLOY_DIR_PATH).toURL());
+   }
+
+   /**
+    * Create the necessary infrastructure to boot the server. This includes, creating
+    * the necessary folder structure mandated by the {@link MCServer}. This furthermore
+    * sets the server home and profile home URLs for the bootstrap.
+    *
+    * @return
+    * @throws IOException
+    */
+   protected static Properties createBootstrapEnv() throws IOException
+   {
+      URL serverHome = mkdir(SERVER_HOME_DIR_PATH);
+      URL serverProfile3_1Home = mkdir(SERVER_PROFILE3_1_HOME_DIR_PATH);
+      if (logger.isTraceEnabled())
+      {
+         logger.trace("Server Home is " + serverHome);
+         logger.trace("Profile3_1 Home is " + serverProfile3_1Home);
+      }
+
+      mkdir(SERVER_PROFILE3_1_DATA_DIR_PATH);
+      mkdir(SERVER_PROFILE3_1_LOG_DIR_PATH);
+      mkdir(SERVER_PROFILE3_1_TMP_DIR_PATH);
+      mkdir(SERVER_PROFILE3_1_TMP_DEPLOY_DIR_PATH);
+      mkdir(SERVER_PROFILE3_1_TMP_NATIVE_DIR_PATH);
+
+      Properties serverBootstrapProperties = new Properties();
+      serverBootstrapProperties.put(ServerConfig.HOME_DIR, serverHome.toString());
+      serverBootstrapProperties.put(ServerConfig.SERVER_HOME_DIR, serverProfile3_1Home.toString());
+
+      URL profile3_1_ConfigDir = new File(SERVER_PROFILE3_1_CONFIG_DIR_PATH).toURL(); 
+      serverBootstrapProperties.put(ServerConfig.SERVER_CONFIG_URL, profile3_1_ConfigDir);
+      if (logger.isTraceEnabled())
+      {
+         logger.trace("Profile3_1 config dir is " + profile3_1_ConfigDir);
+      }
+
+      return serverBootstrapProperties;
+   }
+
+   /**
+    * Utility method to create a dir
+    *
+    * @param path
+    * @return
+    * @throws IOException
+    */
+   protected static URL mkdir(String path) throws IOException
+   {
+      File file = new File(path);
+      boolean success = file.mkdirs() || file.isDirectory();
+      if (!success)
+         throw new IOException("Could not create " + path);
+      return file.toURL();
+
+   }
+
+   /**
+    * Utility method to look for a dir
+    *
+    * @param path
+    * @return
+    * @throws IOException
+    */
+   protected static URL findDir(String path) throws IOException
+   {
+      File file = new File(path);
+      boolean success = file.isDirectory();
+      if (!success)
+         throw new IOException(path + " is either not present or is not a dir");
+      return file.toURL();
+
+   }
+
+   /**
+    * Deploys the URL.
+    *
+    * This uses the {@link MainDeployer} (configured during the bootstrap process) to deploy
+    * the URL. The {@link MainDeployer} internally will pass this deployment through all available
+    * deployers
+    *
+    * @param deployURL
+    * @throws Exception
+    */
+   protected static void deploy(URL deployURL) throws Exception
+   {
+      if (deployURL == null)
+      {
+         throw new IllegalArgumentException("Null URL passed to deploy");
+      }
+      logger.debug("Deploying " + deployURL);
+      MainDeployer mainDeployer = getMainDeployer();
+      VirtualFile root = VFS.getRoot(deployURL);
+      VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(root);
+      mainDeployer.deploy(deployment);
+      mainDeployer.checkComplete(deployment);
+      logger.debug("Completely deployed " + deployURL);
+
+   }
+
+   /**
+    * Deploys a class.
+    *
+    * TODO: Jaikiran - This is in testing phase, since i am not yet sure whether we have a
+    * deployer in EJB3 which works only on class instead of .jar, .ear components.
+    * The main intention to allow deploying a class is to avoid the additional jar/ear creation
+    * during testcases
+    *
+    * NOT SUPPORTED
+    *
+    * @param deployableClass
+    * @throws Exception
+    */
+   protected static void deploy(Class<?> deployableClass) throws Exception
+   {
+      String packageName = deployableClass.getPackage().getName();
+      packageName = packageName.replaceAll("\\.", "/");
+      if (logger.isTraceEnabled())
+      {
+         logger.trace("Deploying package = " + packageName);
+      }
+      URL packageURL =Thread.currentThread().getContextClassLoader().getResource(packageName);
+      if (logger.isTraceEnabled())
+      {
+         logger.trace("URL for package is " + packageName + " is = " + packageURL);
+      }
+      deploy(packageURL);
+
+   }
+
+   /**
+    * Deploy a resource
+    */
+   protected static void deploy(String resourceName) throws Exception
+   {
+      if (resourceName == null)
+      {
+         throw new IllegalArgumentException("Null resourceName passed to deploy");
+      }
+      URL resourceURL = Thread.currentThread().getContextClassLoader().getResource(resourceName);
+      deploy(resourceURL);
+
+   }
+
+   /**
+    * Returns the {@link MainDeployer} installed during bootstrap
+    *
+    * @return
+    */
+   protected static MainDeployer getMainDeployer()
+   {
+      ControllerContext context = server.getKernel().getController().getContext("MainDeployer",
+            ControllerState.INSTALLED);
+      if (context == null)
+      {
+         throw new RuntimeException("No MainDeployer is available or MainDeployer is not in INSTALLED state");
+      }
+      return (MainDeployer) context.getTarget();
+
+   }
+}

Added: projects/ejb3/trunk/profile3_1/src/it/deployment-test/goals.txt
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/deployment-test/goals.txt	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/deployment-test/goals.txt	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1 @@
+clean package 

Added: projects/ejb3/trunk/profile3_1/src/it/deployment-test/pom.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/deployment-test/pom.xml	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/deployment-test/pom.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,59 @@
+<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.ejb3</groupId>
+    <artifactId>profile3_1-it-build</artifactId>
+    <version>testing</version>
+    <relativePath>../build/pom.xml</relativePath>
+  </parent>
+
+  <!-- POM Model Version -->
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Artifact Information -->
+  <groupId>org.jboss.ejb3</groupId>
+  <artifactId>profile3_1-deployment-test</artifactId>
+  <packaging>jar</packaging>
+  <version>testing</version>
+  <name>Profile3_1 Deployment Test</name>
+  <url>http://labs.jboss.com/jbossejb3</url>
+  <description>Test to ensure basic deployment in Profile3_1 works</description>
+<build>
+
+<plugins>
+<!-- TODO: For some reason, configuring the compiler-plugin to JDK6, through the "parent" of this pom
+hierarchy does not work. Needs to be explicitly specified in each of the poms. -->
+<plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+		<version>2.0.2</version>
+                <configuration>
+                  <source>1.6</source>
+                  <target>1.6</target>
+                  <executable>${JDK6_HOME}/bin/javac</executable>
+                </configuration>
+            </plugin>
+	    <plugin>
+              <artifactId>maven-surefire-plugin</artifactId>
+              <configuration>
+                
+                     <redirectTestOutputToFile>true</redirectTestOutputToFile>
+                     <printSummary>true</printSummary>
+                     <forkMode>once</forkMode>
+                    <jvm>${JDK6_HOME}/bin/java</jvm>
+              </configuration>
+          </plugin>
+	    	</plugins>
+    </build>
+    
+    <dependencies>
+         <dependency>
+            <groupId>org.jboss.ejb3</groupId>
+            <artifactId>profile3_1-it-common</artifactId>
+            <version>testing</version>
+	</dependency>
+    </dependencies>
+
+  
+</project>  
+ 

Added: projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSB.java
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSB.java	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSB.java	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.profile3_1.test.deployment;
+
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+/**
+ *
+ * SimpleSLSB
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+ at Stateless
+ at Local(SimpleSLSBLocal.class)
+ at Remote (SimpleSLSBRemote.class)
+public class SimpleSLSB implements SimpleSLSBLocal
+{
+
+   public String echo(String name)
+   {
+      return name;
+   }
+}

Added: projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSBLocal.java
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSBLocal.java	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSBLocal.java	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.profile3_1.test.deployment;
+
+/**
+ * 
+ * SimpleSLSBLocal
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface SimpleSLSBLocal
+{
+   String echo(String name);
+}

Added: projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSBRemote.java
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSBRemote.java	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/main/java/org/jboss/ejb3/profile3_1/test/deployment/SimpleSLSBRemote.java	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.profile3_1.test.deployment;
+
+/**
+ * SimpleSLSBRemote
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface SimpleSLSBRemote extends SimpleSLSBLocal
+{
+
+}

Added: projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/ejb3/profile3_1/test/deployment/unit/Profile3_1_DeploymentTestCase.java
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/ejb3/profile3_1/test/deployment/unit/Profile3_1_DeploymentTestCase.java	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/deployment-test/src/test/java/org/jboss/ejb3/profile3_1/test/deployment/unit/Profile3_1_DeploymentTestCase.java	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.profile3_1.test.deployment.unit;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import org.jboss.ejb3.profile3_1.test.common.AbstractProfile3_1_TestCase;
+import org.jboss.ejb3.profile3_1.test.deployment.SimpleSLSB;
+import org.jboss.ejb3.profile3_1.test.deployment.SimpleSLSBLocal;
+import org.jboss.ejb3.profile3_1.test.deployment.SimpleSLSBRemote;
+import org.jboss.logging.Logger;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Profile3_1_DeploymentTestCase
+ *
+ * Testcase to ensure that the profile3_1 bootstrap loads properly
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public class Profile3_1_DeploymentTestCase extends AbstractProfile3_1_TestCase
+{
+   /**
+    * Logger
+    */
+   private static Logger logger = Logger.getLogger(Profile3_1_DeploymentTestCase.class);
+
+   @BeforeClass
+   public static void beforeClass() throws Throwable
+   {
+      bootstrap();
+      startProfile();
+   }
+
+   @AfterClass
+   public static void afterClass() throws Throwable
+   {
+      shutdown();
+   }
+
+   /**
+    * This test ensures that the basic deployment support provided by
+    * profile3_1 component is working
+    *
+    * @throws Throwable
+    */
+   @Test
+   public void testBeanDeployment() throws Throwable
+   {
+      // Deploy the jar (containing the bean)
+      deploy(Thread.currentThread().getContextClassLoader().getResource("ejb3-profile-test.jar"));
+      logger.info("ejb3-profile-test.jar deployed");
+
+      // lookup the bean
+      Context ctx = new InitialContext();
+      SimpleSLSBLocal localBean = (SimpleSLSBLocal) ctx.lookup("SimpleSLSB/local");
+      logger.debug("Successfully looked up local bean " + localBean);
+
+      // invoke a method
+      String message = "hello";
+      String returnedMessage = localBean.echo(message);
+      logger.debug("Client sent message = " + message + " ; Local bean returned message = " + returnedMessage );
+
+      assertNotNull("Local bean returned null message",returnedMessage);
+      assertEquals("Local bean returned incorrect message",message,returnedMessage);
+
+      // now let's check the remote business interface
+      SimpleSLSBRemote remoteBean = (SimpleSLSBRemote) ctx.lookup("SimpleSLSB/remote");
+      logger.debug("Successfully looked up remote bean " + remoteBean);
+
+      String messageFromRemoteBean = remoteBean.echo(message);
+      logger.debug("Client sent message = " + message + " ; remote bean returned = " + messageFromRemoteBean);
+
+      assertNotNull("Local bean returned null message",messageFromRemoteBean);
+      assertEquals("Local bean returned incorrect message",message,messageFromRemoteBean);
+
+   }
+
+//   @Test
+//   public void testClassDeployment() throws Exception
+//   {
+//      deploy(SimpleSLSB.class);
+//      Context ctx = new InitialContext();
+//       SimpleSLSBLocal localBean = (SimpleSLSBLocal) ctx.lookup("SimpleSLSB/local");
+//       logger.debug("Successfully looked up local bean " + localBean);
+//      logger.info("Done test2");
+//
+//   }
+}

Added: projects/ejb3/trunk/profile3_1/src/it/pom.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/it/pom.xml	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/it/pom.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  vi:ts=2:sw=2:expandtab:
+-->
+<!-- 
+  The parent maven for the ejb3 project
+
+  This pom aggregates the subproject pom
+  
+  To build this project maven 2 should be installed and in the system path.  From the command line
+  run "mvn" from the build directory and "install" will be used as the default goal.  In order to use 
+  the "deploy" goal, the mvn.cvs.root should be specified in settings.xml.
+-->
+<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>3</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.ejb3</groupId>
+  <artifactId>jboss-ejb3-profile3_1-it</artifactId>
+  <version>testing</version>
+  <packaging>pom</packaging>
+  <name>JBoss EJB3 Profile3_1 Integration tests aggregator</name>
+  <url>http://labs.jboss.com/jbossejb3/</url>
+  <description>
+    JBoss EJB3 Profile3_1 Integration tests aggregator
+  </description>
+
+  <!-- Aggregate Modules -->
+  <modules>
+    <module>build</module>
+    <module>common</module>
+    <module>deployment-test</module>
+    
+  </modules>
+
+  <build>
+    
+        <plugins>
+        
+        <!--  Profile3_1 needs Java6 -->
+            <plugin>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <executions>
+                  <execution>
+                    <id>enforce-jdk6</id>
+                    <goals>
+                      <goal>enforce</goal>
+                    </goals>
+                    <configuration>
+                      <rules>
+                        <requireProperty>
+                          <property>env.JDK6_HOME</property>
+                          <message>JDK6_HOME is not set</message>
+                        </requireProperty>
+                      </rules>
+                    </configuration>
+                  </execution>
+                </executions>
+            </plugin>
+      
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+		<version>2.0.2</version>
+                <configuration>
+                  <source>1.6</source>
+                  <target>1.6</target>
+                  <executable>${JDK6_HOME}/bin/javac</executable>
+                </configuration>
+            </plugin>
+
+	</plugins>
+      
+    </build>
+
+</project>

Copied: projects/ejb3/trunk/profile3_1/src/main/java/org/jboss/ejb3/profile3_1/common/SimpleJavaEEModuleInformer.java (from rev 85380, projects/jpa/trunk/deployers/src/test/java/org/jboss/jpa/deployers/test/common/SimpleJavaEEModuleInformer.java)
===================================================================
--- projects/ejb3/trunk/profile3_1/src/main/java/org/jboss/ejb3/profile3_1/common/SimpleJavaEEModuleInformer.java	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/main/java/org/jboss/ejb3/profile3_1/common/SimpleJavaEEModuleInformer.java	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.profile3_1.common;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.jpa.javaee.JavaEEModuleInformer;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ear.jboss.JBossAppMetaData;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class SimpleJavaEEModuleInformer implements JavaEEModuleInformer
+{
+   private static final Logger log = Logger.getLogger(SimpleJavaEEModuleInformer.class);
+
+   public String getApplicationName(DeploymentUnit deploymentUnit)
+   {
+      DeploymentUnit application = deploymentUnit.getTopLevel();
+//      if(application == null)
+//         return null;
+      if(!application.isAttachmentPresent(JBossAppMetaData.class))
+         return null;
+      return application.getSimpleName();
+   }
+
+   public String getModulePath(DeploymentUnit deploymentUnit)
+   {
+      return deploymentUnit.getRelativePath();
+   }
+
+   public ModuleType getModuleType(DeploymentUnit deploymentUnit)
+   {
+      return ModuleType.JAVA;
+   }
+}

Added: projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/classloading.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/classloading.xml	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/classloading.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   The core classloading system
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+
+   <!--
+      The classloader implementation
+   -->
+   <bean name="ClassLoaderSystem" class="org.jboss.classloader.spi.ClassLoaderSystem">
+      <classloader><null/></classloader>
+      <constructor factoryClass="org.jboss.classloader.spi.ClassLoaderSystem" factoryMethod="getInstance"/>
+   </bean>
+
+   <!-- 
+      ClassLoader management and resolution
+   -->
+   <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
+      <classloader><null/></classloader>
+      <incallback method="addModule" state="Configured"/>
+      <uncallback method="removeModule" state="Configured"/>
+   </bean>
+
+   
+</deployment>

Added: projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/maindeployer.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/maindeployer.xml	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/maindeployer.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!--  TODO: Jaikiran - Need to understand what this does. I keep seeing a new class being introduced in
+   each component (ejb3-embedded, ejb3-timerservice etc...) just to do this similar stuff. Not sure how this
+   affects the deployments. Until then, let's create one in profile3_1 and use it -->
+
+   <bean name="SimpleClassLoaderDeployer" class="org.jboss.ejb3.profile3_1.deployers.SimpleClassLoaderDeployer"/>
+
+   <!-- The MainDeployer -->
+   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
+      <property name="deployers"><inject bean="Deployers"/></property>
+      <!--property name="mgtDeploymentCreator"><inject bean="ManagedDeploymentCreator"/></property-->
+   </bean>
+
+   <!-- The holder for deployers that determine structure -->
+   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+      <property name="structureBuilder">
+         <!-- The consolidator of the structure information -->
+         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
+      </property>
+      <!-- Accept any implementor of structure deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- The holder for deployers that do real deployment -->
+   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
+      <!-- Accept any implementor of deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- File Structure -->
+   <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure"/>
+
+   <!-- File Structure -->
+   <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure"/>
+
+   <!-- POJO Deployment -->
+   <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer"/>
+   <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer"/>
+   <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
+      <constructor><parameter class="org.jboss.kernel.Kernel"><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+   </bean>
+
+   <bean name="MBeanServer" class="javax.management.MBeanServer">
+      <constructor factoryClass="javax.management.MBeanServerFactory" factoryMethod="newMBeanServer"/>
+   </bean>
+
+  <bean name="ManagedDeploymentCreator" class="org.jboss.deployers.plugins.managed.TypedManagedDeploymentCreator" />
+
+
+
+
+  <!-- AOP deployers -->
+  <bean name="AOPXMLMetaDataParserDeployer" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
+      <constructor>
+         <parameter>org.jboss.aop.microcontainer.beans.metadata.AOPDeployment</parameter>
+      </constructor>
+      <property name="suffix">-aop.xml</property>
+   </bean>
+   <bean name="AOPAnnotationMetaDataParserDeployer" class="org.jboss.aop.asintegration.jboss5.AOPAnnotationMetaDataParserDeployer">
+      <constructor>
+         <parameter><inject bean="AOPXMLMetaDataParserDeployer" property="relativeOrder"/></parameter>
+      </constructor>
+   </bean>
+
+  <!-- For *-service.xml deployments -->
+     <bean name="SARDeployer" class="org.jboss.system.deployers.SARDeployer">
+   </bean>
+
+
+</deployment>

Added: projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/naming.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/naming.xml	                        (rev 0)
+++ projects/ejb3/trunk/profile3_1/src/main/resources/conf/bootstrap/naming.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <!-- JNDI -->
+   <bean name="NamingServer" class="org.jnp.server.SingletonNamingServer"/>
+   
+   <bean name="JavaCompInitializer" class="org.jboss.naming.JavaCompInitializer">
+      <depends>NamingServer</depends>
+   </bean>
+</deployment>
\ No newline at end of file

Modified: projects/ejb3/trunk/profile3_1/src/main/resources/conf/deploy/ejb-container-beans.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/main/resources/conf/deploy/ejb-container-beans.xml	2009-04-14 12:28:22 UTC (rev 87278)
+++ projects/ejb3/trunk/profile3_1/src/main/resources/conf/deploy/ejb-container-beans.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -4,6 +4,6 @@
    <bean name="EJB3UserTransactionprovider" class="org.jboss.ejb3.tx.EJB3UserTransactionProvider">
       <constructor factoryClass="org.jboss.ejb3.tx.EJB3UserTransactionProvider" factoryMethod="getSingleton"/>
    </bean>
-   
+   <!-- TODO: Remove dependency on embedded -->
    <bean name="EmbeddedCachedConnectionManagerBridge" class="org.jboss.ejb3.embedded.connectionmanager.EmbeddedCachedConnectionManager"/>
 </deployment>

Deleted: projects/ejb3/trunk/profile3_1/src/main/resources/conf/deploy/transactionmanager-beans.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/main/resources/conf/deploy/transactionmanager-beans.xml	2009-04-14 12:28:22 UTC (rev 87278)
+++ projects/ejb3/trunk/profile3_1/src/main/resources/conf/deploy/transactionmanager-beans.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-   <!-- JTA -->
-   <bean name="TransactionManager" class="org.jboss.ejb3.embedded.service.SimpleTransactionService">
-      <depends>NamingServer</depends>
-   </bean>
-   
-   <bean name="RealTransactionManager">
-      <constructor factoryMethod="getTransactionManager">
-         <factory bean="TransactionManager"/>
-      </constructor>
-   </bean>
-</deployment>

Modified: projects/ejb3/trunk/profile3_1/src/main/resources/conf/deployers/ejb3-deployers-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/main/resources/conf/deployers/ejb3-deployers-jboss-beans.xml	2009-04-14 12:28:22 UTC (rev 87278)
+++ projects/ejb3/trunk/profile3_1/src/main/resources/conf/deployers/ejb3-deployers-jboss-beans.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <deployment xmlns="urn:jboss:bean-deployer:2.0">
 
-<!--  EJB3 Embedded deployers
-	If more deployers are needed (from ejb3-deployers or as->ejb3) then they will be added as per requirement
+<!--  
+	If more deployers are needed (from ejb3-deployers ) then they will be added as per requirement
 
  -->
    <!-- TODO: move SchemaResolverConfig to a more general beans.xml -->
@@ -56,6 +56,7 @@
    <!-- EJB3 ProcessorChain Deployer -->
    <bean name="Ejb3MetadataProcessingDeployer" class="org.jboss.ejb3.deployers.Ejb3MetadataProcessingDeployer" />
 
+    <!-- TODO: The embedded deployers need a different place to avoid dependency on ejb3-embedded -->
      <bean name="EjbModuleDeployer" class="org.jboss.ejb3.embedded.deployers.EjbModuleDeployer"/>
    <bean name="EjbComponentDeployer" class="org.jboss.ejb3.embedded.deployers.EjbComponentDeployer"/>
 
@@ -147,4 +148,5 @@
       <uncallback method="removeContainer"/>
     </bean>
 
+
 </deployment>
\ No newline at end of file

Modified: projects/ejb3/trunk/profile3_1/src/main/resources/conf/deployers/jpa-deployers-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/profile3_1/src/main/resources/conf/deployers/jpa-deployers-jboss-beans.xml	2009-04-14 12:28:22 UTC (rev 87278)
+++ projects/ejb3/trunk/profile3_1/src/main/resources/conf/deployers/jpa-deployers-jboss-beans.xml	2009-04-14 12:36:06 UTC (rev 87279)
@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <deployment xmlns="urn:jboss:bean-deployer:2.0">
-   <bean name="DataSourceDependencyResolver" class="org.jboss.as.jpa.resolvers.JBossASDataSourceDependencyResolver"/>
-   
-   <bean name="JavaEEModuleInformer" class="org.jboss.as.javaee.SimpleJavaEEModuleInformer"/>
-   
+    <!-- TODO: Remove dependency on jboss-as-ejb3 -->
+    <bean name="DataSourceDependencyResolver" class="org.jboss.as.jpa.resolvers.JBossASDataSourceDependencyResolver"/>
+
+    <bean name="JavaEEModuleInformer" class="org.jboss.ejb3.profile3_1.common.SimpleJavaEEModuleInformer"/>
    <bean name="JBossSearchStrategy" class="org.jboss.jpa.resolvers.strategy.JBossSearchStrategy"/>
-   
+
    <bean name="SpecCompliantSearchStrategy" class="org.jboss.jpa.resolvers.strategy.SpecCompliantSearchStrategy"/>
-   
+
    <!--
-      Can be DefaultPersistenceUnitDependencyResolver for spec compliant resolving, 
+      Can be DefaultPersistenceUnitDependencyResolver for spec compliant resolving,
       InterApplicationPersistenceUnitDependencyResolver for resolving beyond EARs,
       or DynamicPersistencePersistenceUnitDependencyResolver which allows configuration via JMX.
    -->
    <bean name="PersistenceUnitDependencyResolver" class="org.jboss.jpa.resolvers.DynamicPersistenceUnitDependencyResolver"/>
-   
+
    <bean name="XPCResolver" class="org.jboss.ejb3.stateful.EJB3XPCResolver"/>
-   
+
    <bean name="PersistenceParsingDeployer" class="org.jboss.jpa.deployers.PersistenceParsingDeployer"/>
 
    <bean name="PersistenceDeployer" class="org.jboss.jpa.deployers.PersistenceDeployer"/>




More information about the jboss-cvs-commits mailing list