[jboss-cvs] JBossAS SVN: r104871 - in projects/jboss-jca/trunk: doc/userguide/en/modules and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon May 17 08:16:52 EDT 2010


Author: jesper.pedersen
Date: 2010-05-17 08:16:50 -0400 (Mon, 17 May 2010)
New Revision: 104871

Modified:
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
   projects/jboss-jca/trunk/doc/userguide/en/modules/configuration.xml
Log:
[JBJCA-331] Support deployment isolation

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-17 11:38:51 UTC (rev 104870)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java	2010-05-17 12:16:50 UTC (rev 104871)
@@ -127,6 +127,9 @@
    /** Bootstrap contexts */
    private static Map<String, CloneableBootstrapContext> bootstrapContexts = null;
 
+   /** Scope deployment */
+   private static AtomicBoolean scopeDeployment = new AtomicBoolean(false);
+
    /**
     * Constructor
     */
@@ -261,6 +264,24 @@
    }
 
    /**
+    * Set if deployments should be scoped
+    * @param value The value
+    */
+   public void setScopeDeployment(boolean value)
+   {
+      scopeDeployment.set(value);
+   }
+
+   /**
+    * Are the deployments scoped
+    * @return True if scoped; otherwise false
+    */
+   public boolean getScopeDeployment()
+   {
+      return scopeDeployment.get();
+   }
+
+   /**
     * Deploy
     * @param url The url
     * @param parent The parent classloader
@@ -300,7 +321,15 @@
 
          // Create classloader
          URL[] urls = getUrls(root);
-         KernelClassLoader cl = ClassLoaderFactory.create(ClassLoaderFactory.TYPE_PARENT_FIRST, urls, parent);
+         KernelClassLoader cl = null;
+         if (scopeDeployment.get())
+         {
+            cl = ClassLoaderFactory.create(ClassLoaderFactory.TYPE_PARENT_LAST, urls, parent);
+         }
+         else
+         {
+            cl = ClassLoaderFactory.create(ClassLoaderFactory.TYPE_PARENT_FIRST, urls, parent);
+         }
          SecurityActions.setThreadContextClassLoader(cl);
 
          // Parse metadata

Modified: projects/jboss-jca/trunk/doc/userguide/en/modules/configuration.xml
===================================================================
--- projects/jboss-jca/trunk/doc/userguide/en/modules/configuration.xml	2010-05-17 11:38:51 UTC (rev 104870)
+++ projects/jboss-jca/trunk/doc/userguide/en/modules/configuration.xml	2010-05-17 12:16:50 UTC (rev 104871)
@@ -124,6 +124,15 @@
                   Specifies which print stream that should be used to handle the <code>LogWriter</code>s
                 </entry>
               </row>
+              <row>
+                <entry><code>ScopeDeployment</code></entry>
+                <entry><code>boolean</code></entry>
+                <entry>
+                  Should each deployment be scoped (isolated) from the container. This feature allows
+                  deployment of libraries of a different version than used in the container environment.
+                  <para>Default: <code>false</code></para>
+                </entry>
+              </row>
             </tbody>
           </tgroup>
         </table>




More information about the jboss-cvs-commits mailing list