• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Transaction in EJB in Weblogic 6.1

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tell me whether you are using Datasource for getting JDBC connection?
[ September 17, 2003: Message edited by: Pradeep Bhat ]
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Make sure you are using a TxDatasource.
2. I am moving this thread to the BEA/WebLogic Forum...
 
Bijoy Majumdar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I am using DataSource. but not TxDataSource... as the database i am using is the same. the transaction is not across different databases.
But let me try having TxDataSource..
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic