Are you sure its using the same thread and not a new thread and the old one hangs? If it is a new thread but the old one hangs can you try without the felix shell.tui bundle around?
regards, Karl On Fri, May 21, 2010 at 4:12 PM, Larry Touve <[email protected]> wrote: >> What type is "thread" (in "thread.start") ? And what exactly is >> ListenerThread ? >> i think you are speaking of different apis. Nothing about osgi (like Karl >> just said). > > I have used both a Thread and a Runnable: > > public class ListenerThread extends Thread // or public class ListenerThread > implements Runnable > { > public ListenerThread(int port) throws Exception > { > serverSocket = new ServerSocket(port); > } > > public void run() > { > while (true) > { > Socket socket = serverSocket.accept(); // accept connection > : > (do some stuff here...) > } > } > } > > The issue is that I get different behavior when I execute this code within > OSGi, and outside of OSGi (using the Java 1.6 JVM). > > ListenerThread t = new ListenerThread(39000); > t.start() > > Creates a new thread when running in the standard JVM, but when it runs from > within OSGi, it runs the ListenerThread code within the calling thread, and > effectively suspends the calling thread. > > > Larry > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Karl Pauls [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

