[jboss-user] [JBossCache] - Re: Urgent- Socket error when adding object to DB using JDBC
malek256
do-not-reply at jboss.com
Thu Oct 5 15:53:55 EDT 2006
After running a large number of tests, all of which repeatably and consistently fail in and around approximately 1970-1990 cache updates, I have made the following change.
After this change, the code then fails between 3900-4000 updates. It appears that this is a minor defect or at least a suboptimization with the original connection code.
The connection is stored into TLS during the NonManagedConnectionFactory.prepare() method but it seems it is not put in place after the null detect/create code within NonManagedConnectionFactory.getConnection.
I urge you to examine this.
e.g.
...
public Connection getConnection()
{
Connection con = (Connection) connection.get();
if(con == null)
{
try
{
con = DriverManager.getConnection(url, usr, pwd);
// CODE ADDED HERE
connection.set(con);
// END CODE MODIFICATION
}
catch(SQLException e)
...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976403#3976403
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976403
More information about the jboss-user
mailing list