[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Equinox Application Model (was: EclipseAppLauncher v. Declarative Services -- race condition?)

Thomas Watson <tjwatson@xxxxxxxxxx> writes:

> Applications can specify certain properties (e.g. cardinality,
> thread requirements etc) see the
> org.eclipse.core.runtime.applications extension point schema for
> more information.  If the application declares that it must run on
> the main thread then when you call ApplicationDescriptor.launch the
> eclipse application contain ends up calling the ApplicationLauncher
> service to launch the application on the main thread.

After some trial and error, mostly with figuring out that I needed to
specify ";singleton:=true" on my Bundle-SymbolicName header in order
to get its bundle's plugin.xml file read, I got my application
registered and fired up by the framework.

However, I'm now puzzle by RegistrationStrategyOSGI's method
createExecutableExtension(), which insists on being able to
default-construct my application class. If my application class can't
take any constructor arguments, how is it going to get ahold of a
BundleContext?¹

I looked at the IApplicationContext interface provided to the start()
method, expecting to find it there, but the only Bundle exposed there
is the "branding bundle".


Footnotes: 
¹ My current "root application class" is -- or was -- instantiated by
  Spring OSGi once all its dependent services were available.

-- 
Steven E. Harris