You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by am...@apache.org on 2005/12/10 10:30:30 UTC
svn commit: r355729 -
/geronimo/trunk/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java
Author: ammulder
Date: Sat Dec 10 01:30:28 2005
New Revision: 355729
URL: http://svn.apache.org/viewcvs?rev=355729&view=rev
Log:
Don't endlessly recalculate whether the server is running (GERONIMO-1200)
Modified:
geronimo/trunk/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java
Modified: geronimo/trunk/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java?rev=355729&r1=355728&r2=355729&view=diff
==============================================================================
--- geronimo/trunk/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java (original)
+++ geronimo/trunk/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java Sat Dec 10 01:30:28 2005
@@ -63,6 +63,7 @@
private transient Kernel kernel;
private transient DeploymentFactory factory;
private transient TargetModuleID[] startupModules = null;
+ private transient boolean serverRunning = false;
public DirectoryHotDeployer(String path, int pollIntervalMillis, ServerInfo serverInfo, Kernel kernel) {
this.path = path;
@@ -171,6 +172,10 @@
}
public boolean isServerRunning() {
+ if (serverRunning) {
+ return true;
+ }
+
// a bit of a hack, but the PersistentConfigurationList is the only thing that knows whether the server is full started!
GBeanQuery query = new GBeanQuery(null, PersistentConfigurationList.class.getName());
Set configLists = kernel.listGBeans(query);
@@ -185,6 +190,7 @@
log.warn("Hot deployer unable to determine whether kernel is started", e);
}
}
+ serverRunning = true;
return true;
}