[jboss-cvs] JBossAS SVN: r61384 - projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployment.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Mar 16 16:25:21 EDT 2007


Author: scott.stark at jboss.org
Date: 2007-03-16 16:25:21 -0400 (Fri, 16 Mar 2007)
New Revision: 61384

Modified:
   projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployment/MainDeployerImpl.java
Log:
Rollback the tcl change as isolates each deployments phase from previously set app tcls

Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployment/MainDeployerImpl.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployment/MainDeployerImpl.java	2007-03-16 20:24:15 UTC (rev 61383)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployment/MainDeployerImpl.java	2007-03-16 20:25:21 UTC (rev 61384)
@@ -68,7 +68,7 @@
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @author Scott.Stark at jboss.org
- * @version $Revision: 1.1 $
+ * @version $Revision$
  */
 public class MainDeployerImpl implements MainDeployer
 {
@@ -514,26 +514,7 @@
    private void prepareUndeploy(Deployer deployer, DeploymentContext context, boolean doComponents)
    {
       DeploymentUnit unit = context.getDeploymentUnit();
-      ClassLoader oldTCL = Thread.currentThread().getContextClassLoader();
-      try
-      {
-         ClassLoader tcl = null;
-         try
-         {
-            tcl = unit.getClassLoader();
-         }
-         catch(Exception e)
-         {
-         }
-         if( tcl == null )
-            tcl = deployer.getClass().getClassLoader();
-         Thread.currentThread().setContextClassLoader(tcl);
-         deployer.prepareUndeploy(unit);
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(oldTCL);
-      }
+      deployer.prepareUndeploy(unit);
       
       if (doComponents)
       {
@@ -549,26 +530,7 @@
    private void commitUndeploy(Deployer deployer, DeploymentContext context, boolean doComponents)
    {
       DeploymentUnit unit = context.getDeploymentUnit();
-      ClassLoader oldTCL = Thread.currentThread().getContextClassLoader();
-      try
-      {
-         ClassLoader tcl = null;
-         try
-         {
-            tcl = unit.getClassLoader();
-         }
-         catch(Exception e)
-         {
-         }
-         if( tcl == null )
-            tcl = deployer.getClass().getClassLoader();
-         Thread.currentThread().setContextClassLoader(tcl);
-         deployer.commitUndeploy(unit);
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(oldTCL);
-      }
+      deployer.commitUndeploy(unit);
       
       if (doComponents)
       {
@@ -590,26 +552,7 @@
          theComponents = components.toArray(new DeploymentContext[components.size()]);
       
       DeploymentUnit unit = context.getDeploymentUnit();
-      ClassLoader oldTCL = Thread.currentThread().getContextClassLoader();
-      try
-      {
-         ClassLoader tcl = null;
-         try
-         {
-            tcl = unit.getClassLoader();
-         }
-         catch(Exception e)
-         {
-         }
-         if( tcl == null )
-            tcl = deployer.getClass().getClassLoader();
-         Thread.currentThread().setContextClassLoader(tcl);
-         deployer.prepareDeploy(unit);
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(oldTCL);
-      }
+      deployer.prepareDeploy(unit);
 
       try
       {
@@ -646,26 +589,7 @@
          theComponents = components.toArray(new DeploymentContext[components.size()]);
       
       DeploymentUnit unit = context.getDeploymentUnit();
-      ClassLoader oldTCL = Thread.currentThread().getContextClassLoader();
-      try
-      {
-         ClassLoader tcl = null;
-         try
-         {
-            tcl = unit.getClassLoader();
-         }
-         catch(Exception e)
-         {
-         }
-         if( tcl == null )
-            tcl = deployer.getClass().getClassLoader();
-         Thread.currentThread().setContextClassLoader(tcl);
-         deployer.commitDeploy(unit);
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(oldTCL);
-      }
+      deployer.commitDeploy(unit);
 
       try
       {


Property changes on: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployment/MainDeployerImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision




More information about the jboss-cvs-commits mailing list