I made some changes to the use of TxEntityMap.

- Before one hashmap was being used for all entity types. This is bad
because entities of different types could quite possibly have the same exact
cache key/primary key (Long, Integer, etc...)

- Entities should be stored in the same order in which they were accessed.
This is not important with a single instance of JBoss running, but is a
problem with multiple instances because some DBs obtain a write lock when
they update a row.

I introduced a new class ApplicationTxEntityMap. This is a simple tx to
ArrayList mapping.  The ArrayList being all entities involved with the
transaction in the specific order in which they were accessed.

TxEntityMap is back in EntityContainer and manages ApplicationTxEntityMap.
In some future code I'm writing, I need to be able to determine the entity
of a certain type that is involved with a transaction, so I put the class
back.

disassociate method has been removed in favor of registering a
Synchronization with the transaction.


I hope the above babble makes sense.

Regards,

Bill





_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to