Hi Neil:

I know how to kill JavaFX and I found out how to kill Felix....it just
seems too easy to do both from my 3rd bundle.

But maybe it's a case of whatever works.

Thanks for your interest in my problems!



On Thu, Sep 14, 2017 at 2:48 AM, Neil Bartlett <njbartl...@gmail.com> wrote:

> Calling getBundle(0).stop() does not just shut down an OSGi bundle, it
> shuts down the entire OSGi framework. It’s not clear to me whether that’s
> what you should be doing.
>
> As for shutting down JavaFX, you have found “Platform.exit()” but you are
> looking for a better way? Maybe this question should be asked on a JavaFX
> forum.
>
> Regards,
> Neil
>
>
> > On 14 Sep 2017, at 03:36, Chuck Davis <cjgun...@gmail.com> wrote:
> >
> > After a few weeks delay for knee replacement I cobbled together a program
> > yesterday that uses the FrameworkFactory service to create a Framework
> and
> > install 3 bundles -- all of which is working splendidly as expected.
> >
> > My first bundle is this that Renato directed me to in the last thread
> about
> > this issue which takes care of the classloading issue for JavaFX:
> >
> > https://github.com/edvin/javafx-osgi
> >
> > My second bundle creates the Stage service that Paul talked about.
> >
> > My third bundle creates a couple Scenes and depending on the button
> pressed
> > changes the Scene on the Stage.
> >
> > This basic scheme is working now.
> >
> > BUT....now I have to stop things "cleanly" as "OSGi In Action" mentions.
> > Unfortunately, there is no JavaFX in the book.
> >
> > My main class just installs the bundles and then is finished but does not
> > terminate the JVM.
> >
> > I dinked around today until I came up with the combination of
> > Platform.exit() followed by BundleContext.getBundle(0).stop().  Stopping
> > bundle 0 is apparently the accepted way to stop Felix.  With this
> > combination both JVM instances end (my main class and the Framework) and
> > the visual bits and pieces disappear.  It's not too elegant and I have to
> > believe there is a better way to shut down JavaFX bundles.   ????
> >
> > Anybody have suggestions?
> >
> > Thanks in advance.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>

Reply via email to