Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Txn problem !  RSS feed

 
Shivaji Bhosale
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi group,
We have code which is having UserTransaction. It does transaction management on behalf of Txns will take place from that class.
But just recently, Design is changed, & Before my user transaction starts, there is a Stateful Session bean. It has Transaction attribute as Txn_Supports.
Then, in the flow, my class is getting called, where I am having
UserTransaction userTrans = lookup("jta/usertransaction");
After getting UserTransaction object, I have,
userTrans.begin();
At this point, I am getting exception as NotSupportedException.
In this case what shall I do ?
I need to confirm, bcoz I am having Txn started from Stateful Session Bean, & then, again from this plain (Non-Enterprised) class I am starting Txn, is the reason for getting NotSupportedException ?
Please Help ....
 
Siddharth Malani
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like for the bean which is getting called from the transaction class, the transaction property is set to NOTSUPPORTED. Check the dd and change it to REQUIRED. This means your bean will use the transaction that begins with the transaction class.
Hope, it makes sense!
Regards
Sid
 
Shivaji Bhosale
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sid,
Thanx for reply, I made Transaction attribute as,
TX_BEAN_MANAGED.
I am managing Txns from my beean only.
Thanx, I am giving another posting followed by this, hope to see ur reply !
 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Richard Monson - Hafel book (EJB1.1) Page No: 287 says.
Client ---------------------> Session EJB
(Start Tx) (Suspend client Tx and run under its own Tx)
Client ---------------------> Session EJB
(No Tx) (run under its own Tx)

I know you can call container managed tx beans from user managed tx beans,but not sure about vice versa. I will wait for your results.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!