0 Replies Latest reply on Oct 8, 2004 12:57 PM by chotasher

    UserTransaction api usage in JBoss, few questions?

    chotasher Newbie

      It would be nice if somebody can address these questions:

      Q1:How to set the TransactionTimeout for the transaction dynamically within the ejb(BMT) context and outside ejb context?

      I have tried to get the UserTransaction using context.lookup and tried setTransactionTimeout(seconds). For some reason, the timeout does not affect the transaction, after the time has elapsed, the transaction is not marked for rollback.

      I thought may be JBoss does not like the setTransactionTimeout on UserTransaction, I tried to use setTransactionTimeout on TransactionManager. But when I try to look for transactionManager by context.lookup("TransactionManager") or context.lookup("java:comp/TransactionManager"), the transaction manager is not found.

      Q2: Is it possible to change the transaction timeout on CMT beans?

      Any ideas/suggestions, on how to code for these?