Hi Seyvet,
I wouldn't want to comment on whether afterCompletion is the right place to call close for JPA, the thread you reference is probably the best place to discuss that. We are more concerned with raw transactions in this forum.
Tx::enlistResource(RM rm)
Tx::registerSynchronization(S s)
foreach Synchronization
S::beforeCompletion();
foreach ResourceManager
Tx::prepare()
foreach ResourceManager
Tx::commit()
foreach Synchronization
Tx::afterCompletion
Tom