3 Replies Latest reply on Apr 17, 2002 11:41 AM by manu

    UserTransaction client side

      Hi,

      I've posted a patch proposal few weeks ago concerning a issue on user transaction managed by the client. (I know it is not a good pattern, but we need it). I did not notice any side effect due to this patch, homewer I don't have a accurate idea of the transaction management in JBoss.

      May I ask to one of the senior dev. to review this patch and to check potential side effects ?

      We found out that when using client side UserTransaction, all changes are recorded in the entity beans (CMP) instance, homewer the database content is never synchronized. The server log shows that the SQL commands are send to the DB, but not committed.

      This problem was experienced with JBoss 2.4.4 on a NT box with Oracle 8.1.7 and thin JDBC driver. But I don't think it's a platform/db related issue. It seems that during the invocation of UserTransactionSessionImpl.commit(), the transaction-calling thread relation is not resumed. This prevents any db changes made by a tx listener to be committed in the db when the client invokes the commit method. In fact, the commit is sent on a different connection than the one used by the update!

      If the UserTransactionSessionImpl.commit method resumes this relation, changes are committed in
      the db. This works with the rollback method as well.

      The detail of the path is available on sourceforge, patch #541946.

      TIA for comments.

      Emmanuel