[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] RCP Application doesn't shut down OSGi console

It depends how you are launching it. If you've got 'osgi.noExit=true'
then I'd expect to see that behaviour. Are you running with eclipse
-application xxxx? If so, I'd expect that when your application
returns from the run() method, it would shut down the framework. Do
you know you are returning from that call? How are you determining
that your application is shutting down; is it a case of having a
window be closed? If so, is you readAndDispatch() loop taking care of
the fact that it has been closed?

You might want to find (with the console) by using 'getprop
osgi.noExit' to find out what the value is. You could also do a 'ss'
after you think you've closed your application; that would show which
bundles were stopped (INSTALLED), and which were STOPPING. It may be
that one of your stop() calls is blocking or there's some kind of
deadlock, and since the bundles are still awaiting shutdown, the
framework can't stop either.

Alex.

On 30/08/2007, Volodymyr Babiy <vbabiy@xxxxxxxxxxx> wrote:
> Hello
>
> We just have one small question to ask.
>
> Current situation:
>         We are running independent bundles, which we have
> developed, inside of the Equinox framework. Our problem is
> that when we manually shut down our Application, the OSGi
> console does not automatically shut down. When we run the
> application from our EXE, the OSGi console is not visible,
> but the JARs are still in use after the application is
> manually closed. This problem becomes apparent when we try
> to delete the JAR bundles when we try to uninstall our
> Application. The Application uses the RCP platform, all
> our bundles communicate through Declarative Services, and
> all of our bundles are coded in Java.
>
> Notes:
>
> - When we run our application through Eclipse Plug-in
> Development, the console DOES shut off naturally when we
> close the Application.
>
> Desired outcome:
>         We want a safe way to shut down the entire OSGi framework
> right after the user manually closes the Application when
> it runs from the stand-alone EXE form.
>
> So far, the only way we can turn OSGi off is to ensure
> that the console is on, and to issue an 'exit' command
> manually, but this is not desirable. We have tried
> deactivating all bundles (including bundle #0) and the
> console remained on. All literature seems to suggest that
> the system should shut down automatically once the
> Application has been closed, but we haven't been as
> fortunate. We need help in understanding what we are
> missing.
>
> Any help, suggestions, or advice would be greatly
> appreciated by our team.
> We would like to thank you in advance for your attention.
>
>
>
>
> Out teem would greatly apparition your help.
> Thank you,
> Darren Janeczek
> Volodymyr Babiy
> MIRARCO Mining Innovation
> Sudbury, ON
> Canada
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>