• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The very existance of Transaction Handling

 
Rohit Ahuja
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well,
I have read a lot about transaction handling when it comes to EJBs.
My Question is , i can write a simple program wherein i set the autocommit feature to false, perform operations on the different tables and finally commit it.
in case of any failure,anyways oracle will deal with the problem.
even as far as concurrency goes,oracle is cpable of dealing with the problem.
So whats so special with EJBs.
 
Irene Loos
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBs are implementation independent and designed to manage distributed business objects in tree-tier architecture.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While Oracle may manage transactional integrity within the context of the DBMS, EJB transactions (and J2EE transactions in general) offer a broader scope in that they can manage items above and beyond the DBMS, such as servers, flat files, and other non-DBMS resources.
 
Rohit Ahuja
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim please be a little more specific.
i aint getting thee.
 
Rohit Ahuja
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim i wud be thankful if u add me in ur friend list on yahoo or msn messenger.
My adds are reebok_78@yahoo.com
and dreamy_piscean@hotmail.com.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I'm not presently set up for IM. However, perhaps I can illustrate.
Let's say you work for a big software house in Chennai. They pay you a fixed rate for every EJB you code (Rs. 5,000,000 per EJB is the going rate, right?). You telecommute from your penthouse suite with the spectacular ocean view and you have automated the process of turning over finished EJBs in a way that ensures you get paid. This is done by sending the EJB as an encrypted file and only sending the key after you have confirmed payment.
Here's the transaction sequence:
1. Start transaction context
2. FTP the EJB to your employer. They employer returns a code that activates transfer of money to your bank account.
3. Contact the Bank of India and provide them with your funds transfer code.
IF the BOI server is down, OR they refuse to honor
the funds transfer, or for some other reason, you don't get confirmation...
THEN rollback the transaction. I.e. erase the encrypted EJB from your employer's server or simply refuest to submit the key.
4. OTHERWISE, send the key that unlocks your EJB
5. END transaction
I know this is a little contrived, but maybe it shows why database transaction manangement isn't always sufficient. After all, I hardly think that the Bank Of India is going to let you directly lock records in their DBMS (besides, they might not have Oracle, they might have DB2!).
 
Rohit Ahuja
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Tim,
I Got it much better this time. But whenever u have an msn or yahoo messenger on u have to add me as a friend.
After all, i like the intelligent species to be on my friend list u see.
Thanx Again.
 
Rohit Ahuja
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the Way, tim,
5 lakhs for an ejb i guess is a bit too much.

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Deepak a:
By the Way, tim,
5 lakhs for an ejb i guess is a bit too much.


Oh surely not. Larry Ellison wouldn't be hiring 2000 programmers in Bangalore just because you work cheap now?
Sorry. The recession is still in full swing over here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic