cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@maniatis.org>
Subject Re: Closing Cayennes' DataContext
Date Sun, 04 Jan 2015 10:42:25 GMT
I use a connection pool from the application container (tomcat in my case). That might give
you more choice and flexibility. I presume if you are using JSP, then you are using tomcat,
jetty or one of their friends.

Ari


On 4/01/2015 3:14pm, jonathan_ms2006 wrote:
> Hi Aristedes,
> 
>     That's a good tip, from now on I will set MySQL max_connection
> attributes greater than cayennes' connection pool (dataNodeDriver.xml). But
> still I think this will not resolve the issue, there must be a way wherein
> cayennes' DataContext class should strategically close unused database
> connections. 
> 
>     Lately I was thinking if we can replicate using cayennes' DataContext
> the traditional way of connecting Java to MySQL wherein programmatically
> we're setting the JDBC driver, MySQL login credentials, MySQL port number,
> etc. in a java class and then strategically we close unused or idle
> connection/s to avoid such error as mentioned on this thread.
> 
>     Also if there's a way where cayennes' DataContext (open connection) can
> be re-used instead opening a new one every time a JSP page loads.? Any ideas
> on this will be much appreciated. :))
> 
> Best Regards,
> 
> Jonathan
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://cayenne.195.n3.nabble.com/Closing-Cayennes-DataContext-tp4026629p4026633.html
> Sent from the Cayenne - User mailing list archive at Nabble.com.
> 

-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Mime
View raw message