[jboss-cvs] JBossAS SVN: r65321 - in trunk/system-jmx/src/main/org/jboss/system: deployers and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Sep 11 22:55:52 EDT 2007
Author: scott.stark at jboss.org
Date: 2007-09-11 22:55:52 -0400 (Tue, 11 Sep 2007)
New Revision: 65321
Modified:
trunk/system-jmx/src/main/org/jboss/system/ServiceContext.java
trunk/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java
trunk/system-jmx/src/main/org/jboss/system/microcontainer/ServiceControllerContext.java
Log:
JBAS-4684, only pass on context errors to the ServiceContext and check for an error in ServiceDeployer.deploy after an apparent successful start.
Modified: trunk/system-jmx/src/main/org/jboss/system/ServiceContext.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/ServiceContext.java 2007-09-12 02:15:59 UTC (rev 65320)
+++ trunk/system-jmx/src/main/org/jboss/system/ServiceContext.java 2007-09-12 02:55:52 UTC (rev 65321)
@@ -81,7 +81,7 @@
public transient Service proxy;
/** Cause for failure */
- public Throwable problem;
+ private Throwable problem;
public String getStateString()
{
@@ -92,7 +92,17 @@
{
return stateNames[stateInt];
}
-
+
+ public Throwable getProblem()
+ {
+ return problem;
+ }
+
+ public void setProblem(Throwable problem)
+ {
+ this.problem = problem;
+ }
+
public String toString()
{
StringBuffer sbuf = new StringBuffer(512);
Modified: trunk/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java 2007-09-12 02:15:59 UTC (rev 65320)
+++ trunk/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java 2007-09-12 02:55:52 UTC (rev 65321)
@@ -105,6 +105,9 @@
try
{
start(context);
+ Throwable t = context.getProblem();
+ if (t != null)
+ throw t;
}
catch (Throwable t)
{
Modified: trunk/system-jmx/src/main/org/jboss/system/microcontainer/ServiceControllerContext.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/microcontainer/ServiceControllerContext.java 2007-09-12 02:15:59 UTC (rev 65320)
+++ trunk/system-jmx/src/main/org/jboss/system/microcontainer/ServiceControllerContext.java 2007-09-12 02:55:52 UTC (rev 65321)
@@ -224,7 +224,8 @@
catch (Exception ignored)
{
}
- serviceContext.problem = getError();
+ if (getError() != null)
+ serviceContext.setProblem(getError());
if (getState() == ControllerState.ERROR)
serviceContext.state = ServiceContext.FAILED;
return serviceContext;
@@ -239,7 +240,7 @@
}
catch (Throwable t)
{
- serviceContext.problem = t;
+ serviceContext.setProblem(t);
serviceContext.state = ServiceContext.FAILED;
throw t;
}
More information about the jboss-cvs-commits
mailing list