Andre,

Yeah, looks like singleton, but you'd have to find where the service is
instantiated to be sure.  Throw it back to the guys who wrote the code
anyway!  They should be var scoping always.

Don't know about the classid.  You can of course get the hashcode - see
http://www.compoundtheory.com/?action=displayPost&ID=42.   Failing that, a
common but invasive way to establish CFC instance identity is to set a
variable:

<cfset transDAO.__variable_name_unlikely_to_be_already_used = "I'm back!!!">

and then next time around check IsDefined(transDAO,
"__variable_name_unlikely_to_be_already_used ").

Jaime

On Wed, Dec 9, 2009 at 1:50 PM, Andre Kapp <kap...@gmail.com> wrote:

>
> > >Andre,
> > >
> > >Is this DAO a singleton?  I notice the queries aren't var scoped.  If
> > this
> > >is a singleton under load another thread could easily overwrite your
> > >trans_insert variable in between issuing the query and logging the
> > generated
> > >key.
> > >
> > >Jaime
> > >
> > >
> > >
> > >>
> > Tks Jaime.
> > I have traced the code back to where this object is instantiated. It
> > pretty much looks like a singleton design!
> >
> > This is the code just above this transdao.cfc
> >
>
> Just a quick question.
>
> I'm much more familiar with the Java environment, so still learning the CF
> way.
>
> Is there a way to get the classid value of the Java object that gets
> created by coldfusion? This will help me to dump the TransDAO classid when
> displaying the transid value. If the classid is the same, then it will prove
> the singleton implementation.
>
> Tks
> Andre
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328996
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to