Here's the situation I'm trying to resolve:
Code: Select all
public class Handler1 extends BaseClientRequestHandler {
@Override
public void handleClientRequest(User user, ISFSObject params) {
synchronized (user) {
user.setProperty("Handler1Called", true);
}
}
}
public class Handler2 extends BaseClientRequestHandler {
@Override
public void handleClientRequest(User user, ISFSObject params) {
synchronized (user) {
if(user.getProperty("Handler1Called") != null) {
// do stuff
}
}
}
}
Currently the options I can come up with to resolve this are:
- Reduce my extension thread pool size to 1
- Create a response callback for Handler1 and have the client wait on a round trip before sending Handler2
What I'd like to see is an option to have all requests from the same user routed to the same thread queue (could remove the sync blocks as well) or some other method to ensures the handlers are called in the same order the commands are received.
Thanks