Re[2]: NT/4 or OS/2 system variable value in NetRexx or Java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re[2]: NT/4 or OS/2 system variable value in NetRexx or Java

tony_koker
>>For our project we need to prevent another session of the same Java-based

>>application from running, ever.  Since the application needs be run on only
>>NT and OS/2, what I have in mind is to use a system variable that needs be
>>tested and set if it is not yet set by the application.
>>
>>Related to the above I have three questions:
>>
>>1) How can I get the value and/or set the value of such a variable in
>>NetRexx or Java?
>
>As far as I know, and I've looked pretty extensively, Java has no IPC layer to
>speak of. The current JVM model assumes it own's the machine it's running on.
   We created a System Object Data, or, SOD, server program, that runs in its
own JVM on a workstation (PC), but stores objects in a persistant store.  It
communicates using the "localhost" on the TCP/IP stack (contrasted with RMI, for
example).  We're able to store all kinds of objects, which are create-able,
update-able and delete-able from any JVM on the system (PC), provided they know
the key (name) of the object.
   Using this mechanism we are able to share information between processes and
threads.  All objects are serialized.  And, it is planned to implement encrypted
(key-pair) objects so only authorized applications, or, applets have access.
   At the moment, all of our objects are stored in a sodlib.jar file, so only
objects SOD is aware of, can it store.  We've also discussed modifying its
current implementation (hash table) to allow any subclass of Object, but this
hasn't been put into code yet.
   All of this is probably overkill for the original issue, but I thought the
general concepts might be helpful.

>
>>2) Is the system variable system-wide or only for one session?
>
>Per session.
>
>>3) Is there a better way to accomplish the above?
>
>Yes! You can create a file in a pre-determined drirectory and use that as a
>marker that a process is already running. You can use the socket interface and
>have your application look for other copies of itself... You can use a
>wonderful Java implementation of PIPES that may be able to do what you wish.
See my comments above...

HAGO (Have A Good One)
Tony Koker
Sr. Systems Consultant
Information Services Division
Putnam Investments



RFC822.TXT (1K) Download Attachment