Re: EOF and 2 x Database Connections
Re: EOF and 2 x Database Connections
- Subject: Re: EOF and 2 x Database Connections
- From: Andrew Lindesay <email@hidden>
- Date: Sun, 4 Jul 2010 16:33:41 +1200
Hello;
> It may be the same cause as the problem I had here: <http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/>. EOF will by default open two connections. The first one to obtain the JDBC type data, the second for the regular work.
Thanks Miguel; an interesting article and I'll remember that one since I do work with PG as well.
>> Wonder has a fix for this in the erxadaptorchanneldelegate, iirc.
> It may be in erxjdbcchannel ........ I don't have the code in front of me at the moment. Search the source for _cachedContext.
Thanks again Mike; I see from PW code that the solution to this is to subvert EOF's own management of database connections by supplying the system with a connection from a connection pool each time it needs one. Looks good, but requires ERExtensions so I'll probably leave it and put up with the wasted connection per instance for the time-being.
Another thought.... If I were to use "JDBCAdaptor.DataSourceJndiNameKey" in the connection dictionary and load a DataSource in, does EOF just grab connections from the DataSource and keep hold of them itself or does it continue to ask the DataSource for connections as it needs them and close them when it has finished with them? Anybody experimented with this at all?
cheers.
___
Andrew Lindesay
www.silvereye.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden