On Aug 22, 2007, at 7:27 AM, Christopher Blythe wrote:

All...

I'm still working with the DayTrader streamer client and have run into another issue I cannot explain. Both the streamer and ws app client create Swing-based GUIs. I am in no way a Swing expert; however, all of the docs that I have read indicate that the GUI thread should remain up and running (along with the JVM) after main completes. Here is an example...

public class JFrameExample {
    public static void main(String[] args) {
        JFrame f = new JFrame("This is a test");
        ...
        f.addWindowListener(new ExitListener());
        f.setVisible(true);
    }
}

From what I have seen all Swing apps use some variation of this, as do the DayTrader streamer and ws app clients.

Unfortunately, when I try to run these clients in under Geronimo 2.0.1, the apps terminate when the main thread completes. I have added a Thread.sleep() to the main just to verify that the GUI remains up while the main thread is still active.

Does anyone have any thoughts as to why the JVM is terminating with main while the GUI threads are still active and have not been closed? I've tried a SUN and IBM JVM and both result in early termination. The only thing I can think of is that something in the Geronimo client or the manner in which Geronimo packages the client that is changing the behavior.

I remember fixing this once....

My guess is that it got broken again when gianny added the bootstrap repository. A JIRA would be good I think. I suspect if you look around at the various command line classes you can see the code that shuts down the client from a shutdown hook and see why it isn't getting used.

I'll try to find some time to take a look at this if you don't beat me to it.

thanks
david jencks



Thanks...

Chris


--
"I say never be complete, I say stop being perfect, I say let... lets evolve, let the chips fall where they may." - Tyler Durden

Reply via email to