Skip to main content


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 15:43 Go to next message
Giovanni De Sossi is currently offline Giovanni De SossiFriend
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 07:00 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
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 14:38 Go to previous messageGo to next message
Giovanni De Sossi is currently offline Giovanni De SossiFriend
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 07:22 Go to previous messageGo to next message
Joerg  is currently offline Joerg Friend
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 07:46 Go to previous messageGo to next message
Giovanni De Sossi is currently offline Giovanni De SossiFriend
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 08:58 Go to previous message
Eclipse UserFriend
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: Tue Apr 16 04:22:13 GMT 2024

Powered by FUDForum. Page generated in 0.04523 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top