tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arion Yu <ario...@stt.com.hk>
Subject Re: Unique identifier for a server process.
Date Tue, 18 Jul 2000 02:06:53 GMT
Hi!

I have an idea but don't know if it works.

for each VM,
while (true) {
try {
create a ServerSocket listening on a particular port;
log the current time (the identifier for the VM);
close the socket;
break;
}
catch (some exception) {
// try again after some time
}
}

Arion

Matthew Dornquast wrote:

> Java question: How do I get a globally unique Identifier for an
> instance of a VM without relying on an external configuration?  Is
> there any way to do this without using JNI? IP Address is a good
> start, as generally it's unique. (Yes, I know non-routable disqualify,
> but the scope is LAN related)  The challenge is what happens when two
> or more copies of a server are running on the same box. This relates
> to something I'm doing with sessions for Tomcat. Any help/suggestions
> appreciated. -Matthew

--
[This email and any files transmitted with it are confidential and may
contain information that is legally privileged. They are intended solely
for the addressee(s). Access to this email by anyone else is
unauthorized. If you are not the intended recipient, please delete it
and notify the sender by email immediately; you should not copy or use
it for any purpose, nor disclose its contents to any other person. Thank
you.]


Mime
View raw message