[jboss-cvs] JBossAS SVN: r63788 - branches/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/system/src/main/org/jboss/system/server/profileservice/hotdeploy.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jul 2 14:51:49 EDT 2007
Author: thomas.diesler at jboss.com
Date: 2007-07-02 14:51:49 -0400 (Mon, 02 Jul 2007)
New Revision: 63788
Modified:
branches/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
Log:
Current workaround for JBAS-4206
mainDeployer.addDeploymentContext(ctx) needs to see the dtd
Modified: branches/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
===================================================================
--- branches/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java 2007-07-02 18:36:18 UTC (rev 63787)
+++ branches/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java 2007-07-02 18:51:49 UTC (rev 63788)
@@ -270,49 +270,50 @@
return;
}
- Collection<ModificationInfo> modified = activeProfile.getModifiedDeployments();
- for(ModificationInfo info : modified)
+ // Current workaround for JBAS-4206
+ // TDI: mainDeployer.addDeploymentContext(ctx) needs to see the dtd
+ ClassLoader oldTCL = Thread.currentThread().getContextClassLoader();
+ ClassLoader tcl = getTCL(activeProfile);
+ try
{
- DeploymentContext ctx = info.getCtx();
- switch( info.getStatus() )
- {
- case ADDED:
- mainDeployer.addDeploymentContext(ctx);
- break;
- case MODIFIED:
- mainDeployer.addDeploymentContext(ctx);
- break;
- case REMOVED:
- mainDeployer.removeDeploymentContext(ctx.getName());
- break;
- }
- }
+ Thread.currentThread().setContextClassLoader(tcl);
+ Collection<ModificationInfo> modified = activeProfile.getModifiedDeployments();
+ for(ModificationInfo info : modified)
+ {
+ DeploymentContext ctx = info.getCtx();
+ switch( info.getStatus() )
+ {
+ case ADDED:
+ mainDeployer.addDeploymentContext(ctx);
+ break;
+ case MODIFIED:
+ mainDeployer.addDeploymentContext(ctx);
+ break;
+ case REMOVED:
+ mainDeployer.removeDeploymentContext(ctx.getName());
+ break;
+ }
+ }
- // Process the changes
- try
- {
- if( modified.size() > 0 )
- {
- // Current workaround for JBAS-4206
- ClassLoader oldTCL = Thread.currentThread().getContextClassLoader();
- ClassLoader tcl = getTCL(activeProfile);
- try
- {
- Thread.currentThread().setContextClassLoader(tcl);
- mainDeployer.process();
- checkIncomplete();
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(oldTCL);
- }
- }
+ // Process the changes
+ try
+ {
+ if( modified.size() > 0 )
+ {
+ mainDeployer.process();
+ checkIncomplete();
+ }
+ }
+ catch (Exception e)
+ {
+ log.warn("Failed to process changes", e);
+ // TODO: somehow need to ignore bad deployments to avoid repeated errors
+ return;
+ }
}
- catch (Exception e)
+ finally
{
- log.warn("Failed to process changes", e);
- // TODO: somehow need to ignore bad deployments to avoid repeated errors
- return;
+ Thread.currentThread().setContextClassLoader(oldTCL);
}
if( trace )
More information about the jboss-cvs-commits
mailing list