I have isolated the problem. The instructions blocking Felix until something is entered on the shell is
InetAddress.getByName("localhost"); The strange thing is that all works correctly if I press I do something on the shell. I also tried to perform the instruction on a thread started in the Activator but the Felix behaviour its the same. Any siggestion? Giovanni Gionni wrote: > > Dear forum users, > thanks in advance for your support! > (I hope to be able to help you in the future.. ) > > My problem is that, when I start Felix, some bundles starts only after > that I send some commnds to the shell (i.e. ps or also a blank line). > > For example the following code reegards a bundle Activator in wich I start > a Derby database: > public class Activator implements BundleActivator { > [...]fields[..] > public void start(BundleContext context) { > System.out.println("***Starting the server at port: " > + dbPort + " on folder " + > dbFolder + "***"); > derbyServer = new NetworkServerControl(InetAddress > .getByName("localhost"), > dbPort); > derbyServer.start(null); > System.out.println("***Started****"); > } > [...]stop > } > > If I install the bundle (using Felix shell) and then I start it, it works > correctly. > If I execute the update command it works correcty. > > Anyway if the bundle is installed and I stop and re-start felix I just > read the message "Starting the server at port..." . > > Felix seems is blocked, the bunlde stays in the "starting" mode and other > bundles do not start. > > If at this point I input a blank line or a "ps" command the bundle starts > and also other bundles start withouth any problem. In the past I had the > same problem with a bundle starting a SWING gui (it was just an exercise > and I do not found a solution). > > May be that I need to start the derby server on another thread? Anyway do > you undestand Felix behaviour? > > Thanks for your answers, > Giovanni > > > > -- View this message in context: http://www.nabble.com/Bundle-starting-only-after-some-commands-to-the-shell-tp23195936p23197360.html Sent from the Apache Felix - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org