Hi, I'm trying to use the mina statemachine in a client and I'm having trouble changing states programatically. After my client connects to a server there is an initial message exchange, and then my state machine goes into a ready state. Now if my client wants to send a "request detailed info" message to the server, I would like to put the state machine into "waitingForDetails" state, so that my statemachine/iohandler will be prepared to process the messages sent back.
I tried to use the StateControl.breakAndGotoNext(), but this doesn't work because the entity in the client that is initiating the send is not on the statemachine thread. I tried keying off the sent message in the statemachine using @IoHandlerTransition(on = MESSAGE_SENT,...l) to put it into the correct state but this doesn't work all the time. What I was seeing, is that sometimes my statemachine/iohandler was getting (reading) and processing a response to my request before my statemachine would process the @IoHandlerTransition(on = MESSAGE_SENT,...l), so I would be in the wrong state. Is this a bug? Is there another way to do this? Thanks, Rick