This content has been marked as final.
Show 4 replies
-
1. Re: TransactionLocalDelegateImpl
adrian.brock May 31, 2005 6:52 PM (in response to dimitris)The difference is in the implementation details:
TransactionLocalprotected void initDelegate() { if (transactionManager instanceof TransactionLocalDelegate) delegate = (TransactionLocalDelegate) transactionManager; else delegate = new TransactionLocalDelegateImpl(transactionManager); }
It could equally use the passed TransactionLocal rather than the implementation
since there is a one-one correspondance.
There is one object per transaction,
see TransactionLocalSynchronization.valuesByLocal
with the synchronization being transaction scoped. -
2. Re: TransactionLocalDelegateImpl
dimitris May 31, 2005 7:17 PM (in response to dimitris)"It could equally use the passed TransactionLocal rather than the implementation since there is a one-one correspondance."
But it would be no fun then, right? :)
quite impressive; I'd never guess this one. -
3. Re: TransactionLocalDelegateImpl
adrian.brock May 31, 2005 7:33 PM (in response to dimitris)"dimitris@jboss.org" wrote:
"It could equally use the passed TransactionLocal rather than the implementation since there is a one-one correspondance."
But it would be no fun then, right? :)
quite impressive; I'd never guess this one.
It's not intended to be obfuscated. Change it to use the passed TransactionLocal
if it makes the code easier to read/understand. -
4. Re: TransactionLocalDelegateImpl
dimitris Jun 1, 2005 7:22 AM (in response to dimitris)That's fine. With this change it could make sense to avoid a few objects by making TransactionLocalDelegateImpl a singleton, since it doesn't hold any state, except for the TM which is not used.
Not important, anway. Thanks.