On 9/19/06, Dan Vega <[EMAIL PROTECTED]> wrote:
Doug,
You can set and get each of the config settings. Please refer to the
documentation for more
Odd that this would come up, right when I was about to ask about the
validity of this code:
<cflock scope="Application" timeout="10" type="exclusive">
<cfif NOT StructKeyExists(Application, "Reactor") OR
StructKeyExists(url, "reset")>
<cfset reactorConfig = CreateObject("Component",
"reactor.config.config")/>
<cfscript>
reactorConfig.init("/pathToConfig/Reactor.xml");
//reactorConfig.setProject = "SomeProject";
reactorConfig.setDsn("someDsn");
//reactorConfig.type = "mysql";
//reactorConfig.mapping = "/DataDir/SomeProjectData";
reactorConfig.setMode("production");
// reactorConfig.username = "";
// reactorConfig.password = "";
</cfscript>
<cfset Application.Reactor = CreateObject("Component",
"reactor.reactorFactory").init(reactorConfig) />
</cfif>
</cflock>
I need to set the DSN in the application.cfm, and that works, so if
anyone else is looking for an example or or how to set or setting dsn
programmaticaly or by variable, this might help.
My relationships, and any of the above commented out "reactorConfig"
settings are still stored in the Reactor.xml file.
Like I said, it works, but I didn't see any examples of setting the
dsn programaticaly "out there", so figured I'd post it and whatnot,
verify that I'm doing the right thing.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --