alesj wrote:
icecuber wrote:
@TransactionAttribute(TransactionAttributeType.REQUIRED)
This has nothing to do with isolation level you are writing about / want.
Set isolation on db connection or write your own synch code.
the semantic i'd like to achieve is that if a transaction is on the run a second transaction is queued.... or at least to explain a lock management
how can i got an exclusive lock on objects i'm going to read from db?
I try to add this tag to my datasource configuration
<transaction-isolation>TRANSACTION_SERIALIZABLE</transaction-isolation>
in fact i see differencies.... 2 transaction can run simultaneously but only one (the first started i suppose) can commit successfully... the other got an exception....
Full stack trace of any exception that occurs:
12:09:44,278 WARN [JDBCExceptionReporter] SQL Error: 1205, SQLState: 40001
12:09:44,278 ERROR [JDBCExceptionReporter] Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
12:09:44,278 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.LockAcquisitionException: could not update: [com.kirio.S3.ejb3.entity.FilePerOrdinePostoPerDataEvento#20]
i have to sync in a clustered jboss enviroment.... how to do it???
i'm also thinking about message bean... i don't know if it's applicable...
pls I'M LOST!!!!!