Christopher Bradford said the following on 4/15/2008 5:15 PM:
We are trying to work through an issue with ColdSpring generating duplicate method names on RemoteProxyBeans when the target inherits methods. Is the code in CVS in HEAD/coldspring the latest and greatest (I also see a coldspring-ber module)?

Christopher,

See if this patch fixes the problem for you. Apply on the /aop/framework/RemoteFactoryBean.cfc on rev 1.7. This is the last revision in the CS BER.

.Peter

Patch below dotted line:
---------------------------------------
### Eclipse Workspace Patch 1.0
#P org-coldspring
Index: aop/framework/RemoteFactoryBean.cfc
===================================================================
RCS file: /coldspring/coldspring/aop/framework/RemoteFactoryBean.cfc,v
retrieving revision 1.7
diff -u -r1.7 RemoteFactoryBean.cfc
--- aop/framework/RemoteFactoryBean.cfc    17 Mar 2008 23:53:33 -0000    1.7
+++ aop/framework/RemoteFactoryBean.cfc    15 Apr 2008 23:26:19 -0000
@@ -149,10 +149,12 @@
        <cfset var functionIx = 0 />
        <cfset var functionName = '' />
        <cfset var functionString = '' />
+        <cfset var usedFunctions = StructNew() />
        <cfset var advisorIx = 0 />
        <cfset var advice = 0 />
<cfset var bfUtils = createObject("component","coldspring.beans.util.BeanFactoryUtils").init()/>
        <cfset var bfScope = "application"/>
+ <!--- ok, very first thing, make sure this factory is going to be accessable to the generated proxies --->
        <cfif len(variables.beanFactoryScope)>
            <cfset bfScope = variables.beanFactoryScope/>
@@ -190,7 +192,9 @@
<!--- now we'll loop through the target's methods and write remote methods for any matched ones ---> <cfloop from="1" to="#arraylen(md.functions)#" index="functionIx">
                    <cfset functionName = md.functions[functionIx].name />
-                    <cfif not ListFindNoCase('init', functionName)>
+ <cfif not ListFindNoCase('init', functionName) and not StructKeyExists(usedFunctions, functionName)> + + <cfset usedFunctions[functionName] = "" />
                        <cfif methodPointcutAdvisor.matches(functionName)>
<!--- this type of proxy will be limited to remote methods, so



Reply via email to