RFC: Netx - Implement SingeInstanceService

Deepak Bhole 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]:
>>> 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?
>

Yep!

Deepak

> 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





More information about the distro-pkg-dev mailing list