Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Transactions issue  RSS feed

g Ven
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having an issue with EJB transactions (regradless of BMT or CMT).
If i have a say a bean which has the following methods

interface_meth1() - (method in remore interface) - Transaction attribute is 'Not Supports'.
get db connection (say conn) from connection pool //step 1
Call interface_meth2(conn) //step 2 (passing the db connection is step 1
(Please note that i do a local look up of the same bean for invoking interface_meth2)

interface_meth2(Connection conn) - Transaction attribute is Required (methd in local interface)
insert //step 3
update //step 4
insert //step 5

If step 5 throws an exception, i see changes made by step 4 commited in the database. if however i open a db connection within interface_meth2 it works fine. (I am using WL 9.2 and while setting uo the data source has selected 'Enable Two phase commit'). Is this expected behaviour? Can somebody help?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!