You shouldn't be instantiating the factory yourself. The plugin does this
automatically and makes the bean factory available as a Mach-II property in
addition to creating all of your CFCs and handling the dependency injection
duties (including Controller autowiring). That's the whole point of defining
all the ColdSpring information in the Mach-II config file.
On 8/10/07, Bryan S <[EMAIL PROTECTED]> wrote:
>
> Peter
>
> My goal is to not have to pass the instantiateColdspriing at all and have
> none of this code run. I want Coldspring to handle all of this and have my
> getActiveDirectory method in the service to work. The setActiveDirectory is
> working but for some reason the variable is empty when I call the get.
>
> Bryan
>
> <cffunction name="init" returntype="any" output="false"
> hint="Constructor">
> <cfargument name="instantiateColdspriing" type="boolean"
> required="false" default="false">
>
> <cfif arguments.instantiateColdspriing>
> <cfset variables.instance.BeanFactory =
> createObject("component","coldspring.beans.DefaultXmlBeanFactory").init()
> />
> <cfset
> getBeanFactory().loadBeansFromXmlFile("/actionpacks/security/config/ColdSpring.xml",true)
> />
> <cfset variables.instance.ActiveDirectoryDao =
> getBeanFactory().getBean("ActiveDirectoryDao") />
> <cfset variables.instance.Reactor =
> getBeanFactory().getBean("Reactor") />
> <cfset variables.instance.groupUserGateway =
> getReactor().CreateGateway("GROUP_USER")>
> <cfset variables.instance.groupOwnerGateway =
> getReactor().CreateGateway("GROUP_OWNER")>
> <cfset variables.instance.appRoleGateway =
> getReactor().CreateGateway("APP_ROLE")>
> <cfset variables.instance.appRoleGroupGateway =
> getReactor().CreateGateway("APP_ROLE_GROUP")>
> <cfset variables.instance.appMainGateway =
> getReactor().CreateGateway("APP_MAIN")>
> <cfset variables.instance.groupMainGateway =
> getReactor().CreateGateway("GROUP_MAIN") />
> <cfset variables.instance.pathMainGateway =
> getReactor().CreateGateway("PATH_MAIN") />
> </cfif>
>
> <cfreturn this />
> </cffunction>
>
> On 8/9/07, Peter J. Farrell < [EMAIL PROTECTED]> wrote:
> >
> > Bryan S said the following on 8/9/2007 10:38 AM:
> >
> > I left out the most important part of the error message
> > Element INSTANCE.ACTIVEDIRECTORYDAO is undefined in VARIABLES
> >
> > I posted a message earlier that hasn't posted yet. Can you post the
> > init() method form your securityService...
> >
> > .Peter
> >
>
>