[jbosscache-dev] NonManagedConnectionFactory in JDBCCacheLoader

Manik Surtani manik at jboss.org
Tue Oct 10 17:45:35 EDT 2006


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 at jboss.org
Telephone: +44 7786 702 706
MSN: manik at surtani.org
Yahoo/AIM/Skype: maniksurtani





More information about the jbosscache-dev mailing list