OK, so I def need more documentation on this one. You do not need to Proxy the RemoteProxy! Just add your interceptorNames attribute, with your security advisor right there in the RemoteFactoryBean, The remote proxies created have all the AOP infrastructure ready to go for you.

Example:

<bean id="remoteEntryService" class="coldspring.aop.framework.RemoteFactoryBean">
<property name="target">
<ref bean="entryService" />
</property>
<property name="serviceName">
<value>EntryService</value>
</property>
<property name="relativePath">
<value>litepost/flex/services</value>
</property>
<property name="interceptorNames">
<list>
<value>loggingAdvisor</value>
<value>securityAdvisor</value>
</list>
</property>
<property name="remoteMethodNames">
<value>get*</value>
</property>
</bean>



Chris




On May 2, 2007, at 3:28 PM, Lee Howard wrote:

I was about to ask this question and figured it out before I sent it, so I thought I would post it anyway just in case anyone else had the same problem. . .

I have created a service object that I want to expose to flex and I have created RemoteFactoryBean to provide the Remote service.  This works great.  Now I would like to add a security advisor to the service object so that it will be called whether or not the service object is called remotely.  So I changed the id of my service object to serviceObjectTarget and created a ProxyFactoryBean with the security advisor interceptor and gave it the original name of my service object.  Now I would expect my Remote Service to call the Proxied service, but instead I get this error: The routine "callMethod" has been declared twice in the same file.  I guess that callMethod is being added by both the ProxyFactoryBean and the RemoteFactoryBean.  Is there any way around this. . . .

Aha answered my own question be for I could post.  If I specify the remoteMethodNames in my RemoteFactoryBean then callMethod won't be created and I get no error.

Lee



Reply via email to