using JDBC

Discussions

EJB programming & troubleshooting: using JDBC

  1. using JDBC (2 messages)

    What is the difference between using:
    weblogic.jdbc.pool.Driver
    and
    weblogic.jdbc.jts.Driver

    Threaded Messages (2)

  2. using JDBC[ Go to top ]

    Read this:

    http://www.weblogic.com/docs51/classdocs/jts_driver.html

    m.
  3. using JDBC[ Go to top ]

    The pool driver is not transaction aware so once you let go of the connection, you better have finished the transaction. The JTS driver knows about JTA transactions so if you are accessing multiple EJBs (that each access the database) as part of a transaction, you don't have to worry about passing the same database connection around to get the transactional semantics. The JTS driver simply keeps a hash table that maps JTA transaction ids to the physical database connection. Each time you call getConnection() inside a JTA transaction, the JTS driver makes sure that you get the same physical database connection every time. This is required for database transactions that do not use XA.

    You MUST always use the JTS driver (or preferably, a TxDataSource) when using J2EE components that involve JTA transactions (e.g., EJB, JMS, etc.).

    Hope this helps,
    Robert