RCP application as daemon [message #460902] |
Tue, 02 January 2007 07:34  |
Eclipse User |
|
|
|
Originally posted by: jojy.sv.gmail.com
Hi all,
I have created an RCP application for hpux and I was able to run it
successfully.
My application does a lot of processing in the background. So I thought it
would be a good idea to run my application headless.
But I have a user interface attached with my application so I am not sure
how come I can get this done.
Because once I run process as daemon how come I will be able to see the
user interface attached with the same process.
Any one had tried to do this?
Any thoughts on doing this in eclipse
Regards
George S
|
|
|
Re: RCP application as daemon [message #460908 is a reply to message #460902] |
Tue, 02 January 2007 11:47  |
Eclipse User |
|
|
|
You have two choices:
A) Create a 2nd RCP application that is headless. Then, on your server, run eclipse with the 2nd application extension point. It will stay headless all the time.
B) Create a server component and a client component, and have the two talk to each other over some kind of networking protocol (e.g. via TCP/IP or HTTP or ...) to exchange data. That way, you should be able to start the server component separately and then join the RCP GUI application at a later stage.
Of the two, A) is much easier. In fact, this happens a lot in automated builds; the testing process is in fact another RCP application that just executes testing code (and generates results). B) is a lot more difficult, and quite likely will involve you changing your app a lot in order to make it work. As an example, the Java debugging tools in JDT does this when debugging a remote Java application, though the protocol is standardised already, which helps.
Lastly, it is possible to start it as a server application (i.e. headless) and then bring up the UI component by performing an OSGi bundle start, but you need some way of triggering that first. One way might be to run with the OSGi console on a network port (eclipse -console 1234) and then telnet to 1234 to get access to the console. The goal would be to start the bundle corresponding to your UI bundles, but I'm not sure how well this would fare with the RCP and application code; I'm not sure it's set up to handle that well.
Alex.
|
|
|
Powered by
FUDForum. Page generated in 13.52055 seconds