cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <mgen...@masslight.net>
Subject Re: Closing Cayennes' DataContext
Date Fri, 02 Jan 2015 20:14:41 GMT
Hi Jonathan,

How many connections are you allocating and how many is your MySQL server
set up to allow?

mrg


On Fri, Jan 2, 2015 at 10:43 AM, jonathan_ms2006 <jonathan_ms2006@yahoo.com>
wrote:

> Hi Andrus,
>
>       Good day! Is there a way to close cayennes' DataContext.? In my web
> application I'm using this code "DataContext context =
> ServletUtil.getSessionContext(session);" as suggested on cayenne website.
> However the problem is, it is creating new connection every time a page
> loads which as a result, returns an error when there are multiple users
> accessing the web application:
> com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data
> source rejected establishment of connection,  message from server: "Too
> many
> connections".
>
> Any ideas how to overcome this error in cayenne.? Thank you in advance.
>
> Best Regards,
>
> Jonathan
>
>
>
> --
> View this message in context:
> http://cayenne.195.n3.nabble.com/Closing-Cayennes-DataContext-tp4026629.html
> Sent from the Cayenne - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message