Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Re-starting Equinox programmatically

I think calling refresh or update on the system bundle is supposed to restart the framework.

-> richard

On 5/30/12 5:06 PM, Tim Diekmann wrote:
Hi,

I am looking for a way to re-start the Equinox framework after it has been started and stopped successfully.

In an initial attempt, I use the ServiceLoader to get the EquinoxFactory and produce an Equinox instance. First start works fine.
While this is all available from the standard spec, what makes my question specific to Equinox is the fact that I configure an AdapterHook in the launch properties.

Now, when I stop the instance and re-create it using the factory, the Equinox Framework throws a ClassCastException during initialization of the AdapterHooks as my private hook comes from a different class loader.
During debugging I found that Equinox switched the class loader on the second attempt, because the static FrameworkProperties class has already created the properties and therefore switched the class loader.

How it this supposed to work? How can you use the OSGi launch spec and restart Equinox programmatically?

Thanks,

  Tim.



_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Back to the top