On Fri, May 21, 2010 at 3:40 PM, Larry Touve <[email protected]> wrote: > I'm writing a bundle that spawns threads to listen for socket connections, > and when connections occur, it spawns off socket reader threads. After > messing around a bit, it appears as though the start() method is acting like > the run() method, in that it hangs and doesn't actually create a new thread. > I have the following code in an Activator: > > ListenerThread listener = new ListenerThread(39000); > listener.start(); > logger.info("Listener started up"); > > The logger statement never executes. If I replace it with : > > ListenerThread listener = new ListenerThread(39000); > Thread thread = new Thread(listener); > thread.start(); > logger.info("Listener started up"); > > Everything works as expected. > > My ListenerThread implements Runnable, and I've tried it with extending > Thread, but it makes no difference. I thought that calling the start() > method of a class that extends Thread should spawn a new thread. Is this not > the case within OSGi?
It is the case with osgi too. Nothing differnent to standard java. What os are you on? regards, Karl > Thanks, > Larry > > -- Karl Pauls [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

