Following up from this thread:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977381
Any idea why connections created in getConnection() aren't stored in
the ThreadLocal as they are in prepare()? Is this so that the same
connection is used throughout the tx? Does this also make sense that
the conn is not closed in ConnectionFactory.close() if the connection
is the same as the one in ThreadLocal, and is only closed by a commit
() or rollback()?
I presume then that a proper approach here would be to use a HashMap
of connections as a rudimentary pool?
Thanks,
--
Manik Surtani
Lead, JBoss Cache
JBoss, a division of Red Hat
Email: manik(a)jboss.org
Telephone: +44 7786 702 706
MSN: manik(a)surtani.org
Yahoo/AIM/Skype: maniksurtani