Scene image; I have a mobile application that takes $ 20 off a managed Spring server and waits for confirmation before marking it in the application.
Nonetheless;
The mobile application sends a request for output to the server
The controller receives the request and calls the server level, as the service level usually does not take long to withdraw money (the reason is not important).
The runtime of the mobile application (with SocketException), and the request is reordered until it can access the application again.
The server ends the request with 1, but does not know what the client is waiting for.
Now we have a scenario according to which the mobile application believes that $ 20 failed, but the server fulfilled the request.
So the questions are:
• Can a Spring transaction be canceled when the sockets are closed (that is, when the mobile application does not fulfill the request)?
• If not, what is the best approach to achieve the above?
Server Information • Spring 3.1 • Spring Controllers / Services / DAO. • Sleep Mode (JPA) • MYSQL Data Warehouse
Thanks,
Yang.
source share