logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Endre Stølsvik <En...@Stolsvik.com>
Subject RE: PreparedStatementAppender vs. JDBCAppenderPlus
Date Wed, 28 Apr 2004 10:12:48 GMT
On Wed, 28 Apr 2004, Ceki Gülcü wrote:

| One way to achieve uniqueness across JVM instances is by marking each event
| by a combination of 1) an auto incrementing id, 2) ip address of the host
| 3) start time of the JVM. This combination would guarantee uniqueness with
| high degree of security across JVMs.

What if two JVMs are running on the same machine?

(Just pointing it out..! ;)

It could be done, maybe more easily, by using some system property (e.g.
jvm.unique.number), and then starting each JVM with -Djvm.unique.number=x,
where x was either some specific number, or increased atomically (across
the cluster of machines running JVMs) each time the script was started -
or something in that direction. You could drop both the host-ip and
timestamp then.
  Or, you could use a 512 bit long random number, maybe uuencoded (or
whatever), and that would be -almost- guaranteed to be unique (that is, an
-extreme- unlikelyness that two jvms would hit the same number). Drop the
host-ip and timestamp here too.


-- 
Mvh,
Endre Stølsvik               M[+47 93054050] F[+47 51625182]
Developer @ CoreTrek AS         -  http://www.coretrek.com/
CoreTrek corporate portal / EIP -  http://www.corelets.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message