Hi,
I'm looking into using Wirebox to replace the AOP proxy feature of
ColdSpring. I can't find anything in the docs about it so I'm not sure
if this is possible. Essentially I want to be able to get an instance
of an object, but Wirebox returns a proxy for the requested object
which can listen and intercept method calls.
ColdSping AOP page: http://www.coldspringframework.org/coldspring/examples/quickstart/index.cfm?page=aop
Here's an example of what I hoping I can do;
I have a service which returns an good old ColdFusion query, but when
it's called as a webservice, then I want the proxy to detect that the
call is a remote call and transforms the query into JSON.
I know I can do this in a handler or using the ColdBox proxy, but it
would be cool if I could apply this across all services without
touching the code in the services at all.
Thanks,
- John
John,
So your component already has the functions exposed as remote right?
How will you know if it is called remotely? I don’t think cf gives you a method to tell if the method call is from another cfc or from a webservice.
Or are you taking about creating remote proxies?
Luis F. Majano
President
Ortus Solutions, Corp
ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com
Sorry Luis, bad example in my part.
I’m trying to do something along the lines of the following in WireBox (this app doesn’t use ColdBox):
http://www.coldspringframework.org/coldspring/examples/quickstart/index.cfm?page=aop
Any pointers you can give will be great.
Thanks, and great work on Wirebox!
– sent by a little green robot
John,
At this point our full AOP implementation is not complete. It is scheduled for next wirebox version. However, you can get creative and be able to accomplish what you like by extending wirebox via its events. You can create your own listner/interceptor that listens after object creation and then manipulate the methods you like with your own.
Luis F. Majano
President
Ortus Solutions, Corp
ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com