• Post Reply Bookmark Topic Watch Topic
  • New Topic

Transaction in EJB in Weblogic 6.1  RSS feed

 
Bijoy Majumdar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI...
I have created a EJB which is bean persistant. I have a DB class whish is a utility class creating connections and making db execute calls. The calls is such that the moment a the function is called I get the connection from the pool ..then run the query ..then close the connection in the finally block..
But as i know an EJB provides transaction..but for example when in ejbCreate i make calls to db class to execute 2 different queries... if the second query fails ..it does not rollback the first one executed.
Does this happen beocs i close the connection everytime i finish querying the database??
Remmeber i have configured transaction attribute as Requires and container managed transaction.
but if so.... if i have a requirement like calling 2 Entity beans from a session bean block(having transaction) then how is transactions maintained across the session bean function.
please reply..
/Bijoy
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tell me whether you are using Datasource for getting JDBC connection?
[ September 17, 2003: Message edited by: Pradeep Bhat ]
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Make sure you are using a TxDatasource.
2. I am moving this thread to the BEA/WebLogic Forum...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!