Solved

J2EE ACID Transaction Sample

Posted on 2014-03-10
1
400 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 21

Accepted Solution

by:
Amitkumar Panchal earned 500 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

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

691 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