geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r125086 - /geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/WaitForStarted.java
Date Thu, 13 Jan 2005 18:20:40 GMT
Author: djencks
Date: Thu Jan 13 10:20:38 2005
New Revision: 125086

URL: http://svn.apache.org/viewcvs?view=rev&rev=125086
Log:
Fix by dain for situation where jmx connects but waited-for module is not yet loaded
Modified:
   geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/WaitForStarted.java

Modified: geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/WaitForStarted.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/WaitForStarted.java?view=diff&rev=125086&p1=geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/WaitForStarted.java&r1=125085&p2=geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/WaitForStarted.java&r2=125086
==============================================================================
--- geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/WaitForStarted.java
(original)
+++ geronimo/trunk/plugins/maven-geronimo-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/WaitForStarted.java
Thu Jan 13 10:20:38 2005
@@ -28,6 +28,7 @@
 import org.apache.geronimo.kernel.jmx.KernelDelegate;
 import org.apache.geronimo.kernel.jmx.KernelMBean;
 import org.apache.geronimo.kernel.management.State;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
 
 public class WaitForStarted extends AbstractModuleCommand {
 
@@ -77,9 +78,13 @@
         }
         URI id = new URI(getId());
         for (int tries = maxTries; tries > 0; tries--) {
-            int state = kernel.getConfigurationState(id);
-            if (state == State.RUNNING_INDEX) {
-                return;
+            try {
+                int state = kernel.getConfigurationState(id);
+                if (state == State.RUNNING_INDEX) {
+                    return;
+                }
+            } catch (NoSuchConfigException e) {
+                //hasn't been loaded yet, keep trying
             }
             Thread.sleep(1000);
         }

Mime
View raw message