Hi!
 
I have an orion-specific question about DataSources and transactions.
I have a session bean in which I start a UserTransaction:
 
ut = context.getUserTransaction();
ut.begin();
 
<.. stuff ..>
 
ut.commit();
 
In the "sutff" section above I create different entity-beans like user.create(userDetails) and
updates different data in others and then I use a method to insert some data into a
table that's not an entity-bean like this:
 
EntityBean.insertLine(lineData)
 
and the insertLine method uses JNDI to obtain a DataSource like "jdbc/PooledDataSource and from that DataSource I call getConnection to get a java.sql.Connection object.
 
What should I do to make sure that the DataSource I get from the JNDI lookup is in the same transactional-scope as my transaction from the session-bean, so that if the UserTransaction does a rollback, my inserts will be rolledback aswell????
Is there a special DataSource for this purpose?
 
 
Lars Borup Jensen
Software Developer
 
CONSCIUS
B�dehavnsvej 15
DK-9000  Aalborg
Phone: (+45) 98 164 663
Mobil: (+45) 28 594 103
Email: [EMAIL PROTECTED]
Home: http://www.conscius.com

Reply via email to