RFC: Netx - Implement SingeInstanceService

Omair Majid omajid at redhat.com
Wed Jun 24 11:23:18 PDT 2009


Deepak Bhole wrote:
> * Omair Majid <omajid at redhat.com> [2009-06-23 10:28]:
>> Hi,
>>
>> 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 elsewhere.
> 
> Other than that, looks good to me!

Fixed. Ok to commit?

ChangeLog:
2009-06-24  Omair Majid  <omajid at redhat.com>

     *rt/net/sourceforge/jnlp/Launcher.java
     (launchApplication): Check for any existing single instance.
     Dont start a second instance.
     *rt/net/sourceforge/jnlp/resources/Messages.properties: Add
     RNoLockDir.
     *rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java:
     Added USER, TMP_DIR, and changed LOCKS_DIR
     *rt/net/sourceforge/jnlp/services/ExtendedSingleInstanceService.java
     New file.
     *rt/net/sourceforge/jnlp/services/InstanceExistsException.java: New
     file.
     *rt/net/sourceforge/jnlp/services/ServiceUtil.java
     (getSingleInstanceService): New function.
     (checkExistingSingleInstance): New function.
     *rt/net/sourceforge/jnlp/services/SingleInstanceLock.java: New
     file.
     *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
     file.

Thanks,
Omair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netx-single-instance.patch
Type: text/x-patch
Size: 24734 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090624/04ac6cf8/netx-single-instance.patch 


More information about the distro-pkg-dev mailing list