In order to inject a defined bean into a listener, you can use the "depends"
attribute which you add to the cfcomponent tag of your
listener/plugin/filter.  For instance, if you have a bean FooService defined
in ColdSpring, your <cfcomponent/> tag would look like this:

<cfcomponent output="false" extends="MachII.framework.Listener"
depends="FooService" />

It is automatically injected and then is available using an implicit getter
so that you can get a handle on it with getFooService() inside your
listener.


~Dave Shuck
/**************************************
blog: www.daveshuck.com
tweets: www.twitter.com/dshuck
cf peeps: www.dfwcfug.org
**************************************/


On Wed, Feb 24, 2010 at 9:35 AM, vegiecat <[email protected]> wrote:

> Hi All,
>
> I'm currently in the process of adding ColdSpring to my MachII
> project.  I've successfully tested out just ColdSpring (not within
> MachII) and setup the skeleton with ColdSpring independently.
>
> I'm, however, having difficulty getting the MachII to run with
> ColdSpring in my Project.  Maybe there is some fundamentals that I'm
> missing, I'm trying to setup inject beans into the listeners by
> constructor-arg.  Should I be doing that?  Does injection only work
> with setter in the listeners?
>
> Is there a good tutorial or sample code that I can read up on with
> MachII and Coldspring?  I know there must be some out there, I just
> can't seem to find locate them...
>
> Please help.  Thank you MachII community.
>
> Yours,
>
> Jimmy
>
> --
> You received this message because you are subscribed to Mach-II for CFML
> list.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
> SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/
> Wiki / Documentation / Tickets:
> http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/

-- 
You received this message because you are subscribed to Mach-II for CFML list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/
Wiki / Documentation / Tickets: 
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/

Reply via email to