Spring-Flex 会话范围服务
我正在使用 Spring Flex 项目 1.5。我希望创建一个具有会话范围的服务。
@Service("storeService")
@Scope(value = "session", proxyMode = ScopedProxyMode.INTERFACES)
@RemotingDestination(channels = { "my-amf" })
public class StoreService implements IStoreService {
当我访问该服务时,出现无目的地
错误。
org.springframework.flex.core.DefaultExceptionLogger - The following exception occurred during request processing by the BlazeDS MessageBroker and will be serialized back to the client:
flex.messaging.MessageException: No destination with id 'storeService' is registered with any service.
如果我不使用@Scope进行注释,我没有问题,但它是单例范围而不是会话范围。我错过了什么吗?
I am using Spring Flex project 1.5. I wish to create a service with session scope.
@Service("storeService")
@Scope(value = "session", proxyMode = ScopedProxyMode.INTERFACES)
@RemotingDestination(channels = { "my-amf" })
public class StoreService implements IStoreService {
When I access the service, I got No destination
error.
org.springframework.flex.core.DefaultExceptionLogger - The following exception occurred during request processing by the BlazeDS MessageBroker and will be serialized back to the client:
flex.messaging.MessageException: No destination with id 'storeService' is registered with any service.
I have no issue if I do not annotate with @Scope, but it is singleton scope not session scope. Am I missing anything?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将 proxyMode 更改为 ScopedProxyMode.TARGET_CLASS 后问题就解决了。
Problem is solved after I changed proxyMode to
ScopedProxyMode.TARGET_CLASS
.