Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] New API on IApplicationContext

Hi Thomas,

We used to mock a context object to start the application in the junit test. I tried to migrate the code using ApplicationDescriptor to avoid break caused by the changes of IApplicationContext.
However, the ApplicationDescriptor.launch always fails due to the built-in application 'org.eclipse.pde.junit.runtime.coretestapplication' is LOCKED_SINGLETON_GLOBAL_RUNNING. It doesn't allow running other app in the same time.
Any idea for it?

org.osgi.service.application.ApplicationException: A singleton application instance is already running: org.eclipse.pde.junit.runtime.coretestapplication.0
    at org.eclipse.equinox.internal.app.EclipseAppContainer.lock(EclipseAppContainer.java:481)
    at org.eclipse.equinox.internal.app.EclipseAppDescriptor.createAppHandle(EclipseAppDescriptor.java:190)
    at org.eclipse.equinox.internal.app.EclipseAppDescriptor.launchSpecific(EclipseAppDescriptor.java:90)
    at org.osgi.service.application.ApplicationDescriptor.launch(ApplicationDescriptor.java:315)

Best Regards
Kane


On Wed, Mar 3, 2010 at 11:19 PM, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:

Implementers of org.eclipse.equinox.app.IApplicationContext interface please read on. Otherwise you can safely ignore this message.

First of all, what are you doing implementing an interface that has the @noimplement javadoc tag? It appears there are some cases where clients have found reasons to implement this interface. In most all cases I think it can be avoided by proper usage of the org.osgi.service.application.ApplicationDescriptor service to launch other applications instead of mocking up a context and calling an application implementation directly.

If you find you are mocking up an IApplicationContext then you will be affected by the changes in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=304361 where new API was added to IApplicaitonContext. You will need to start implementing the new methods on this interface.

Let me know if you have any questions.

Tom


_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev



Back to the top