Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes EJB and other Java EE Technologies and the fly likes Transactions in EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transactions in EJB" Watch "Transactions in EJB" New topic
Author

Transactions in EJB

Mrutyunjay Hanchinal
Ranch Hand

Joined: Sep 26, 2001
Posts: 50
Hi all
I am experiencing a problem with handling transactions in EJB
My application has the following
1. A servlet invokes a business method in stateful session bean "SFBean"
2. "SFBean" uses a helper class "Helper" to process some business logic.
3. In "Helper" I make use of two entity beans (BMP)
Here my problem is that I want the use of two entity beans as a single transaction.
If I start a UserTransaction in "Helper" I am getting not supported Exception as nested transactions are not allowed
Can any body suggest me How Do I go abt solving this
Thanks in anticipation
Mrutyunjay
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Build a stateless session bean and call your BMP's from within that.
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transactions in EJB
 
Similar Threads
Why EJB ?
Component Diagram Question
BMT with Entity beans
POJOs vs. Entity EJBs
EJB Transaction Rollback with JBDC