myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject UserTransaction
Date Wed, 12 Jul 2006 12:54:47 GMT

I got into troubles and got some error messages such as:

A system error happened during the operation: The transaction has already
been marked for rollback

I guess I have these problems because I did not really understand correctly
when to use or not these UserTransaction. I need to use them when I want to
read or modifiy my database mySQL? 
If I have a method calling another method which one should use
UserTransaction, both?

UserTransaction tx = null;
	tx = Repository.getUserTransaction(context, true);
	...method() -> using UserTransaction?
catch(Exception e){
	// rollback the transaction
	try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
	logger.error("Exception method " + e.getMessage());

Could someone explain me how that is working exactly?
Thanks in advance

View raw message