Jon Stevens wrote:
> > I primarily needed it for generating server-wide unique names for temporary
> > files -
> 
> <http://www.working-dogs.com/turbine/cvsweb/index.cgi/turbine/src/java/org/a
> pache/turbine/util/GenerateUniqueId.java?rev=1.1.1.1&content-type=text/x-cvs
> web-markup>
> 
> Feel free to improve it. :-)

Thanks, Turbine has so much usefull code that somtimes it's even hard to find
it :) But after looking at it i think it doesn't address my problem. It generates
pretty pseudo random indetifiers, but they are unique within single zone/context
(a copy of static class members exists in each JVM sandbox). When there are
more Turbnie instances running in the same Tomcat (JServ) these indetifiers
may clash. This isn't any better than using Random to generate 'unique' identifiers.
My code deals with the situation - you have a prefix that is different for each
instance of Turbine in the world (with 1 - 2^-128 probability). This is better
than using random, beacause on a single server, the names would always clash (if
two urls have the same MD5 - which is extermaly unlikely) or never clash.

> > Uh, we already have an LDAP service, TurbineNamingService. I don't know what
> 
> duh. i'm an idiot.

See? We have too much great code :)

> 
> > RENAMING SERVICES
> > I proposed to drop 'Turbine' prefix on service names (requires changing
> 
> +1

Pepople will complain :) But isn't doing the right thing more important?

Rafal


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to