servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r606317 - /servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java
Date Fri, 21 Dec 2007 21:09:12 GMT
Author: chirino
Date: Fri Dec 21 13:09:11 2007
New Revision: 606317

URL: http://svn.apache.org/viewvc?rev=606317&view=rev
Log:
start listening for the START event sooner so that we don't miss it

Modified:
    servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java

Modified: servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java?rev=606317&r1=606316&r2=606317&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java
(original)
+++ servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java
Fri Dec 21 13:09:11 2007
@@ -64,6 +64,14 @@
 
     public void start() {
         frameworkStarted = new CountDownLatch(1);
+		getBundleContext().addFrameworkListener(new FrameworkListener(){
+			public void frameworkEvent(FrameworkEvent event) {
+				log.debug("Got event: " + event.getType());
+				if( event.getType() == FrameworkEvent.STARTED ) {
+					frameworkStarted.countDown();
+				}
+			}
+		});
         if (start) {
             thread = new Thread(this);
             thread.start();
@@ -136,15 +144,6 @@
      * @throws InterruptedException
      */
     private void waitForFrameworkToStart() throws InterruptedException {
-		getBundleContext().addFrameworkListener(new FrameworkListener(){
-			public void frameworkEvent(FrameworkEvent event) {
-				log.debug("Got event: " + event.getType());
-				if( event.getType() == FrameworkEvent.STARTED ) {
-					frameworkStarted.countDown();
-				}
-			}
-		});
-
 		if( frameworkStarted.await(5, TimeUnit.SECONDS) ) {
 			log.info("System completed startup.");
 		} else {



Mime
View raw message