At 08:42 14.11.00 , you wrote:
>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?
>
yes, just use the EJBDS. it it transaction-aware and pooled.
HTH
robert
>
>Lars Borup Jensen
>Software Developer
>
>CONSCIUS
>B�dehavnsvej 15
>DK-9000 Aalborg
>Phone: (+45) 98 164 663
>Mobil: (+45) 28 594 103
>Email: <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
>Home: <http://www.conscius.com>http://www.conscius.com
(-) Robert Kr�ger
(-) SIGNAL 7 Gesellschaft f�r Informationstechnologie mbH
(-) Br�der-Knau�-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de