MySql connection
squeak at ajr.e4ward.com
squeak at ajr.e4ward.com
Fri Oct 22 12:58:32 UTC 2004
On Friday 22 October 2004 2:18 am, Hilaire Fernandes wrote:
> Hello,
>
> Exploring the use of the MySQL driver, I have found that each time I
> want to do a SQL query I need to create a new JdmConnection.
I also ran into problems trying to reuse a connection for more than one query.
It looks like the driver was designed that way although I have heard from
others (Colin?) that it does work, maybe if the resultset is completely
read in between. But my experience and observation is that connections are
not serially reusable much less reentrant. But multiple concurrent
connections are ok (if not elegant).
>However after each query, the connection seems to close itself. Is it
>the normal behavior or is it something wrong?
My experience in writing the Persistence package for the Mysql driver is
actually that care had to be taken to close them after use as the Mysql
server sometimes had problems with more than 100 concurrent connections.
> PS2: What is the most reliable driver & DB couple for Squeak? Is there a
> 100% Squeak solution for DB ?
If you want to stick with Mysql, have a look at the aforementioned Persistence
package which maps Mysql into objects. It works around this single-query
behavior of the driver. It's 100% squeak and it is seeing reliable production
use.
-- Alan
More information about the Squeak-dev
mailing list
|