开发者

Spring/BlazeDS message interceptor use cases

开发者 https://www.devze.com 2023-02-07 02:10 出处:网络
The Spring BlazeDS integration (in our cases 1.0.5M1) allows us to define MessageInterceptor instances and register them in the message broker. My question is simple: does anyone have any idea what th

The Spring BlazeDS integration (in our cases 1.0.5M1) allows us to define MessageInterceptor instances and register them in the message broker. My question is simple: does anyone have any idea what this mechanism should or shouldn't be used for?

From the API documentation I can see that the framework itself uses interceptors 开发者_JS百科for Spring Security integration. We were thinking of using these interceptors as a way of enforcing our own special kind of security (we track our users using our own services in the application context), where a condition is evaluated every time a message is sent across the wire.

We realise we should probably integrate Spring Security at some point to handle these things more formally, but for now the message interceptor seems like a good idea.


I don't know if its "good" use case or not, but in our use case we have a call center where its very important that everyone see the "latest" version of data. There are several hundred people looking at the data, and maybe a dozen or so that can change data. We have it set up so that any data modifications send a message to all the clients, if the client has that data currently then it will be updated, and pop up a dialog if the data on the actual tab the user is looking at has changed, otherwise the data just changes behind the scenes with none the wiser.


Seems that using the interceptors in this way hasn't caused any issues since we implemented this, so I don't think this is going to be an issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消