Here is the final installment of my code.
-----myGlobals.cfm----
<!-- Not sure if I should be locking this. But I think in MX you don't need
to.--> <cfif NOT StructKeyExists(application,"appInitialized")>
<cfset application.appInitialized = 0>
</cfif>
--- circuit.xml.cfm (in the controller folder)----
<!-- before I define all my fuseactions, here's where I instantiate the
components only once. Thereafter in my fuseactions I can <invoke> any of
these components, as long as I reference them as "application.componentName"
in the object parameter".
<prefuseaction>
<if condition="application.appInitialized EQ 0">
<true>
<instantiate
object="application.statesManager"
class="States"
arguments="request.DSN1"/>
<instantiate object="application.dmsManager"
class="Customers"
arguments="request.DSN2"/>
<instantiate object="application.vinManager"
class="VIN"
arguments="request.DSN4"/>
<instantiate
object="application.dealerManager"
class="Dealer"
arguments="request.DSN1"/>
<instantiate
object="application.ratingsManager"
class="Rating"
arguments="request.DSN1"/>
<instantiate
object="application.policyManager"
class="Policy"
arguments="request.bcc,request.DocsFolderGA,request.GAReportingFile,request.
GAIDCard,request.GAEvidenceOfIns,request.GASorryFile"/>
<instantiate
object="application.policyNumberManager"
class="PolicyNumber"
arguments="request.DSN1"/>
<set name="application.appInitialized"
value="1"/>
</true>
</if>
</prefuseaction>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Protect Your PC from viruses, hackers, spam and more. Buy PC-cillin with Easy
Installation & Support
http://www.houseoffusion.com/banners/view.cfm?bannerid=61
Message: http://www.houseoffusion.com/lists.cfm/link=i:12:6703
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/12
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:12
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.12
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54