2 Replies Latest reply on Oct 19, 2006 11:51 AM by ch333

    Committing the both Entity and Jdbc changes to the database

    markon2

      Hello all
      I use the jboss4.0.3SP1 and EJB3 RC5 version.
      For persistence to Oracle 9i database we use both Entity(EJB3)
      and jdbc connection(update database via direct sql queries)
      (The DataSource for jdbc direct connection we get via Context jndi lookup)

      In our BMT EJB3 Local Session Bean we use UserTransaction to
      commit/rollback transaction.
      But for some reason when we make UserTransaction.commit() method, only
      the changes made via EJB 3 entities are committed to the database and
      changes made via jdbc connection are not committed. They are committed only when
      we use jdbc Connection.commit() method.

      We have another old jboss version 3.2.5 (Ejb 2.1) where we use the both
      entity and jdbc connection with UserTransaction for commit and there the
      call to UserTransaction.commit() method commits the both entity and jdbc changes
      to same oracle database.

      Where can we find more information about entity and jdbc transactions usage?
      Can we avoid the call to both UserTransaction.commit() and Connection.commit()
      by using one transaction interface for both Entity and Jdbc connections?

      Thanks
      Mark Nebrat