Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

J2EE ACID Transaction Sample

Posted on 2014-03-10
1
Medium Priority
?
423 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

618 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