[jboss-cvs] JBossAS SVN: r104567 - in projects/jboss-jca/trunk: common and 16 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri May 7 14:07:38 EDT 2010


Author: jesper.pedersen
Date: 2010-05-07 14:07:37 -0400 (Fri, 07 May 2010)
New Revision: 104567

Added:
   projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/PostClassLoaderEventListener.java
   projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/PreClassLoaderEventListener.java
   projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/PostClassLoaderEventListener.java
   projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/PreClassLoaderEventListener.java
   projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/Shutdown.java
Removed:
   projects/jboss-jca/trunk/doc/developerguide/en/modules/fungal.xml
   projects/jboss-jca/trunk/fungal/
Modified:
   projects/jboss-jca/trunk/build.xml
   projects/jboss-jca/trunk/common/build.xml
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/ConnectionFactoryBuilder.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalApplicationServerJNDIHandler.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalConnectionFactoryBuilder.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployment.java
   projects/jboss-jca/trunk/doc/developerguide/en/master.xml
   projects/jboss-jca/trunk/doc/developerguide/en/modules/standalone.xml
   projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/EmbeddedJCA.java
   projects/jboss-jca/trunk/ivy.settings.xml
   projects/jboss-jca/trunk/ivy.xml
   projects/jboss-jca/trunk/sjc/build.xml
   projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/Main.java
   projects/jboss-jca/trunk/standalone/build.xml
   projects/jboss-jca/trunk/tools/findbugs/filter.xml
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/ao/AOTestCase.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/as/ASTestCase.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/cf/CFTestCase.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/mcf/MCFTestCase.java
   projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/ra/RATestCase.java
   projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WARDeployer.java
   projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WARDeployment.java
Log:
[JBJCA-320] Fungal 0.8.0.Beta1

Modified: projects/jboss-jca/trunk/build.xml
===================================================================
--- projects/jboss-jca/trunk/build.xml	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/build.xml	2010-05-07 18:07:37 UTC (rev 104567)
@@ -42,6 +42,7 @@
   <property name="central.repo" value="http://repo1.maven.org/maven2"/>
   <property name="jboss.repo" value="http://repository.jboss.org/maven2"/>
   <property name="snapshots.repo" value="http://snapshots.jboss.org/maven2"/>
+  <property name="fungal.repo" value="http://jesperpedersen.github.com/fungal/maven2"/>
   
   <!-- ================================= 
        Properties              
@@ -82,6 +83,7 @@
   <property name="version.dom4j" value="1.6.1"/>
   <property name="version.mockito" value="1.8.2"/>
   <property name="version.eclipse-jdt" value="3.1.1"/>
+  <property name="version.fungal" value="0.8.0.Beta1"/>
   <property name="version.hibernate-validator" value="4.0.2.GA"/>
   <property name="version.javassist" value="3.11.0.GA"/>
   <property name="version.jaxb.api" value="2.1"/>
@@ -136,15 +138,6 @@
     </fileset>
   </path>
 
-  <path id="fungal.lib.path.id">
-    <fileset dir="${lib.dir}/sjc">
-      <include name="**/*.jar"/>
-    </fileset>
-    <fileset dir="${target.dir}">
-      <include name="**/*.jar"/>
-    </fileset>
-  </path>
-
   <path id="standalone.lib.path.id">
     <fileset dir="${lib.dir}/standalone">
       <include name="**/*.jar"/>
@@ -215,7 +208,6 @@
        Target: jars
        ================================= -->
   <target name="jars" depends="resolve">
-    <ant dir="fungal" inheritRefs="true" target="jars"/>
     <ant dir="api" inheritRefs="true" target="jars"/>
     <ant dir="common" inheritRefs="true" target="jars"/>
     <ant dir="core" inheritRefs="true" target="jars"/>
@@ -232,7 +224,6 @@
        Target: docs
        ================================= -->
   <target name="docs" depends="jars">
-    <ant dir="fungal" inheritRefs="true" target="docs"/>
     <ant dir="api" inheritRefs="true" target="docs"/>
     <ant dir="common" inheritRefs="true" target="docs"/>
     <ant dir="core" inheritRefs="true" target="docs"/>
@@ -403,9 +394,6 @@
       <class location="${target.dir}/jboss-jca-deployers-main.jar" />
       <class location="${target.dir}/jboss-jca-deployers-rar.jar" />
       <class location="${target.dir}/jboss-jca-embedded.jar" />
-      <class location="${target.dir}/jboss-jca-fungal-cli.jar" />
-      <class location="${target.dir}/jboss-jca-fungal-services.jar" />
-      <class location="${target.dir}/jboss-jca-fungal.jar" />
       <class location="${target.dir}/jboss-jca-sjc.jar" />
       <class location="${target.dir}/jboss-jca-spec-api.jar" />
       <class location="${target.dir}/jboss-jca-standalone.jar" />
@@ -435,9 +423,6 @@
       <class location="${target.dir}/jboss-jca-deployers-main.jar" />
       <class location="${target.dir}/jboss-jca-deployers-rar.jar" />
       <class location="${target.dir}/jboss-jca-embedded.jar" />
-      <class location="${target.dir}/jboss-jca-fungal-cli.jar" />
-      <class location="${target.dir}/jboss-jca-fungal-services.jar" />
-      <class location="${target.dir}/jboss-jca-fungal.jar" />
       <class location="${target.dir}/jboss-jca-sjc.jar" />
       <class location="${target.dir}/jboss-jca-spec-api.jar" />
       <class location="${target.dir}/jboss-jca-standalone.jar" />
@@ -663,9 +648,6 @@
       <fileset dir="embedded/src/main/java">
         <include name="**/*.java" />
       </fileset>
-      <fileset dir="fungal/src/main/java">
-        <include name="**/*.java" />
-      </fileset>
       <fileset dir="sjc/src/main/java">
         <include name="**/*.java" />
       </fileset>
@@ -701,9 +683,6 @@
       <fileset dir="embedded/src/main/java">
         <include name="**/*.java" />
       </fileset>
-      <fileset dir="fungal/src/main/java">
-        <include name="**/*.java" />
-      </fileset>
       <fileset dir="sjc/src/main/java">
         <include name="**/*.java" />
       </fileset>

Modified: projects/jboss-jca/trunk/common/build.xml
===================================================================
--- projects/jboss-jca/trunk/common/build.xml	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/common/build.xml	2010-05-07 18:07:37 UTC (rev 104567)
@@ -36,7 +36,7 @@
 
     <javac srcdir="src"
            destdir="${build.common.dir}"
-           classpathref="standalone.lib.path.id"
+           classpathref="sjc.lib.path.id"
            debug="${javac.debug}">
       <compilerarg value="-Xlint"/>
     </javac> 

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/ConnectionFactoryBuilder.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/ConnectionFactoryBuilder.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/ConnectionFactoryBuilder.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -22,11 +22,11 @@
 
 package org.jboss.jca.common.api;
 
-import org.jboss.jca.fungal.deployers.DeployException;
-
 import javax.naming.Reference;
 import javax.resource.spi.ManagedConnectionFactory;
 
+import com.github.fungal.deployers.DeployException;
+
 /**
  * Used for building the ConnectionFactory.  This is starting as a "simple as possible"
  * interface based on current needs to build the ConnectionFactory (no remote case yet supported).

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalApplicationServerJNDIHandler.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalApplicationServerJNDIHandler.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalApplicationServerJNDIHandler.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -23,7 +23,6 @@
 package org.jboss.jca.common.util;
 
 import org.jboss.jca.common.api.ConnectionFactoryBuilder;
-import org.jboss.jca.fungal.deployers.DeployException;
 
 import java.util.Hashtable;
 import java.util.concurrent.ConcurrentHashMap;
@@ -33,6 +32,8 @@
 import javax.naming.Reference;
 import javax.naming.spi.ObjectFactory;
 
+import com.github.fungal.deployers.DeployException;
+
 /**
  * Local only support for connection factory
  * TODO:  Add undeploy support to unregister CF builder

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalConnectionFactoryBuilder.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalConnectionFactoryBuilder.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalConnectionFactoryBuilder.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -23,12 +23,13 @@
 package org.jboss.jca.common.util;
 
 import org.jboss.jca.common.api.ConnectionFactoryBuilder;
-import org.jboss.jca.fungal.deployers.DeployException;
 
 import javax.naming.Reference;
 import javax.naming.StringRefAddr;
 import javax.resource.spi.ManagedConnectionFactory;
 
+import com.github.fungal.deployers.DeployException;
+
 /**
  * Local only connection factory builder.
  *

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -32,15 +32,6 @@
 import org.jboss.jca.core.connectionmanager.notx.NoTxConnectionManager;
 import org.jboss.jca.core.connectionmanager.pool.PoolParams;
 import org.jboss.jca.core.connectionmanager.pool.strategy.OnePool;
-import org.jboss.jca.fungal.api.ClassLoaderFactory;
-import org.jboss.jca.fungal.api.KernelClassLoader;
-import org.jboss.jca.fungal.deployers.CloneableDeployer;
-import org.jboss.jca.fungal.deployers.DeployException;
-import org.jboss.jca.fungal.deployers.Deployer;
-import org.jboss.jca.fungal.deployers.Deployment;
-import org.jboss.jca.fungal.util.FileUtil;
-import org.jboss.jca.fungal.util.Injection;
-import org.jboss.jca.fungal.util.JarFilter;
 import org.jboss.jca.validator.Failure;
 import org.jboss.jca.validator.FailureHelper;
 import org.jboss.jca.validator.Key;
@@ -93,6 +84,16 @@
 import org.jboss.metadata.rar.spec.MessageListenerMetaData;
 import org.jboss.util.naming.Util;
 
+import com.github.fungal.api.classloading.ClassLoaderFactory;
+import com.github.fungal.api.classloading.KernelClassLoader;
+import com.github.fungal.deployers.CloneableDeployer;
+import com.github.fungal.deployers.DeployException;
+import com.github.fungal.deployers.Deployer;
+import com.github.fungal.deployers.Deployment;
+import com.github.fungal.util.FileUtil;
+import com.github.fungal.util.Injection;
+import com.github.fungal.util.JarFilter;
+
 /**
  * The RA deployer for JCA/SJC
  * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployment.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployment.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployment.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -22,9 +22,6 @@
 
 package org.jboss.jca.deployers.fungal;
 
-import org.jboss.jca.fungal.deployers.Deployment;
-import org.jboss.jca.fungal.util.FileUtil;
-
 import java.io.Closeable;
 import java.io.File;
 import java.io.IOException;
@@ -39,6 +36,9 @@
 import org.jboss.logging.Logger;
 import org.jboss.util.naming.Util;
 
+import com.github.fungal.deployers.Deployment;
+import com.github.fungal.util.FileUtil;
+
 /**
  * A resource adapter deployment for JCA/SJC
  * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>

Modified: projects/jboss-jca/trunk/doc/developerguide/en/master.xml
===================================================================
--- projects/jboss-jca/trunk/doc/developerguide/en/master.xml	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/doc/developerguide/en/master.xml	2010-05-07 18:07:37 UTC (rev 104567)
@@ -9,7 +9,6 @@
         <!ENTITY metadata SYSTEM "modules/metadata.xml">
         <!ENTITY deployers SYSTEM "modules/deployers.xml">
         <!ENTITY standalone SYSTEM "modules/standalone.xml">
-        <!ENTITY fungal SYSTEM "modules/fungal.xml">
         ]>
 <book lang="en">
    <bookinfo>
@@ -37,6 +36,4 @@
 
    &standalone;
 
-   &fungal;
-
 </book>

Deleted: projects/jboss-jca/trunk/doc/developerguide/en/modules/fungal.xml
===================================================================
--- projects/jboss-jca/trunk/doc/developerguide/en/modules/fungal.xml	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/doc/developerguide/en/modules/fungal.xml	2010-05-07 18:07:37 UTC (rev 104567)
@@ -1,662 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<appendix id="fungal">
-  <title>Fungal</title>
-
-    <section id="fungal_overview">
-      <title>Overview</title>
-      
-      <para>The JBoss JCA/Fungal kernel is a Plain Old Java Object (POJO) based kernel which
-        can build a container environment for Java services.</para>
-
-      <para>The kernel features</para>
-
-      <itemizedlist spacing="compact">
-        <listitem>
-          Bean definition language
-        </listitem>
-        <listitem>
-          Lifecycle of beans
-        </listitem>
-        <listitem>
-          Parallel deployment
-        </listitem>
-        <listitem>
-          Dependency management
-        </listitem>
-        <listitem>
-          Classloader architecture
-        </listitem>
-        <listitem>
-          Deployer framework
-        </listitem>
-        <listitem>
-          Hot deployment
-        </listitem>
-        <listitem>
-          Communication protocol
-        </listitem>
-        <listitem>
-          Core services
-        </listitem>
-      </itemizedlist>
-
-      <para>The focus of the Fungal kernel is simplicity and high performance.</para>
-
-    </section>
-
-    <section id="fungal_configuration">
-      <title>Configuration</title>
-
-      <para>The kernel is configured through the</para>
-      <programlisting>
-org.jboss.jca.fungal.api.KernelConfiguration
-      </programlisting>
-
-      <para>class, which allows the developer to configure the kernel
-        in the most optimal way for the container configuration.</para>
-
-      <para>It is a best practice to give the configuration a name using the
-        <code>name</code> method, otherwise the kernel will use the default
-        name of <code>fungal</code>.</para>
-
-      <para>Based on the kernel configuration a number of system properties are
-        set</para>
-
-      <table frame="all">
-        <title>Kernel system properties</title>
-        <tgroup cols="2" align="left" colsep="1" rowsep="1">
-          <colspec colname="c1"/>
-          <colspec colname="c2" colwidth="3*"/>
-          <thead>
-            <row>
-              <entry align="left">Name</entry>
-              <entry align="left">Description</entry>
-            </row>
-          </thead>
-          <tbody>
-            <row>
-              <entry>&lt;name&gt;.home</entry>
-              <entry>The root of the container configuration</entry>
-            </row>
-            <row>
-              <entry>&lt;name&gt;.bindaddress</entry>
-              <entry>The network bind address of the container configuration</entry>
-            </row>
-          </tbody>
-        </tgroup>
-      </table>
-
-      <para>Furthermore, the kernel makes use the Java system property <code>java.io.tmpdir</code>
-        for temporary files if needed.</para>
-
-    </section>
-
-    <section id="fungal_booting">
-      <title>Booting the kernel</title>
-
-      <para>The kernel is booted using a</para>
-      <programlisting>
-${&lt;name&gt;.home}/config/bootstrap.xml
-      </programlisting>
-
-      <para>file, where references to URLs for bean deployments.</para>
-
-      <para>The layout of bootstrap.xml is defined in</para>
-      <programlisting>
-${&lt;name&gt;.home}/config/bootstrap.xsd
-      </programlisting>
-
-      <para>The</para>
-
-      <programlisting>
-${&lt;name&gt;.home}/config/deployment.xsd
-      </programlisting>
-
-      <para>file defines how bean deployments are constructed.</para>
-
-      <para>In a bean deployment file there is support for the following constructs:</para>
-      
-      <itemizedlist>
-        <listitem>
-          <code>&lt;bean&gt;</code>
-          <para>which initialize a bean based on the class attribute.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;property&gt;</code>
-          <para>which sets a property on the bean - being an object or a primitive.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;inject&gt;</code>
-          <para>injects a bean or a property from a bean (defines an implicit dependency on the bean).</para>
-        </listitem>
-        <listitem>
-          <code>&lt;constructor&gt;</code>
-          <para>which defines the constructor method to use for a bean.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;parameter&gt;</code>
-          <para>defines a parameter value for a constructor.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;factory&gt;</code>
-          <para>defines a factory bean for a constructor.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;depends&gt;</code>
-          <para>defines an explicit dependency to another bean.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;install&gt;</code>
-          <para>defines an install method.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;uninstall&gt;</code>
-          <para>defines an uninstall method.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;incallback&gt;</code>
-          <para>defines a method which is invoked with all beans that has the type of the first parameter
-            when the installed.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;uncallback&gt;</code>
-          <para>defines a method which is invoked with all beans that has the type of the first parameter
-            when the uninstalled.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;map&gt;</code>
-          <para>defines a map data structure.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;list&gt;</code>
-          <para>defines a list data structure.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;set&gt;</code>
-          <para>defines a set data structure.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;null&gt;</code>
-          <para>defines a null value.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;this&gt;</code>
-          <para>defines a reference to the object instance.</para>
-        </listitem>
-      </itemizedlist>
-
-      <para>In order to define locations relative to the install root of the Fungal
-        container configuration the variable</para>
-      <programlisting>
-${&lt;name&gt;.home}
-      </programlisting>
-      <para>can be used. An example would be <code>${jboss.jca.home}</code>.</para>
-
-      <para>There is support for accessing system properties using the "${property}" mechanism
-        with an optional default value</para>
-      <programlisting>
-${jboss.jca.host:localhost}
-      </programlisting>
-
-      <para>A configuration example would be</para>
-      <programlisting>
-&lt;!-- Transaction manager --&gt;
-&lt;bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService"&gt;
-   &lt;property name="transactionTimeout"&gt;300&lt;/property&gt;
-   &lt;property name="objectStoreDir"&gt;${jboss.jca.home}/tmp/tx-object-store&lt;/property&gt;
-   &lt;property name="mbeanServer"&gt;&lt;inject bean="JMX" property="mbeanServer"/&gt;&lt;/property&gt;
-   &lt;property name="transactionStatusManagerInetAddress"&gt;${jboss.jca.host:localhost}&lt;/property&gt;
-   &lt;property name="transactionStatusManagerPort"&gt;4713&lt;/property&gt;
-   &lt;property name="recoveryInetAddress"&gt;${jboss.jca.host:localhost}&lt;/property&gt;
-   &lt;property name="recoveryPort"&gt;4712&lt;/property&gt;
-   &lt;property name="socketProcessIdPort"&gt;0&lt;/property&gt;    
-   &lt;depends&gt;NamingServer&lt;/depends&gt;
- &lt;/bean&gt;
-      </programlisting>
-
-    </section>
-
-    <section id="fungal_lifecycle">
-      <title>Lifecycle</title>
-
-      <para>There is support for lifecycle methods. These include</para>
-
-      <itemizedlist>
-        <listitem>
-          <code>public void create()</code>
-          <para>Called after a bean has been constructed.</para>
-        </listitem>
-        <listitem>
-          <code>public void start()</code>
-          <para>Called after create.</para>
-        </listitem>
-        <listitem>
-          <code>public void stop()</code>
-          <para>Called when bean is stopped.</para>
-        </listitem>
-        <listitem>
-          <code>public void destroy()</code>
-          <para>Called after stop.</para>
-        </listitem>
-      </itemizedlist>
-
-      <para>The lifecycle methods can be ignored by using the following constructs:</para>
-
-      <itemizedlist>
-        <listitem>
-          <code>&lt;ignoreCreate/&gt;</code>
-          <para>which ignores the <code>create</code> method.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;ignoreStart/&gt;</code>
-          <para>which ignores the <code>start</code> method.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;ignoreStop/&gt;</code>
-          <para>which ignores the <code>stop</code> method.</para>
-        </listitem>
-        <listitem>
-          <code>&lt;ignoreDestroy/&gt;</code>
-          <para>which ignores the <code>destroy</code> method.</para>
-        </listitem>
-      </itemizedlist>
-
-      <para>Furthermore all <code>install</code> methods defined for the bean are called after the <code>start</code>
-        method. All <code>uninstall</code> methods defined for the bean are called before the <code>stop</code>
-        method.</para>
-
-    </section>
-
-    <section id="fungal_logging">
-      <title>Logging</title>
-
-      <para>There is support for logging using the JBoss Logging framework. The logging is done using two different
-        methods</para>
-
-      <itemizedlist>
-        <listitem>
-          <para>Inside Fungal</para>
-          <para>All logging is handled through reflection calls</para>
-        </listitem>
-        <listitem>
-          <para>All other services</para>
-          <para>Logging is handled by importing <code>org.jboss.logging.Logger</code></para>
-        </listitem>
-      </itemizedlist>
-    </section>
-
-    <section id="fungal_paralleldeployment">
-      <title>Parallel deployment and dependency resolution</title>
-
-      <para>JBoss JCA/Fungal uses multiple threads during 
-        the booting sequence.</para>
-
-      <para>When multiple threads are used in the kernel a dependency mechanism between beans is
-        needed. The kernel keeps track of each bean deployment and assigns a status</para>
-
-      <itemizedlist>
-        <listitem>
-          <para><code>NOT_STARTED</code></para>
-          <para>The bean hasn't started.</para>
-        </listitem>
-        <listitem>
-          <para><code>STARTING</code></para>
-          <para>The bean is starting.</para>
-        </listitem>
-        <listitem>
-          <para><code>STARTED</code></para>
-          <para>The bean has fully started.</para>
-        </listitem>
-        <listitem>
-          <para><code>STOPPING</code></para>
-          <para>The bean is stopping.</para>
-        </listitem>
-        <listitem>
-          <para><code>ERROR</code></para>
-          <para>The bean is in error.</para>
-        </listitem>
-      </itemizedlist>
-
-      <para>Caveats: The kernel currently doesn't detect cyclic dependencies between deployment units.</para>
-
-      <para>Furthermore the dependencies between beans are recorded in order to be able to safely shutdown
-        deployments.</para>
-
-      <para>The Fungal kernel can deploy the archives in the <code>deploy</code> directory in parallel if specified
-        by the <code>KernelConfiguration.parallelDeploy()</code> method. Otherwise are all the deployment units
-        booted in sequence as defined by the <code>File.listFiles()</code> method.</para>
-
-      <para>The Fungal kernel features a hot deployer, which scans the deployment directory at the specified
-        intervals for new, changed or removed deployment units. The properties of the hot deployer can
-        be controlled through the <code>KernelConfiguration</code> object or through JMX.</para>
-
-    </section>
-
-    <section id="fungal_classloading">
-      <title>Classloading</title>
-
-      <para>JBoss JCA/Fungal features a 3-tier classloader model:</para>
-
-      <orderedlist>
-        <listitem>
-          <para>Application classloader (AppCL).</para>
-          <para>Top-level classloader that loads the Fungal kernel. This class loader is
-            controlled by the application that uses the kernel.</para>
-        </listitem>
-        <listitem>
-          <para>Kernel classloader (KernelCL).</para>
-          <para>A class loader with AppCL as its parent which loads
-            all libraries used by the kernel.</para>
-        </listitem>
-        <listitem>
-          <para>Deployment classloader (DCL).</para>
-          <para>Each deployment can run in its own classloader with KernelCL as its parent.</para>
-        </listitem>
-      </orderedlist>
-
-      <section id="fungal_classloading_types">
-        <title>Class loader types</title>
-
-        <para>The JBoss JCA/Fungal kernel class loader mechanisms are controlled through
-          the</para>
-
-        <programlisting>
-org.jboss.jca.fungal.api.ClassLoaderFactory      
-        </programlisting>
-
-        <para>class which creates class loaders based on the parameters given.</para>
-
-        <para>The following types are supported:</para>
-
-        <itemizedlist>
-          <listitem>
-            <para><code>TYPE_PARENT_FIRST</code></para>
-            <para>The parent class loader is checked before the child class loader.</para>
-          </listitem>
-          <listitem>
-            <para><code>TYPE_PARENT_LAST</code></para>
-            <para>The parent class loader is after the child class loader.</para>
-          </listitem>
-          <listitem>
-            <para><code>TYPE_EXPORT</code></para>
-            <para>This class loader type can be compared to the OSGi class loader model
-              where each Java library that contains OSGi manifest information will be isolated.
-              This allows multiple versions of the same library to be active at the same time and
-              will allow deployment to declare their dependencies on a specific library version.</para>
-            <para>Note, that this type is not a valid OSGi class loader model implementation, but
-              only borrows some of the ideas in that model.</para>
-          </listitem>
-        </itemizedlist>
-
-        <para>All class loader types are implemented as a <code>org.jboss.jca.fungal.api.KernelClassLoader</code>
-          which extends the <code>java.net.URLClassLoader</code> class.</para>
-
-      </section>
-
-    </section>
-
-    <section id="fungal_deployers">
-      <title>Deployers</title>
-
-      <para>JBoss JCA/Fungal features a very simple deployers mechanism.</para>
-
-      <para>Each deployer is defined as a bean in a bean deployment XML file and they
-        must implement the</para>
-      <programlisting>
-org.jboss.jca.fungal.deployers.Deployer
-      </programlisting>
-      <para>interface.</para>
-
-      <para>The interface contains the</para>
-      <programlisting>
-/**
- * Deploy
- * @param url The URL for the deployment
- * @param parent The parent classloader
- * @return The deployment; or null if no deployment was made
- * @exception DeployException Thrown if an error occurs
- */
-public Deployment deploy(URL url, ClassLoader parent) throws DeployException;
-      </programlisting>
-      <para>method which is invoked once with each of the files in the
-        $JBOSS_JCA_HOME/deploy/ directory.</para>
-
-      <para>The <code>Deployment</code> interface returned represents the
-        deployment unit or <code>null</code> if a deployment unit wasn't
-        created.</para>
-
-      <para>The implementation of the deployer bean must be thread-safe. This can be done by
-        using the <code>synchronized</code> keyword on the <code>deploy</code> method.</para>
-
-      <section id="fungal_deployers_advanced">
-        <title>Advanced deployers</title>
-
-        <para>The kernel supports deploying multiple artifacts of the same type at the same time
-          for optimal performance.</para>
-
-        <para>If a deployer supports this mechanism it must implement the</para>
-          <programlisting>
-org.jboss.jca.fungal.deployers.CloneableDeployer
-          </programlisting>
-          <para>interface.</para>
-
-          <para>The interface contains the</para>
-          <programlisting>
-/**
- * Clone the deployer
- * @return A copy of the deployer
- * @exception CloneNotSupportedException Thrown if the copy operation isn't supported
- */
-public Deployer clone() throws CloneNotSupportedException;
-          </programlisting>
-          <para>method which constructs a new instance of the deployer.</para>
-
-          <para>Implementing this interface means that the <code>deploy</code> method doesn't have
-            to be <code>synchronized</code>. However any state that should be shared between
-            all the deployer instances should be <code>static</code> and have atomic access.</para>
-
-      </section>
-
-    </section>
-
-    <section id="fungal_remote_protocol">
-      <title>Remote protocol</title>
-
-      <para>JBoss JCA/Fungal features a remote protocol to allow deployment
-        and undeployment of units.</para>
-
-      <para>The protocol is based on the <code>java.io.ObjectInputStream</code> and 
-        <code>java.io.ObjectOutputStream</code> format over a standard <code>java.net.Socket</code>
-        connection.</para>
-
-      <para>The kernel must be configured with <code>KernelConfiguration.remoteAccess(true)</code>
-        in order to enable remote access.</para>
-
-      <section id="fungal_remote_protocol_deploy">
-        <title>Deploy</title>
-
-        <para>Deploys a file.</para>
-
-        <table frame="all">
-          <title>Deploy: Input</title>
-          <tgroup cols="4" align="left" colsep="1" rowsep="1">
-            <colspec colname="c1"/>
-            <colspec colname="c2"/>
-            <colspec colname="c3"/>
-            <colspec colname="c4" colwidth="4*"/>
-            <thead>
-              <row>
-                <entry align="left">Order</entry>
-                <entry align="left">Type</entry>
-                <entry align="left">Value</entry>
-                <entry align="left">Description</entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>1</entry>
-                <entry>int</entry>
-                <entry>0x00</entry>
-                <entry>Identification</entry>
-              </row>
-              <row>
-                <entry>2</entry>
-                <entry>UTF</entry>
-                <entry>&lt;file url&gt;</entry>
-                <entry>Location of the deployment unit</entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </table>
-
-        <table frame="all">
-          <title>Deploy: Output</title>
-          <tgroup cols="4" align="left" colsep="1" rowsep="1">
-            <colspec colname="c1"/>
-            <colspec colname="c2"/>
-            <colspec colname="c3"/>
-            <colspec colname="c4" colwidth="4*"/>
-            <thead>
-              <row>
-                <entry align="left">Order</entry>
-                <entry align="left">Type</entry>
-                <entry align="left">Value</entry>
-                <entry align="left">Description</entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>1</entry>
-                <entry>boolean</entry>
-                <entry>&lt;boolean&gt;</entry>
-                <entry>True if deployment were successful. False if error</entry>
-              </row>
-              <row>
-                <entry>2</entry>
-                <entry>UTF</entry>
-                <entry>&lt;message&gt;</entry>
-                <entry>Empty string if successful. Otherwise error description</entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </table>
-
-      </section>
-
-      <section id="fungal_remote_protocol_undeploy">
-        <title>Undeploy</title>
-
-        <para>Undeploys a file.</para>
-
-        <table frame="all">
-          <title>Undeploy: Input</title>
-          <tgroup cols="4" align="left" colsep="1" rowsep="1">
-            <colspec colname="c1"/>
-            <colspec colname="c2"/>
-            <colspec colname="c3"/>
-            <colspec colname="c4" colwidth="4*"/>
-            <thead>
-              <row>
-                <entry align="left">Order</entry>
-                <entry align="left">Type</entry>
-                <entry align="left">Value</entry>
-                <entry align="left">Description</entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>1</entry>
-                <entry>int</entry>
-                <entry>0x01</entry>
-                <entry>Identification</entry>
-              </row>
-              <row>
-                <entry>2</entry>
-                <entry>UTF</entry>
-                <entry>&lt;file url&gt;</entry>
-                <entry>Location of the deployment unit</entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </table>
-
-        <table frame="all">
-          <title>Undeploy: Output</title>
-          <tgroup cols="4" align="left" colsep="1" rowsep="1">
-            <colspec colname="c1"/>
-            <colspec colname="c2"/>
-            <colspec colname="c3"/>
-            <colspec colname="c4" colwidth="4*"/>
-            <thead>
-              <row>
-                <entry align="left">Order</entry>
-                <entry align="left">Type</entry>
-                <entry align="left">Value</entry>
-                <entry align="left">Description</entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>1</entry>
-                <entry>boolean</entry>
-                <entry>&lt;boolean&gt;</entry>
-                <entry>True if undeployment were successful. False if error</entry>
-              </row>
-              <row>
-                <entry>2</entry>
-                <entry>UTF</entry>
-                <entry>&lt;message&gt;</entry>
-                <entry>Empty string if successful. Otherwise error description</entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </table>
-
-      </section>
-
-    </section>
-
-    <section id="fungal_usage">
-      <title>Usage</title>
-
-      <para>The JBoss JCA/Fungal kernel is constructed and started using</para>
-
-      <programlisting>
-import org.jboss.jca.fungal.api.Kernel;
-import org.jboss.jca.fungal.api.KernelConfiguration;
-import org.jboss.jca.fungal.api.KernelFactory;
-import org.jboss.jca.fungal.api.MainDeployer;
-
-// Create a kernel configuration and start the kernel
-KernelConfiguration kernelConfiguration = new KernelConfiguration();
-kernelConfiguration = kernelConfiguration.name("jboss.jca");
-kernelConfiguration = kernelConfiguration.remoteAccess(false);
-kernelConfiguration = kernelConfiguration.hotDeployment(false);
-
-Kernel kernel = KernelFactory.create(kernelConfiguration);
-kernel.startup();
-
-// Get the reference to the main deployer
-MainDeployer mainDeployer = kernel.getMainDeployer();
-
-// Reference to my deployment
-URL myDeployment = ...;
-
-mainDeployer.deploy(myDeployment);
-      </programlisting>
-
-      <para>where the <code>KernelConfiguration</code> object allows you to
-        configure the kernel setup. The <code>MainDeployer</code> allows you
-        to deploy and undeploy deployment units that are supported.</para>
-
-      <para>The kernel is stopped using</para>
-
-      <programlisting>
-kernel.shutdown();
-      </programlisting>
-
-      <para>See the JavaDoc for additional details.</para>
-
-    </section>
-
-</appendix>

Modified: projects/jboss-jca/trunk/doc/developerguide/en/modules/standalone.xml
===================================================================
--- projects/jboss-jca/trunk/doc/developerguide/en/modules/standalone.xml	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/doc/developerguide/en/modules/standalone.xml	2010-05-07 18:07:37 UTC (rev 104567)
@@ -57,9 +57,10 @@
       This standalone configuration is for development purposes only.
     </warning>
 
-    <para>The JBoss JCA/SJC uses the JBoss JCA/Fungal kernel for 
-      its run-time environment.</para>
+    <para>The JBoss JCA/SJC uses the Fungal kernel for its run-time environment.</para>
 
+    <para>The homepage for the Fungal is <ulink url="http://jesperpedersen.github.com/fungal">http://jesperpedersen.github.com/fungal</ulink>.
+
     <para>SJC is short for "Simple JCA Container".</para>
   </section>
 

Modified: projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/EmbeddedJCA.java
===================================================================
--- projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/EmbeddedJCA.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/EmbeddedJCA.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -22,11 +22,6 @@
 
 package org.jboss.jca.embedded;
 
-import org.jboss.jca.fungal.api.ClassLoaderFactory;
-import org.jboss.jca.fungal.api.Kernel;
-import org.jboss.jca.fungal.api.KernelConfiguration;
-import org.jboss.jca.fungal.api.KernelFactory;
-
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -38,6 +33,11 @@
 import org.jboss.shrinkwrap.api.exporter.ZipExporter;
 import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
 
+import com.github.fungal.api.Kernel;
+import com.github.fungal.api.KernelFactory;
+import com.github.fungal.api.classloading.ClassLoaderFactory;
+import com.github.fungal.api.configuration.KernelConfiguration;
+
 /**
  * The embedded JBoss JCA container
  * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
@@ -87,6 +87,8 @@
       kernelConfiguration = kernelConfiguration.parallelDeploy(false);
       kernelConfiguration = kernelConfiguration.remoteAccess(false);
       kernelConfiguration = kernelConfiguration.hotDeployment(false);
+      kernelConfiguration = kernelConfiguration.eventListener(new PreClassLoaderEventListener());
+      kernelConfiguration = kernelConfiguration.eventListener(new PostClassLoaderEventListener());
 
       kernel = KernelFactory.create(kernelConfiguration);
       kernel.startup();

Added: projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/PostClassLoaderEventListener.java
===================================================================
--- projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/PostClassLoaderEventListener.java	                        (rev 0)
+++ projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/PostClassLoaderEventListener.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-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.jca.embedded;
+
+import java.lang.reflect.Method;
+
+import com.github.fungal.api.Kernel;
+import com.github.fungal.api.events.Event;
+import com.github.fungal.api.events.EventListener;
+
+/**
+ * An event listener for the POST_CLASSLOADER event
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+class PostClassLoaderEventListener implements EventListener
+{
+   /**
+    * Default constructor
+    */
+   PostClassLoaderEventListener()
+   {
+   }
+
+   /**
+    * Event
+    * @param kernel The kernel
+    * @param event The event
+    */
+   public void event(Kernel kernel, Event event)
+   {
+      if (event == Event.POST_CLASSLOADER)
+      {
+         try
+         {
+            Class clz = Class.forName("org.jboss.logmanager.log4j.BridgeRepositorySelector", 
+                                      true, 
+                                      kernel.getKernelClassLoader());
+
+            Method mStart = clz.getMethod("start", (Class[])null);
+            Object brs = clz.newInstance();
+
+            mStart.invoke(brs, (Object[])null);
+         }
+         catch (Throwable t)
+         {
+            // Nothing we can do
+         }
+      }
+   }
+}

Added: projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/PreClassLoaderEventListener.java
===================================================================
--- projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/PreClassLoaderEventListener.java	                        (rev 0)
+++ projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/PreClassLoaderEventListener.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-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.jca.embedded;
+
+import com.github.fungal.api.Kernel;
+import com.github.fungal.api.events.Event;
+import com.github.fungal.api.events.EventListener;
+
+/**
+ * An event listener for the PRE_CLASSLOADER event
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+class PreClassLoaderEventListener implements EventListener
+{
+   /**
+    * Default constructor
+    */
+   PreClassLoaderEventListener()
+   {
+   }
+
+   /**
+    * Event
+    * @param kernel The kernel
+    * @param event The event
+    */
+   public void event(Kernel kernel, Event event)
+   {
+      if (event == Event.PRE_CLASSLOADER)
+      {
+         SecurityActions.setSystemProperty("xb.builder.useUnorderedSequence", "true");
+         SecurityActions.setSystemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager");
+         SecurityActions.setSystemProperty("javax.xml.stream.XMLInputFactory", 
+                                           "com.sun.xml.internal.stream.XMLInputFactoryImpl");
+         SecurityActions.setSystemProperty("log4j.defaultInitOverride", "true");
+      }
+   }
+}

Modified: projects/jboss-jca/trunk/ivy.settings.xml
===================================================================
--- projects/jboss-jca/trunk/ivy.settings.xml	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/ivy.settings.xml	2010-05-07 18:07:37 UTC (rev 104567)
@@ -35,11 +35,14 @@
              pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
     <ibiblio name="central" m2compatible="true" usepoms="false" root="${central.repo}"
              pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
+    <ibiblio name="fungal" m2compatible="true" usepoms="false" root="${fungal.repo}"
+             pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
     <chain name="default" returnFirst="true">
       <resolver ref="local"/>
       <resolver ref="jboss"/>
       <resolver ref="snapshots"/>
       <resolver ref="central"/>
+      <resolver ref="fungal"/>
     </chain>
   </resolvers>
 </ivysettings>

Modified: projects/jboss-jca/trunk/ivy.xml
===================================================================
--- projects/jboss-jca/trunk/ivy.xml	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/ivy.xml	2010-05-07 18:07:37 UTC (rev 104567)
@@ -38,6 +38,8 @@
   <dependencies>
     <dependency org="apache-log4j" name="log4j" rev="${version.apache-log4j}" conf="standalone->default;sjc->*"/>
     <dependency org="apache-logging" name="commons-logging" rev="${version.apache-logging}" conf="*"/>
+    <dependency org="com.github.fungal" name="fungal" rev="${version.fungal}" conf="standalone->default;sjc->*"/>
+    <dependency org="com.github.fungal" name="fungal-cli" rev="${version.fungal}" conf="standalone->default;sjc->*"/>
     <dependency org="com.sun.xml.bind" name="jaxb-impl" rev="${version.jaxb.impl}" conf="standalone->default;sjc->*"/>
     <dependency org="dom4j" name="dom4j" rev="${version.dom4j}" conf="standalone->default;sjc->*"/>
     <dependency org="javassist" name="javassist" rev="${version.javassist}" conf="standalone->default;sjc->*"/>

Modified: projects/jboss-jca/trunk/sjc/build.xml
===================================================================
--- projects/jboss-jca/trunk/sjc/build.xml	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/sjc/build.xml	2010-05-07 18:07:37 UTC (rev 104567)
@@ -68,7 +68,7 @@
              sourcepath="src/main/java"
              destdir="${target.dir}/docs/sjc"
              doclet="org.jboss.apiviz.APIviz"
-             docletpathref="fungal.lib.path.id"
+             docletpathref="sjc.lib.path.id"
              author="true"
              version="true"
              windowtitle="JBoss JCA SJC"
@@ -109,7 +109,7 @@
 
     <!-- Build a jboss-jca-sjc.jar containing all dependencies -->
     <mkdir dir="${build.sjc.dir}/tmp"/>
-    <unjar src="${target.dir}/jboss-jca-fungal.jar" dest="${build.sjc.dir}/tmp"/>
+    <unjar src="${lib.dir}/sjc/fungal.jar" dest="${build.sjc.dir}/tmp"/>
     <unjar src="${target.dir}/jboss-jca-sjc.jar" dest="${build.sjc.dir}/tmp"/>
     <jar destfile="${target.dir}/sjc/bin/jboss-jca-sjc.jar"
          manifest="${build.sjc.dir}/tmp/META-INF/MANIFEST.MF"
@@ -139,7 +139,6 @@
       <fileset dir="${target.dir}">
         <include name="*.jar"/>
         <exclude name="jboss-jca-codegenerator.jar"/>
-        <exclude name="jboss-jca-fungal.jar"/>
         <exclude name="jboss-jca-sjc.jar"/>
         <exclude name="jboss-jca-deployers-main.jar"/>
         <exclude name="jboss-jca-deployers-rar.jar"/>

Modified: projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/Main.java
===================================================================
--- projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/Main.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/Main.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -22,15 +22,15 @@
 
 package org.jboss.jca.sjc;
 
-import org.jboss.jca.fungal.api.ClassLoaderFactory;
-import org.jboss.jca.fungal.api.Kernel;
-import org.jboss.jca.fungal.api.KernelConfiguration;
-import org.jboss.jca.fungal.api.KernelFactory;
-
 import java.io.File;
 import java.lang.reflect.Method;
 import java.net.URI;
 
+import com.github.fungal.api.Kernel;
+import com.github.fungal.api.KernelFactory;
+import com.github.fungal.api.classloading.ClassLoaderFactory;
+import com.github.fungal.api.configuration.KernelConfiguration;
+
 /**
  * The main class for JBoss JCA SJC
  * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
@@ -63,6 +63,10 @@
          kernelConfiguration = kernelConfiguration.name("jboss.jca");
          kernelConfiguration = kernelConfiguration.classLoader(ClassLoaderFactory.TYPE_PARENT_FIRST);
          kernelConfiguration = kernelConfiguration.parallelDeploy(false);
+         kernelConfiguration = kernelConfiguration.remoteAccess(true);
+         kernelConfiguration = kernelConfiguration.eventListener(new PreClassLoaderEventListener());
+         kernelConfiguration = kernelConfiguration.eventListener(new PostClassLoaderEventListener());
+         kernelConfiguration = kernelConfiguration.command(new Shutdown());
 
          String home = SecurityActions.getSystemProperty("jboss.jca.home");
          if (home != null)

Added: projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/PostClassLoaderEventListener.java
===================================================================
--- projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/PostClassLoaderEventListener.java	                        (rev 0)
+++ projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/PostClassLoaderEventListener.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-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.jca.sjc;
+
+import java.lang.reflect.Method;
+
+import com.github.fungal.api.Kernel;
+import com.github.fungal.api.events.Event;
+import com.github.fungal.api.events.EventListener;
+
+/**
+ * An event listener for the POST_CLASSLOADER event
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+class PostClassLoaderEventListener implements EventListener
+{
+   /**
+    * Default constructor
+    */
+   PostClassLoaderEventListener()
+   {
+   }
+
+   /**
+    * Event
+    * @param kernel The kernel
+    * @param event The event
+    */
+   public void event(Kernel kernel, Event event)
+   {
+      if (event == Event.POST_CLASSLOADER)
+      {
+         try
+         {
+            Class clz = Class.forName("org.jboss.logmanager.log4j.BridgeRepositorySelector", 
+                                      true, 
+                                      kernel.getKernelClassLoader());
+
+            Method mStart = clz.getMethod("start", (Class[])null);
+            Object brs = clz.newInstance();
+
+            mStart.invoke(brs, (Object[])null);
+         }
+         catch (Throwable t)
+         {
+            // Nothing we can do
+         }
+      }
+   }
+}

Added: projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/PreClassLoaderEventListener.java
===================================================================
--- projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/PreClassLoaderEventListener.java	                        (rev 0)
+++ projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/PreClassLoaderEventListener.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-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.jca.sjc;
+
+import com.github.fungal.api.Kernel;
+import com.github.fungal.api.events.Event;
+import com.github.fungal.api.events.EventListener;
+
+/**
+ * An event listener for the PRE_CLASSLOADER event
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+class PreClassLoaderEventListener implements EventListener
+{
+   /**
+    * Default constructor
+    */
+   PreClassLoaderEventListener()
+   {
+   }
+
+   /**
+    * Event
+    * @param kernel The kernel
+    * @param event The event
+    */
+   public void event(Kernel kernel, Event event)
+   {
+      if (event == Event.PRE_CLASSLOADER)
+      {
+         SecurityActions.setSystemProperty("xb.builder.useUnorderedSequence", "true");
+         SecurityActions.setSystemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager");
+         SecurityActions.setSystemProperty("javax.xml.stream.XMLInputFactory", 
+                                           "com.sun.xml.internal.stream.XMLInputFactoryImpl");
+         SecurityActions.setSystemProperty("log4j.defaultInitOverride", "true");
+      }
+   }
+}

Added: projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/Shutdown.java
===================================================================
--- projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/Shutdown.java	                        (rev 0)
+++ projects/jboss-jca/trunk/sjc/src/main/java/org/jboss/jca/sjc/Shutdown.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-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.jca.sjc;
+
+import java.io.Serializable;
+import java.util.Arrays;
+
+import com.github.fungal.api.remote.Command;
+
+/**
+ * Shutdown command
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+class Shutdown implements Command
+{
+   /** Command name */
+   private static final String NAME = "shutdown";
+
+   /**
+    * Constructor
+    */
+   Shutdown()
+   {
+   }
+
+   /**
+    * Get the name of the command
+    * @return The name
+    */
+   public String getName()
+   {
+      return NAME;
+   }
+
+   /**
+    * Get the parameter types of the command; <code>null</code> if none
+    * @return The types
+    */
+   public Class[] getParameterTypes()
+   {
+      return null;
+   }
+
+   /**
+    * Invoke
+    * @param args The arguments
+    * @return The return value
+    */
+   public Serializable invoke(Serializable[] args)
+   {
+      if (args != null)
+         return new IllegalArgumentException("Unsupported argument list: " + Arrays.toString(args));
+
+      System.exit(0);
+
+      return null;
+   }
+
+   /**
+    * Is it a public command
+    * @return True if system-wide; false if internal
+    */
+   public boolean isPublic()
+   {
+      return true;
+   }
+}

Modified: projects/jboss-jca/trunk/standalone/build.xml
===================================================================
--- projects/jboss-jca/trunk/standalone/build.xml	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/standalone/build.xml	2010-05-07 18:07:37 UTC (rev 104567)
@@ -138,8 +138,6 @@
       <fileset dir="${target.dir}">
         <include name="*.jar"/>
         <exclude name="jboss-jca-deployers-fungal.jar"/>
-        <exclude name="jboss-jca-fungal-services.jar"/>
-        <exclude name="jboss-jca-fungal.jar"/>
         <exclude name="jboss-jca-sjc.jar"/>
         <exclude name="jboss-jca-standalone.jar"/>
       </fileset>
@@ -150,6 +148,8 @@
         <include name="*.jar"/>
         <exclude name="ant.jar"/>
         <exclude name="apiviz.jar"/>
+        <exclude name="fungal.jar"/>
+        <exclude name="fungal-cli.jar"/>
         <exclude name="jaxb-api.jar"/>
         <exclude name="jdepend.jar"/>
         <exclude name="stax-api.jar"/>

Modified: projects/jboss-jca/trunk/tools/findbugs/filter.xml
===================================================================
--- projects/jboss-jca/trunk/tools/findbugs/filter.xml	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/tools/findbugs/filter.xml	2010-05-07 18:07:37 UTC (rev 104567)
@@ -41,27 +41,9 @@
   <!--  org.jboss.jca.deployers filter -->
   <Match>
     <Class name="org.jboss.jca.deployers.fungal.RADeployer"/>
-    <Bug code="DLS"/>
+    <Bug code="DLS,ST"/>
   </Match>
 
-  <!--  org.jboss.jca.fungal filter -->
-  <Match>
-    <Class name="org.jboss.jca.fungal.impl.DeploymentDeployer"/>
-    <Bug code="DLS,UPM"/>
-  </Match>
-  <Match>
-    <Class name="org.jboss.jca.fungal.impl.KernelImpl"/>
-    <Bug code="DLS,UPM"/>
-  </Match>
-  <Match>
-    <Class name="org.jboss.jca.fungal.impl.remote.Communication"/>
-    <Bug code="UPM"/>
-  </Match>
-  <Match>
-    <Class name="org.jboss.jca.fungal.impl.remote.CommunicationServer"/>
-    <Bug code="DLS,UPM"/>
-  </Match>
-
   <!--  org.jboss.jca.sjc filter -->
   <Match>
     <Class name="org.jboss.jca.sjc.Main"/>
@@ -71,6 +53,10 @@
     <Class name="org.jboss.jca.sjc.Main$LifeThread"/>
     <Bug code="UW,Wa"/>
   </Match>
+  <Match>
+    <Class name="org.jboss.jca.sjc.Shutdown"/>
+    <Bug code="Dm,PZLA"/>
+  </Match>
 
   <!--  org.jboss.jca.standalone filter -->
   <Match>

Modified: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/ao/AOTestCase.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/ao/AOTestCase.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/ao/AOTestCase.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -21,7 +21,6 @@
  */
 package org.jboss.jca.validator.rules.ao;
 
-import org.jboss.jca.fungal.deployers.DeployException;
 import org.jboss.jca.validator.Failure;
 import org.jboss.jca.validator.Severity;
 import org.jboss.jca.validator.ValidatorException;
@@ -33,6 +32,8 @@
 
 import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
 
+import com.github.fungal.deployers.DeployException;
+
 import org.junit.Test;
 
 import static org.hamcrest.core.Is.is;

Modified: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/as/ASTestCase.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/as/ASTestCase.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/as/ASTestCase.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -21,7 +21,6 @@
  */
 package org.jboss.jca.validator.rules.as;
 
-import org.jboss.jca.fungal.deployers.DeployException;
 import org.jboss.jca.validator.Failure;
 import org.jboss.jca.validator.Severity;
 import org.jboss.jca.validator.ValidatorException;
@@ -33,6 +32,8 @@
 
 import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
 
+import com.github.fungal.deployers.DeployException;
+
 import org.junit.Test;
 
 import static org.hamcrest.core.Is.is;

Modified: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/cf/CFTestCase.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/cf/CFTestCase.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/cf/CFTestCase.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -21,7 +21,6 @@
  */
 package org.jboss.jca.validator.rules.cf;
 
-import org.jboss.jca.fungal.deployers.DeployException;
 import org.jboss.jca.validator.Failure;
 import org.jboss.jca.validator.Severity;
 import org.jboss.jca.validator.ValidatorException;
@@ -29,6 +28,8 @@
 
 import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
 
+import com.github.fungal.deployers.DeployException;
+
 import org.junit.Test;
 
 import static org.hamcrest.core.Is.is;

Modified: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/mcf/MCFTestCase.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/mcf/MCFTestCase.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/mcf/MCFTestCase.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -21,7 +21,6 @@
  */
 package org.jboss.jca.validator.rules.mcf;
 
-import org.jboss.jca.fungal.deployers.DeployException;
 import org.jboss.jca.validator.Failure;
 import org.jboss.jca.validator.Severity;
 import org.jboss.jca.validator.ValidatorException;
@@ -33,6 +32,8 @@
 
 import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
 
+import com.github.fungal.deployers.DeployException;
+
 import org.junit.Test;
 
 import static org.hamcrest.core.Is.is;

Modified: projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/ra/RATestCase.java
===================================================================
--- projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/ra/RATestCase.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/validator/src/test/java/org/jboss/jca/validator/rules/ra/RATestCase.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -21,7 +21,6 @@
  */
 package org.jboss.jca.validator.rules.ra;
 
-import org.jboss.jca.fungal.deployers.DeployException;
 import org.jboss.jca.validator.Failure;
 import org.jboss.jca.validator.Severity;
 import org.jboss.jca.validator.ValidatorException;
@@ -33,6 +32,8 @@
 
 import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
 
+import com.github.fungal.deployers.DeployException;
+
 import org.junit.Test;
 
 import static org.hamcrest.core.Is.is;

Modified: projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WARDeployer.java
===================================================================
--- projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WARDeployer.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WARDeployer.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -22,17 +22,17 @@
 
 package org.jboss.jca.web;
 
-import org.jboss.jca.fungal.deployers.DeployException;
-import org.jboss.jca.fungal.deployers.Deployer;
-import org.jboss.jca.fungal.deployers.Deployment;
-import org.jboss.jca.fungal.util.FileUtil;
-
 import java.io.File;
 import java.io.IOException;
 import java.net.URL;
 
 import org.jboss.logging.Logger;
 
+import com.github.fungal.deployers.DeployException;
+import com.github.fungal.deployers.Deployer;
+import com.github.fungal.deployers.Deployment;
+import com.github.fungal.util.FileUtil;
+
 import org.mortbay.jetty.Server;
 import org.mortbay.jetty.webapp.WebAppContext;
 

Modified: projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WARDeployment.java
===================================================================
--- projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WARDeployment.java	2010-05-07 16:27:21 UTC (rev 104566)
+++ projects/jboss-jca/trunk/web/src/main/java/org/jboss/jca/web/WARDeployment.java	2010-05-07 18:07:37 UTC (rev 104567)
@@ -22,9 +22,6 @@
 
 package org.jboss.jca.web;
 
-import org.jboss.jca.fungal.deployers.Deployment;
-import org.jboss.jca.fungal.util.FileUtil;
-
 import java.io.Closeable;
 import java.io.File;
 import java.io.IOException;
@@ -32,6 +29,9 @@
 
 import org.jboss.logging.Logger;
 
+import com.github.fungal.deployers.Deployment;
+import com.github.fungal.util.FileUtil;
+
 import org.mortbay.jetty.Handler;
 
 /**




More information about the jboss-cvs-commits mailing list