Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6579227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:52:18+00:00 2026-05-25T15:52:18+00:00

Picture the scene; I have a mobile App that withdraws $20 from a Spring

  • 0

Picture the scene;
I have a mobile App that withdraws $20 from a Spring managed Server and waits for confirmation before marking it complete on the app.

However;

  1. Mobile app sends the withdraw request to the server

  2. Controller receives the request and calls the server tier how service tier takes an un-usually long time to withdraw the money (reason not important ).

  3. Mobile App times out (with a SocketException) and the request is re-queued until it can speak to the application again.

  4. The Server completes the request from 1 but does not know the client has timed out.

We now have the scenario in that the mobile application believes the 20 dollars failed but the server carried out the request.

So the questions;

• Can Spring transactions Rollback when sockets are closed (i.e. when the mobile application times out the request)?

• If not – what is the best approach to achieve the above?

Some info on the server
• Spring 3.1
• Spring based controllers/services/DAO’s.
• Hibernate (JPA)
• MYSQL Data store

Thanks,

Ian.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:52:19+00:00Added an answer on May 25, 2026 at 3:52 pm

    Can Spring transactions Rollback when sockets are closed (i.e. when the mobile application times out the request)?

    At the moment I can’t imagine how that might work …

    If not – what is the best approach to achieve the above?

    I would deal with the problem like this:

    • the mobile app sends some kind of token / uuid that identifies the withdrawal
    • if the request times out, the mobile app marks the withdrawal internally as some kind of “unknown outcome” state and instead of rescheduling, the mobile app can ask the server about the state using the token
    • the “unknown outcome” should only be valid for some time (e.g. 5 minutes) otherwise assume the withdrawal didn’t work and reschedule
    • the transaction on the server should have a timeout too (and meet the time of the “unknown outcome”)

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a picture that I need to resize to a specific dimension and
Here's the big picture. We're running a server in IIS 6 that hosts several
I want to create an iPhone app that uses a navigation scene similar to
Picture the following situation. I have an XML document as follows, <Form> <Control Type=Text
A cancer CT picture is stored inside a unsigned short array (1-dimensional). I have
I have a picture box on my form, which I add a picture to.
I have the picture box in which the image may be zoomed with different
Let's picture a django powered service that bills its customers monthly. The owner doesn't
I have used QGraphicsView , QGraphicsScene classes in order to show a picture in
Picture a listbox in Silverlight that is similar to the feed on facebook. Each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.