My opinion (and you'll probably hear opinions to the contrary as well)
is that you use CS for your singletons, not for specific instances of
beans as you're describing here.

On Nov 3, 2007 12:01 AM, Mike Kear <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> I'm grabbing onto Coldspring as a terrific way to keep all my components
> wired together and never have to care about instantiating cfcs again.
> Once I have ColdSpring instantiating a cfc correctly, I never have to worry
> about that again – just call it up and there it is – ready to use, complete
> with configuration and all.
>
>
>
> Brilliant!    I thought using a CFCFactory was the bees knees,  now I can
> see this goes even further again.
>
>
>
> Now I'm coming up against another issue I'm not sure how to do.   As part of
> the audit trail on changes in the database, I always record the time a
> record was updated, and the userID of the person doing the updating.
>
>
>
> BEFORE COLDSPRING:
>
>
>
> Pass in the user's  Session.UserBean  (created into the session scope when
> he logs in)  to the DAO when it's instantiated,  and then create a
> variables.userid in the Init() method of the DAO.  This variables.userid is
> used in all the methods of the cfc to record who did any changes to the
> database.
>
>
>
> WITH COLDSPRING:
>
>
>
> How?      How do I pass in this current user's session.userbean to the DAO
> as an argument?
>
> I'm assuming I add the userbean to the coldspring.xml as another
> <constructor-arg …  but how do I make sure that coldspring injects this
> current user's session.userbean?
>
>
>
>
>
> Here's the coldspring.xml relating to this DAO currently:
>
>
>
> <bean id="MerchMajorCategoryDAO"
> class="admin.cfcs.Merchandise.MerchMajorCategoryDAO">
>
>             <constructor-arg name="argsConfiguration"><ref
> bean="ConfigurationBean" /></constructor-arg>
>
> </bean>
>
>
>
>
>
> Cheers
>
> Mike Kear
>
> Windsor, NSW, Australia
>
> 0422 985 585
>
> Adobe Certified Advanced ColdFusion Developer
>
> AFP Webworks Pty Ltd
>
> http://afpwebworks.com
>
> Full Scale ColdFusion hosting from A$15/month
>
>
>
>
>



-- 
Matt Woodward
[EMAIL PROTECTED]
http://www.mattwoodward.com

Reply via email to