Any aversion to using an auto-increment integer field (if one exists,
that is)? I basically use this as a transaction ID in one of my apps.
Fawzi Amadu wrote:
I am building a electronic advertisement site and I need to generate
transaction IDs.
Since the page will hopefully be a high
getTickcount() or createUuid()
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
I've been using createuuid() for a little while now and I haven't
encountered any issues. I like it because you don't have as many smart
asses trying to go in and change the id in the querystring. :)
--
Ryan
On Thu, Jun 4, 2009 at 6:28 AM, Peter Boughton bought...@gmail.com wrote:
getTickcount() or createUuid()
You'll run into dupes pretty quickly by using getTickCount() since it resets
back to 1 every time the server restarts. Not recommended. CreateUUID()
would work much better if you don't want integer only IDs.
-Justin
.
From: Justin Scott jscott-li...@gravityfree.com
Sent: Thursday, June 04, 2009 12:42 PM
To: cf-talk cf-talk@houseoffusion.com
Subject: RE: Generating appopriate transaction IDs
getTickcount() or createUuid()
You'll run into dupes pretty quickly by using getTickCount
Just as a note, CreateUUID does have a downside
http://kb2.adobe.com/cps/190/tn_19007.html
http://kb2.adobe.com/cps/190/tn_19007.htmlEspecially if it's on a very
high volume site. Not sure if this has been addressed in later versions of
CF.
=]
--
Alan Rother
Adobe Certified Advanced
Looks like that was fixed in JVM 1.3.1_04 ... and CF 8 is shipped with 1.6.0_4,
with the recommendation to upgrade to 1.6.0_11 or higher, so I think we're OK
on the server clock issue
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4500388). Fascinating,
though.
it resets back to 1 every time the server restarts.
Huh?
I was under the impression it was number of milliseconds since the unix epoch
(1-Jan-1970).
Certainly that's what Railo is returning, and no resetting after restart there.
I'm 99% certain that CF7 acts in the same way.
The CF docs are
the epoch. This may not have
always been the case, hence the fuzzy documentation.
-Ryan
From: Peter Boughton bought...@gmail.com
Sent: Thursday, June 04, 2009 4:43 PM
To: cf-talk cf-talk@houseoffusion.com
Subject: Re: Generating appopriate transaction IDs
Sent: Thursday, June 04, 2009 4:43 PM
To: cf-talk
Subject: Re: Generating appopriate transaction IDs
it resets back to 1 every time the server restarts.
Huh?
I was under the impression it was number of milliseconds since the unix epoch
(1-Jan-1970).
Certainly that's what Railo is returning
Railo: 1244157288529
cfusion: 1244157287685
I was remembering back in the CF4/5 days where it returned the ms count
since the application server was started. Or maybe my memory is starting to
go (ack!). Good to know for the future.
-Justin
11 matches
Mail list logo