• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

EJB Transactions issue

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

Thanks
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic