[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

J2EE ACID Transaction Sample

Posted on 2014-03-10
1
Medium Priority
?
433 Views
Last Modified: 2014-05-14
Hi,
I had a query "How J2EE manage transaction?" same as RDBMS ACID (Atomicity, Consistency, Isolation, Durability) engine.

Someone replied on how J2ee transactions are managed to make sure they are successful or failed by giving following example.

Example :
Money taken out of account A (Debit) and added to account B (credit). This process should either complete else fail.

Solution is implemented in 2 stages-
      1. Record move money going out from account of A
      2. Record money moving into account of B
      3. When transaction is complete , both accounts (A,B) are  notified that operation is   complete.
      4. If any issues observed both accounts are rolled back

Is this right and can someone share a J2EE code samples to integrate it for my app?

Thanks
0
Comment
Question by:crazywolf2010
1 Comment
 
LVL 21

Accepted Solution

by:
Amitkumar P earned 2000 total points
ID: 40057497
Dont know about your application for that you are looking a sample code. But you can refer http://www.java-tips.org/java-ee-tips/enterprise-java-beans/introduction-to-the-java-transactio.html and understand the J2EE transaction API.

Once you understand the J2EE TXN api and how to use it, you will be able to write a code for your application. Its not too difficult.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month19 days, 15 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question