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?

Thanks,
 Larry

Reply via email to