Spring-Flex会话范围服务

时间:2011-10-27 09:20:49

标签: flex spring blazeds

我正在使用Spring Flex project 1.5。我希望创建一个具有会话范围的服务。

@Service("storeService")
@Scope(value = "session", proxyMode = ScopedProxyMode.INTERFACES)
@RemotingDestination(channels = { "my-amf" })
public class StoreService implements IStoreService {

当我访问该服务时,出现No destination错误。

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注释,我没有问题,但它是单例范围而不是会话范围。我错过了什么吗?

1 个答案:

答案 0 :(得分:0)

将proxyMode更改为ScopedProxyMode.TARGET_CLASS后,问题解决了。