[jboss-cvs] JBossAS SVN: r90893 - projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 7 06:48:39 EDT 2009
Author: kabir.khan at jboss.com
Date: 2009-07-07 06:48:39 -0400 (Tue, 07 Jul 2009)
New Revision: 90893
Modified:
projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java
Log:
[JBKERNEL-25] When something goes wrong with asynch contexts, use the name of the context in error messages, or if trace is enabled spit out the whole context
Modified: projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java
===================================================================
--- projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java 2009-07-07 10:07:10 UTC (rev 90892)
+++ projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java 2009-07-07 10:48:39 UTC (rev 90893)
@@ -1158,7 +1158,11 @@
if (asynch)
{
if (executor == null)
- log.warn("No executor in controller " + this + " to use installing asynchronous context " + context);
+ {
+ Object ctx = trace ? context : context.getName();
+ log.warn("No executor in controller " + this + " to use installing asynchronous context " + ctx);
+
+ }
Executor foundExecutor = searchForExecutor();
if (foundExecutor != null)
@@ -1176,7 +1180,8 @@
}
catch(RejectedExecutionException e)
{
- log.warn("Asynchronous execution rejected by executor for context " + context.getName() + ":" + e.getMessage());
+ Object ctx = trace ? context : context.getName();
+ log.warn("Asynchronous execution rejected by executor for context " + ctx + ":" + e.getMessage());
contextsInstalledByExecutor.disassociateWithThread(context);
}
}
@@ -2195,7 +2200,8 @@
}
catch (Throwable t)
{
- log.error("Problem installing context asynchronously " + context, t);
+ Object ctx = trace ? context : context.getName();
+ log.error("Problem installing context asynchronously " + ctx, t);
}
finally
{
@@ -2232,7 +2238,8 @@
}
catch (Throwable error)
{
- log.error("Error resolving dependencies for " + toState.getStateString() + ": " + context.toShortString(), error);
+ Object ctx = trace ? context : context.getName();
+ log.error("Error resolving dependencies for " + toState.getStateString() + ": " + ctx, error);
uninstallContext(context, ControllerState.NOT_INSTALLED, trace);
errorContexts.put(context.getName(), context);
context.setError(error);
More information about the jboss-cvs-commits
mailing list