dir@xxx.dhs.org wrote:
> 2.1.0
>
> What am I doing wrong?
>
> Context ctx = new InitialContext();
>
> UserTransaction tx =
> (UserTransaction)ctx.lookup("java:comp/UserTransaction");
> DataSource ds =
> (DataSource)ctx.lookup("java:comp/env/jdbc/metatv");
>
> Connection conn = null;
> tx.begin();
> try {
> conn = ds.getConnection();
> System.out.println(conn.getAutoCommit()); // prints true ;-(
> } finally {
> try { conn.close(); } catch(Throwable whatever) {}
> }
> tx.rollback();
Is your database defined with DataSource or XADataSource?
DataSource databases are non-transactional.
-- Scott
>
> TIA
>
>
Received on Tue 02 Apr 2002 13:37:39 -0800
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:01 PDT