Are you configuring the plugin to resolve dependencies in your Mach-II
objects?
<parameter name="resolveMachiiDependencies" value="true"/>
(this is fully described in the comments in the plugin).
On 9/4/07, Bryan S <[EMAIL PROTECTED]> wrote:
>
> I'm hoping this is a stupid question. I'm having another problem with the
> plugin. I'm sure it's something I'm doing wrong but I can't figure out what.
>
> I am following the example of machblog. The only difference between my
> code and the machblog code is that in the mach-ii.xml I am having to
> explicitly call the event invoker
> <listener name="SecurityListener" type="
> actionpacks.security.model.SecurityListener">
> <invoker type="MachII.framework.invokers.CFCInvoker_Event " />
>
> </listener>
> where the machblog example just does this
> <listener name="aggregatorListener" type="
> machblog.org.machblog.listeners.AggregatorListener" />
>
> I'm guessing that has something to do with me not using the latest mach-ii
> although I am using 1.1.
>
> My problem is that my SecurityListener does not have access to my
> SecurityService. It is undefined when getSecurityService is called. The
> reason for that is setSecurityService is not being called even though
> SecurityService is defined in my Coldspring.xml. The last time I had this
> problem it was because I was overwriting my variable with a different
> instance of the object but I checked and that isn't the case this time.
>
> I know that my Coldspring.xml is proper because if I do this in the init
> of the SecurityService everything works just fine. I obviously don't want
> this to be my permanent solution because it defeats the purpose of using the
> mach-ii coldspring plugin.
>
> <cffunction name="init" returntype="any" output="false"
> hint="Constructor">
> <cfargument name="appManager" type="MachII.framework.AppManager "
> required="true" />
> <cfargument name="parameters" type="struct" required="false"
> default="#StructNew()#" />
>
> <cfset super.init( arguments.appManager, arguments.parameters )>
> <cfset variables.instance.BeanFactory = createObject("component","
> coldspring.beans.DefaultXmlBeanFactory").init() />
> <cfset
> getBeanFactory().loadBeansFromXmlFile("/actionpacks/security/config/ColdSpring.xml",true)
> />
>
> <cfreturn this />
> </cffunction>
>
> Here is how I have the mach-ii plugin configured. It is the first pluging
> defined.
>
> <plugin name="coldSpringPlugin" type="
> coldspring.machii.ColdspringPlugin">
> <parameters>
> <parameter name="beanFactoryPropertyName"
> value="serviceFactory"/>
> <parameter name="configFilePropertyName"
> value="coldspringConfigFile"/>
> <parameter name="configFilePathIsRelative" value="true"/>
> <parameter name="resolveMachiiDependencies" value="true"/>
> </parameters>
> </plugin>
>
> Any idea what I can check? Am I missing something you need to help me
> figure out the problem?
>
> Bryan
>
>