I'm using Model-Glue 1.1 with a service layer, so in my controller I'm
loading the service layer:
<!--- Controller Constructor --->
<cffunction name="Init" access="Public" returntype="any" output="false"
hint="I build a UserController">
<cfargument name="ModelGlue" required="true" type="ModelGlue.ModelGlue" />
<cfargument name="InstanceName" required="true" type="string" />
<cfset super.Init(arguments.ModelGlue) />
<cfset variables.AppConfig = getModelGlue().getConfigBean("appConfig.xml",
true) />
<cfset variables.UserService = CreateObject("Component",
"DareDev.model.user.UserService").init(variables.AppConfig) />
<cfreturn this />
</cffunction>
And in UserService.cfc my constructor looks like this:
<cffunction name="Init" access="Public" returntype="any" output="false"
hint="I build a UserService">
<cfargument name="AppConfig" required="true" type="any" />
<cfset variables.AppConfig = arguments.AppConfig />
<cfset variables.Reactor = CreateObject("Component",
"reactor.reactorFactory").init(variables.AppConfig.getReactorConfigFile())
/>
<cfset variables.UserGateway = Reactor.createGateway("User") />
<cfreturn this />
</cffunction>
All of my calls to reactor go through the service layer. I understand from
this that both Reactor and UserService will be in the application scope, as
that's where the controller will be. I realize that that may be what's
causing the problem, but I'm not sure how to refresh everything. I've tried
using init=true to refresh Model-Glue, but it doesn't seem to refresh some
of my reactor objects (like dictionary definitions).
I realize while writing this that this may actually be more of a Model-Glue
question than a reactor question, so I apologize for that.
Anyway, after that long-winded explanation, does anyone have any suggestions
about how to force changes to a dictionary xml file to be recognized?
Thanks,
Bob
P.S. reinit=true does not seem to do anything.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Qasim Rasheed
Sent: March 7, 2007 8:58 PM
To: [email protected]
Subject: Re: [Reactor for CF] How to "refresh" Reactor
If you have set the mode as development, reactor should be creating a new
intance on each request. I am guessing it tied to how you are instantiating
your reactor factory in Application scope. Can you provide further
information?
Thanks
Qasim
On 3/7/07, Aaron Roberson <[EMAIL PROTECTED]> wrote:
Pass the following query string to any url in your application:
reinit=true (i.e. http://mydomain.com/?reinit=true)
I believe that should work, I hope I'm not just assuming Reactor uses
this same convention if indeed it really does not...
HTH,
Aaron
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
--
Qasim Rasheed
Certified Advance ColdFusion MX Developer
(IM qasimrasheed AT yahoo, msn or GTalk)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --