File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes ejb's interacting with two beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejb Watch "ejb New topic
Author

ejb's interacting with two beans

sitaram irrinki
Ranch Hand

Joined: Feb 16, 2005
Posts: 158
using ejb's when we performing the operations using banking like transactions. when dealing with two accounts , changing from one account to another. how will we do using ejb's technology.
Damanjit Kaur
Ranch Hand

Joined: Oct 18, 2004
Posts: 346
using ejb's when we performing the operations using banking like transactions. when dealing with two accounts , changing from one account to another. how will we do using ejb's technology.


Do you mean to ask- How to use EJBs to do banking transactions, e.g. a simple transaction of withdrawing cash which will mean showing credit in one account and its corresponding debit in another account, so in database it may require updation in two or possible more tables.

- This can be done using bmp or cmp beans for inserting/updating data in database. To do validations before insertion/updation of data, you can use a session bean first, which on validation being successful will call bmps or cmps to make final updation in database.

The Transaction can be spanned thru all ejbs starting from first client call to session bean and then the following bmps or cmps that take part in above transaction, so that on anyone ejbs failure, the whole transaction is rolled back.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ejb's interacting with two beans