|
|
@Scope, JDK Proxy, and RDSDispatchServlet
Using Spring-flex-1.5.0-CI-433, BlazeDS-4.0.0.1415, FlashBuider4, RDSDispatchServlet in STS, and it is working.
One of my services is session-scoped; and that works ok, too; if declared using:
Code:
public interface MyRpc { ... // various methods @Service(quot;myRpcquot;) @RemotingDestination(channels=quot;my-amfquot;) @Scope(value=quot;sessionquot;, proxyMode = ScopedProxyMode.TARGET_CLASS)// CGLIB Proxy static class Impl implements MyRpc { ... }
However, if declared using:
Code:
public interface MyRpc { ... // various methods @Service(quot;myRpcquot;) @RemotingDestination(channels=quot;my-amfquot;) @Scope(value=quot;sessionquot;, proxyMode = ScopedProxyMode.INTERFACES )// JDK Proxy static class Impl implements MyRpc { ... }
Then the service does not run and does not appear in the FB4 wizard's quot;Import BlazeDS/LCDS Servicequot; listing of services.
The only mention of myRpc in the console log is:
[TomcatAspectJWeavingClassLoader@1667e92a] error aspect 'org..orm.jpa.aspectj.JpaExceptionT ranslatorAspect' woven into 'my.package.MyRpc$Impl' must be defined to the weaver (placed on the aspectpath, or defined in an aop.xml file if using LTW).
But that is there even when it is working (in the first configuration)
MyRpc$Impl implements exactly/only the MyRpc interface.
Is it possible to use JDK proxy in this circumstance?
Also, If I declare the service using:
Code: lt;bean id=quot;myRpcquot; class=quot;my.package.MyRpc$Implquot; scope=quot;sessionquot;gt; lt;flex:remoting-destination channels=quot;my-amfquot;/gt; lt;aop:scoped-proxy proxy-target-class=quot;truequot; /gt; lt;!-- or quot;falsequot; or not mentioned at all--gt; lt;/beangt;(instead of @Service @RemotingDestination) then the FB4 Service Import (through RDSDispatchServlet) fails, with a popup quot;Introspection Errorquot; that says:
Below mentioned Operation/Entity names match with ActionScript keywords.
Please change and try again
Entities: Class
Although in this case, the service *is* running, and works correctly.
[that is: the flex app (and the service wizard 'Test' mode) can use the service, but RDSDispatchServlet fails]
Can anyone see/explain why the XML configures differently than the Annotations?
I'm trying unsuccessfully to put Spring BlazeDs Integration with this RDSDispatchServlet servlet.
I'd like to know if i have to declare both servlets as spring dispatcher servlets
If i only declare the org..flex.core.MessageBrokerFactory Bean
or
flex.rds.server.servlet.FrontEndServlet
some help here!??
The RDS Service is completely separate from your regular application/servlet.
(Although it will share the messageBroker, and try to find your classes.)
In addition to any Spring DispatcherServlet(s), you should have this in your web.xml:Code:
lt;!-- RDS service --gt;
lt;servletgt; lt;servlet-namegt;RDSDispatchServletlt;/servlet-namegt; lt;!-- lt;display-namegt;RDSDispatchServletlt;/display-namegt; --gt; lt;servlet-classgt;flex.rds.server.servlet.FrontEndServletlt;/servlet-classgt; lt;init-paramgt; lt;param-namegt;messageBrokerIdlt;/param-namegt; lt;param-valuegt;_messageBrokerlt;/param-valuegt; lt;/init-paramgt; lt;init-paramgt;
lt;param-namegt;useAppserverSecuritylt;/param-namegt;
lt;param-valuegt;falselt;/param-valuegt; lt;/init-paramgt; lt;load-on-startupgt;10lt;/load-on-startupgt;
lt;/servletgt;
lt;servlet-mapping id=quot;RDS_DISPATCH_MAPPINGquot;gt; lt;servlet-namegt;RDSDispatchServletlt;/servlet-namegt; lt;ucl-patterngt;/CFIDE/main/ide.cfmlt;/ucl-patterngt; lt;/servlet-mappinggt;If u are using a pom.xml to import the libs, how it looks like?
Else, how are u managing your libs?
My doubt is if blazeds libs and spring-flex do not conflict, becouse
flex-messaging-common.jar
flex-messaging-core.jar
flex-messaging-proxy.jar
flex-messaging-remoting.jar
and
blazeds-common-VERSION.jar
blazeds-core-VERSION.jar
blazeds-proxy-VERSION.jar
blazeds-remoting-VERSION.jar
looks the same for me...
Originally Posted by filipemb
My doubt is if blazeds libs and spring-flex do not conflict, becouse
flex-messaging-common.jar
flex-messaging-core.jar
flex-messaging-proxy.jar
flex-messaging-remoting.jar
and
blazeds-common-VERSION.jar
blazeds-core-VERSION.jar
blazeds-proxy-VERSION.jar
blazeds-remoting-VERSION.jar
looks the same for me...They are essentially the same, yes, but to use the new features in Flash Builder 4, you need to be using BlazeDS 4, which has not been published (that I am aware of) to a Maven repo yet. So if you're using Maven, you'll need to manually install the BlazeDS 4 libraries into your Maven repo, and then add exclusions to the spring-flex dependency so that the 3.x versions don't get pulled down. |
|