I'd pick #4:

4) only do data access within CFCs, and use ColdSpring to wire the DSN
into any beans that need it.

But that's not really an "upgrade" kind of approach, in which case I'd
go with #3, moving as much as possible to application.dsn, and then
trying to start down the path of #4 as much as possible with future
work.

cheers,
barneyb

On 4/21/07, Mike Chabot <[EMAIL PROTECTED]> wrote:
> I am converting Application.cfm to Application.cfc in a CF5 site that
> is now running under CFMX7. The Application.cfm uses request.dsn to
> define the data source. For Application.cfc, I have three choices:
>
> 1. Define request.dsn in OnRequestStart
> 2. Define request.dsn at the top of Application.cfc, outside of any function.
> 3. Convert request.dsn to application.dsn and put the variable in
> OnApplicationStart. Write request.dsn = application.dsn inside of
> OnRequestStart to maintain backwards-compatibility, and phase out the
> use of request.dsn over time.
>
> Which method would you pick? Am I missing an option?
>
> Some of the OnApplicationStart functions make database calls, so
> choice 1 isn't really an option.
>
> Thank you,
> Mike Chabot


-- 
Barney Boisvert
[EMAIL PROTECTED]
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275977
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