For fun, change the argument name to "beanFactory". Also, what does your
init method look like?

On 8/23/07, Jason Fill <[EMAIL PROTECTED]> wrote:
>
> I have been having the same issue.  Below is the code that I have setup
> and also I have autowiring turned on.  I have looked in the
> DefaultXmlBeanFactory and everything I have setup looks like it *should*
> function correctly.  It looks like it should add the factory by default in
> the constructBean() method around line 549.
>
> The service is simply called efsService.cfc and the bean def for it is:
>
>  <bean id="efsService" class="sys.efs.Service" singleton="true" />
>
>
> Then in the cfc I have added these 2 methods:
>
>  <cffunction name="getBeanFactory" returntype="any" access="public"
> hint="Gets the main factory object, this will help when creating objects in
> this service that are not singletons.">
>
>    <cfreturn Variables.Factory />
>
> </cffunction>
>
>  <cffunction name="setBeanFactory" returntype="void" access="public"
> hint="Sets the main factory object so the methods can be used in this
> service.">
>
>    <cfargument name="factory" type="coldspring.beans.BeanFactory"
> required="true" hint="The main service factory">
>
>    <cfset Variables.Factory = ARGUMENTS.Factory/>
> </cffunction>
>
> Anyone have any ideas?
>
> On 8/22/07, Brian Kotek < [EMAIL PROTECTED]> wrote:
> >
> > I'm pretty sure autowiring has to be on, that is what instructs
> > ColdSpring to look up setters that match your beans.
> >
> > On 8/22/07, Derek P. < [EMAIL PROTECTED]> wrote:
> > >
> > > Hey All,
> > > I am trying to make one of my services BeanFactoryAware, and I cannot
> > > seem to get it to work properly...not sure whats happening..
> > >
> > > I have the bean defined in my coldspring.xml (autowiring is NOT turned
> > > on),
> > >
> > > the bean has the following method:
> > >
> > > <cffunction name="setBeanFactory" access="public"  returntype= "void"
> > > output= "false">
> > >
> > > <cfargument  name="factory" type=" coldspring.beans.BeanFactory" />
> > >   <cfset variables.beanFactory = arguments.factory />
> > > </cffunction>
> > >
> > >
> > >  everything loads fine, but when I inspect variables.beanFactory,
> > > there is nothing in it!
> > >
> > > If it matters, i am using Model Glue 2 and coldspring...not sure what
> > > else to do here.
> > >
> > > Thanks for the help!
> > >
> > >  Derek P.
> > > [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> >
>

Reply via email to