Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Only one instance of my RCP product
Only one instance of my RCP product [message #674627] Fri, 27 May 2011 11:43 Go to next message
Giovanni De Sossi is currently offline Giovanni De Sossi
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

Hi,

I've developed an RCP product that actually is in beta test phase; now I have to limit the running copies of the product to only one per time:


  • how can I do this?
  • where I have to put the related code in my RCP product?


Thank you very much, any help is appreciated

Regards,

Giovanni
Re: Only one instance of my RCP product [message #675049 is a reply to message #674627] Mon, 30 May 2011 03:00 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.
Messages: 621
Registered: July 2009
Senior Member
On 27/05/11 9:13 PM, Giovanni De Sossi wrote:
> Hi,
>
> I've developed an RCP product that actually is in beta test phase; now I
> have to limit the running copies of the product to only one per time:
>

There isn't a Java/Eclipse API to do this. You need to do workarounds
like holding a lock on a file or binding to a port etc.

--
- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: Only one instance of my RCP product [message #675192 is a reply to message #675049] Mon, 30 May 2011 10:38 Go to previous messageGo to next message
Giovanni De Sossi is currently offline Giovanni De Sossi
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

Hi Prakash,

thank you very much, I'll try your suggestion.

Regards,

Giovanni
Re: Only one instance of my RCP product [message #676978 is a reply to message #675049] Tue, 07 June 2011 03:22 Go to previous messageGo to next message
Joerg  is currently offline Joerg
Messages: 1
Registered: June 2011
Junior Member
try this workaround:

Platform.getInstanceLocation().lock();
Re: Only one instance of my RCP product [message #676984 is a reply to message #676978] Tue, 07 June 2011 03:46 Go to previous messageGo to next message
Giovanni De Sossi is currently offline Giovanni De Sossi
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

Thank you Joerg, unfortunately it seems not to work......
Re: Only one instance of my RCP product [message #676998 is a reply to message #676984] Tue, 07 June 2011 04:58 Go to previous message
Eclipse User
Originally posted by:

On 2011-06-07 09:46, Giovanni De Sossi wrote:
> Thank you Joerg, unfortunately it seems not to work......

Presumably you are not using the lock API correctly. You should ensure
that you do it similarly to how class
org.eclipse.ui.internal.ide.application.IDEApplication does this within
its method checkInstanceLocation.

HTH & Greetings from Bremen,

Daniel Kr├╝gler
Previous Topic:Form Heading to Center
Next Topic:Editors tab order + menu text
Goto Forum:
  


Current Time: Wed Aug 27 15:12:02 EDT 2014

Powered by FUDForum. Page generated in 0.02311 seconds