RFC: Netx - Implement SingeInstanceService
dbhole at redhat.com
Wed Jun 24 11:33:08 PDT 2009
* Omair Majid <omajid at redhat.com> [2009-06-24 14:23]:
> Deepak Bhole wrote:
>> * Omair Majid <omajid at redhat.com> [2009-06-23 10:28]:
>>> Updated patch attached.
>> One very minor nitpick:
>> In SingleInstanceLock::getPort(), if an exception occurs, port is set
>> to Integer.MIN_VALUE. It should probably be set to INVALID_PORT, since
>> such a variable has already been defined and is used in comparison
>> Other than that, looks good to me!
> Fixed. Ok to commit?
> 2009-06-24 Omair Majid <omajid at redhat.com>
> (launchApplication): Check for any existing single instance.
> Dont start a second instance.
> *rt/net/sourceforge/jnlp/resources/Messages.properties: Add
> Added USER, TMP_DIR, and changed LOCKS_DIR
> New file.
> *rt/net/sourceforge/jnlp/services/InstanceExistsException.java: New
> (getSingleInstanceService): New function.
> (checkExistingSingleInstance): New function.
> *rt/net/sourceforge/jnlp/services/SingleInstanceLock.java: New
> *rt/net/sourceforge/jnlp/services/XServiceManagerStub.java: Add
> SingleInstanceService to serviceNames. Create a new instance of
> XSingleInstanceService as a privileged proxy.
> *rt/net/sourceforge/jnlp/services/XSingleInstanceService.java: New
More information about the distro-pkg-dev