A bundle with Infinite Loop on Equinox OSGI Framework -


i have bundle running infinite loop on equinox osgi framework. because of bundle, not able start new bundle when run framework again. how can stop bundle in situation?

here command type start framework:

java -jar org.eclipse.osgi_3.9.0.v20130529-1710.jar -console 

it shows message infinitely:

hello world! hello world! hello world! hello world! hello world! ........... 

answering question answer how stop osgi bundle while executing method, , if allowed or not.

i assume bundle has entered infinite loop in bundleactivator.start method, , therefore tied osgi callback. not should do!! have no choice shutdown jvm, perhaps forcibly.

now problem stop bundle being started again automatically next time launch osgi. simplest way ensure delete "storage" directory osgi remembers list of bundles started last time ran. unfortunately storage directory location subject configuration property , have not specified how have configured osgi. default equinox configuration/org.eclipse.osgi, try deleting that. try running -clean.

regarding how stop osgi bundle while executing method: can of course stop bundle , cause stop method execute. can whatever in method: in general should aim clean created in start method. if have runaway thread there nothing can do, since java offers no way kill thread, offers cooperative interrupt method.

osgi cannot change fundamental rules of java, runaway threads of problem in osgi in other java application.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -