[jboss-cvs] JBossAS SVN: r64721 - trunk/bootstrap/src/main/org/jboss/bootstrap/microcontainer.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Aug 20 16:21:35 EDT 2007
Author: alesj
Date: 2007-08-20 16:21:35 -0400 (Mon, 20 Aug 2007)
New Revision: 64721
Modified:
trunk/bootstrap/src/main/org/jboss/bootstrap/microcontainer/ServerImpl.java
Log:
Fixing usage of bootstrap field.
Modified: trunk/bootstrap/src/main/org/jboss/bootstrap/microcontainer/ServerImpl.java
===================================================================
--- trunk/bootstrap/src/main/org/jboss/bootstrap/microcontainer/ServerImpl.java 2007-08-20 19:44:19 UTC (rev 64720)
+++ trunk/bootstrap/src/main/org/jboss/bootstrap/microcontainer/ServerImpl.java 2007-08-20 20:21:35 UTC (rev 64721)
@@ -70,7 +70,7 @@
protected void doStart(StopWatch watch) throws Throwable
{
// Bootstrap the kernel
- BasicBootstrap bootstrap = new BasicBootstrap();
+ bootstrap = new BasicBootstrap();
bootstrap.run();
kernel = bootstrap.getKernel();
@@ -129,8 +129,10 @@
try
{
if (kernelDeployer != null)
+ {
kernelDeployer.shutdown();
- kernelDeployer = null;
+ kernelDeployer = null;
+ }
}
catch (Throwable t)
{
@@ -140,12 +142,22 @@
// Shutdown the controller
try
{
- if (bootstrap != null)
+ Kernel currentKernel = null;
+ if (kernel != null)
{
- Kernel kernel = bootstrap.getKernel();
- KernelController controller = kernel.getController();
+ currentKernel = kernel;
+ kernel = null;
+ }
+ else if (bootstrap != null)
+ {
+ currentKernel = bootstrap.getKernel();
+ }
+ bootstrap = null;
+
+ if (currentKernel != null)
+ {
+ KernelController controller = currentKernel.getController();
controller.shutdown();
- bootstrap = null;
}
}
catch (Throwable t)
More information about the jboss-cvs-commits
mailing list