Does WireBox AOP work with the ColdFusion 8 ?

I've tried to use WireBox AOP in my application, but I faced out with
the following exception: Unable to invoke CFC - Cannot invoke method
udfPointer on an object of type coldfusion.runtime.Struct with named
arguments. Use ordered arguments instead.

I've used the following components and setting:
In the WireBox.cfc
map('MyService')
.to('model.MyService')
.asSingleton().noAutowire();

mapAspect("MyAspect")
.to("model.aspects.MyAspect");

bindAspect(classes=match().mappings('MyService')
,methods=match().any(),aspects="MyAspect");

My aspect implementation is pretty simple:
<cfcomponent output="false"
implements="coldbox.system.aop.MethodInterceptor">

   <cffunction name="init" access="public" output="false" >
      <cfreturn this >
   </cffunction>

   <cffunction name="invokeMethod" access="public" output="false"
returntype="Any" >
    <cfargument name="invocation" type="any">
      <cfscript>
          var refLocal = {};
          refLocal.results = arguments.invocation.proceed();
          if( structKeyExists(refLocal,"results") ){
            return refLocal.results;
          }
      </cfscript>
   </cffunction>

My service component is :
<cfcomponent output="false">
    <cffunction name="myMethod" access="public" returntype="Any" >
        <cfargument name="arg1" type="string" />
  <cfargument name="arg2" type="any" />
  <cfscript>
          return "result";
        </cfscript>
    </cffunction>
</cfcomponent>

In handler I have the following lines:
<cfcomponent name="MyHandler"
        extends="coldbox.system.EventHandler"
        output="false">
        <cffunction name="myRemoteMethod"
            access="remote" returntype="string"
            output="false">
        <cfargument name="argument1" type="string" required="true">
        <cfargument name="argument2" type="string" required="true">
        <cfscript>
            var service = getPlugin("ioc").getBean("MyService");
      return service.myMethod(argument1, argument2);
        </cfscript>
    </cffunction>
</cfcomponent>

IOC plugin is configured in the following way:
    ioc = {
        framework = "wirebox",
        definitionFile = "#appMapwithDots#config.WireBox"
    };

In general I've tried to follow all suggestions from
http://wiki.coldbox.org/wiki/WireBox-AOP.cfm.
Any ideas?

Thanks,
Slava.

Will look into this

Luis Majano
President
Ortus Solutions, Corp
Toll free phone/fax: 1-888-557-8057
Mobile: 909-248-3408

www.coldbox.org

First of all, how come your handler has arg1 and arg2 as method arguments? How are you calling this handler? If you call the handler yourself, then none of the coldbox lifecycles kick in, so I am perplexed at how you are calling it.

I replicated the entire procedure, and it works for me. So it might be the way you are calling your handler.

Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com

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

Social: twitter.com/lmajano facebook.com/lmajano

I've used a flex client which connects to the CF8 app server through
coldboxproxy.

I had the same problem with CF8 (updated to Hotfix 4), and resolved it
by changing the following code under MixerUtil.cfc, in the method
$wbAOPInvokeProxy:

Changed:
<cfreturn this.
$wbAOPTargets[arguments.method].udfPointer(argumentCollection =
arguments.args)>

To:
<cfset var fPointer = this.$wbAOPTargets[arguments.method].udfPointer>
<cfreturn fPointer(argumentCollection = arguments.args)>