Integration with LightWire

3 views
Skip to first unread message

Jay Brown / nunatak informatics

unread,
Jan 7, 2010, 9:36:12 AM1/7/10
to reacto...@googlegroups.com
Hello all.

Glad to see that the list is still active, as this is a great tool
that is still relavent and useful. I have been reaping the benefits
of this framework in my latest project and am generally happy with
it's features.

I did run into a snag when I started experimenting with an IoC
(Inversion of Control) framework other than ColdSpring. The ColdBox
framework comes "bundled" with the LightWire IoC. You can use the
same XML configuration file to switch between them. All of the
objects are configured well but Reactor breaks when it is invoked.
Specifically, the 'setBeanFactory' method is hard-coded to expect a
ColdSpring object.

My recommended fix to improve compatibility beyond ColdSpring is to
loosen the type checking for the argument. My code changes, which are
working well for both IoC framewoks, is included below (diff format).
I hope you will consider committing my fix.

Regards,
Jay


Index: reactorFactory.cfc
===================================================================
--- reactorFactory.cfc (revision 465)
+++ reactorFactory.cfc (working copy)
@@ -121,7 +121,7 @@

<!--- BeanFactory --->
<cffunction name="setBeanFactory" access="public" output="false"
returntype="void" hint="I set a BeanFactory (Spring-interfaced IoC
container) to inject into all created objects)." >
- <cfargument name="beanFactory" type="coldspring.beans.beanFactory"
_type="coldspring.beans.beanFactory" required="true" />
+ <cfargument name="beanFactory" type="any"
_type="coldspring.beans.beanFactory" required="true" />
<cfset variables.BeanFactory = arguments.beanFactory />
</cffunction>
<cffunction name="getBeanFactory" access="private" output="false"
returntype="any" _returntype="any">

Peter Bell

unread,
Jan 7, 2010, 10:01:46 AM1/7/10
to reacto...@googlegroups.com

Sounds like a plan to me :-)

Mark?!

> --
> You received this message because you are subscribed to the Google Groups "Reactor" group.
> To post to this group, send email to reacto...@googlegroups.com.
> To unsubscribe from this group, send email to reactor-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/reactor-users?hl=en.
>
>


Mark Drew

unread,
Jan 7, 2010, 10:07:36 AM1/7/10
to reacto...@googlegroups.com
I shall put this in but I need to get this tested using ColdBox and
lightwire, I shall try to do that this w/end and then submit it.

Regards

Mark Drew

Mark Drew
Railo Technologies UK
Professional Open Source
skype: mark_railo
ma...@getrailo.com
+44 7971 85 22 96
www.getrailo.com

Doug Hughes

unread,
Jan 7, 2010, 10:20:08 AM1/7/10
to reacto...@googlegroups.com
My recollection was that (at least in the past) ColdSpring type checked the setBeanFactory argument to make sure it was the correct coldspring object.  Based on recent uses of ColdSpring I'm pretty sure this either never was or is not any longer a requirement for the setBeanFactory to work correctly.  You should be able to simply have the type be "any" on the argument for this to work.

Doug Hughes, President
Alagad Inc.
dhu...@alagad.com
888 Alagad4 (x300)
Direct: 651 Alagad4 (651-252-4234)
Fax: 888-248-7836


Mark Drew
Railo Technologies UK
Professional Open Source
skype: mark_railo
ma...@getrailo.com
+44 7971 85  22 96
www.getrailo.com




Reply all
Reply to author
Forward
0 new messages