On Thursday, July 26, 2012 2:42:59 AM UTC-7, azi wrote:
>
>
> http://stackoverflow.com/questions/11666056/facing-nativeexception-java-sql-sqlexception-connection-com-mysql-jdbc-jdbc4co


First, please don't post questions on both StackOverflow and here, 
especially when you are just posting a link to StackOverflow here.  I 
prefer Sequel questions get asked on sequel-talk, but I also check 
StackOverflow daily.

Personally, I have no experience with JNDI.  I do know that using Sequel on 
top of another connection pool often doesn't work out too well, since 
Sequel does its own connection pooling.  Can you try connecting with plain 
JDBC and see if you have different results?

Also, note that calling DB.disconnect in a threaded application does not 
disconnect connections currently in use by other threads.  If you are using 
the standard connection pool, connections currently in use by other threads 
do not get disconnected (at all).  If you are using the sharded connection 
pool, then connections currently in use by other threads do not get 
disconnected until after they are returned to the pool.

You can try the following additional options and see if they help:

  :servers=>{}, :connection_handling=>:queue

:servers turns on the sharded pool, and :connection_handling makes stale 
connections less likely.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/zpjHVbs8rOAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to