|
|
Re: How to start E4Application with ApplicationDescriptor.launch? [message #915946 is a reply to message #915631] |
Tue, 18 September 2012 09:16 |
Karl Weber Messages: 63 Registered: September 2010 |
Member |
|
|
Thomas Schindl wrote on Mon, 17 September 2012 19:00
well how is your main application launched? My guess is that your
initial application is also launched on the main-Thread hence it is not
available for your launch.
So you can:
a) make your base osgi-application launch on any-Thread instead
b) execute the launch in a worker thread
Well, at the beginning no application is launched, because I set the property-Declipse.application.launchDefault=false I have just an OSGi (component) service running, that is trying to start one (the first) application. I checked that: There is no service registered for the ApplicationHandle.class. Furthermore, it does not matter whether I try to launch the application in a worker thread or not, it does not make any difference. The property -Declipse.allowAppRelaunch=true does not make any difference either.
I do not understand your suggestion (a). The E4Application is singleton-global, so it cannot be run, when another application is already running, no matter on which thread.
How is your example working? I mean, is there another application running in your case when the method OSGiJemmyBootstrapTestCase.setUp is called? And what it the for?
|
|
|
Re: How to start E4Application with ApplicationDescriptor.launch? [message #915964 is a reply to message #915946] |
Tue, 18 September 2012 09:59 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Am 18.09.12 11:16, schrieb Karl Weber:
> Thomas Schindl wrote on Mon, 17 September 2012 19:00
>> well how is your main application launched? My guess is that your
>> initial application is also launched on the main-Thread hence it is not
>> available for your launch.
>>
>> So you can:
>> a) make your base osgi-application launch on any-Thread instead
>> b) execute the launch in a worker thread
>
>
> Well, at the beginning no application is launched, because I set the
> property-Declipse.application.launchDefault=false I have just an OSGi
> (component) service running, that is trying to start one (the first)
> application. I checked that: There is no service registered for the
> ApplicationHandle.class. Furthermore, it does not matter whether I try
> to launch the application in a worker thread or not, it does not make
> any difference. The property -Declipse.allowAppRelaunch=true does not
> make any difference either.
>
> I do not understand your suggestion (a). The E4Application is
> singleton-global, so it cannot be run, when another application is
I thought you are launching 2 OSGi-Applications hence the comment on the
any-Thread.
> already running, no matter on which thread.
> How is your example working? I mean, is there another application
I'm running 2 applications:
* headless junit application
* javafx e4 OSGi-Application
The JavaFX one which is not defined as a singleton application ;-) - not
sure why the SWT one is defined this way. I'd say we should not require
it to be a singleton.
> running in your case when the method OSGiJemmyBootstrapTestCase.setUp is
> called? And what it the Thread.sleep(..) for?
well I need to sleep to wait until the initial window is really shown.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03091 seconds