Funny thing is... I am not even using Poolman. I am using the mm.mysql
drivers directly.
I was thinking about adding Poolman to the mix. Or create my own
connection pooling mechanism. I figure if db.close() isn't closing the
connections, I can atleast startup 10 connections and pass em around and
don't worry about closing them. Kind of a hack though.
Anyone else experiencing this, or have any solutions?
-----Original Message-----
From: Phillip Rhodes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 27, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Maybe Easy Question?
I had the same thing happening when I was using Poolman with the mm.mysql.*
drivers. I got around it by just using the mm.mysql driver directly,
without poolman.
At 09:24 AM 11/26/2001 -0500, you wrote:
> Hey. I am using Mysql /w the mm.mysql 2.0.6 jdbc drivers. My
> connections
>are getting exhausted and I am doing a
>
> db.begin();
> // My Query stuff
> db.commit();
> db.close();
>
> I've also done a db.isActive() and db.isClose() to check to see
> if the
>connection is really in the state I would like it to be in.
>
> I also have a facade which is a singleton around the JDO
> object. The
>facade returns the db (Database) object.
>
> About one more connection per query is generated. My first
> thought is
>that it's my Singleton wasn't behaving corretly, but some debugging proved
>the opposite. Any ideas on what it may be?
>
>
> Here is the object that returns the Database.
>
>
>import org.exolab.castor.jdo.JDO;
>import org.exolab.castor.jdo.Database;
>import java.io.PrintWriter;
>
>public class JDOConn {
>
> static JDO jdo = null;
> static String DatabaseName = null;
> static String Configuration = null;
>
> private JDOConn() {
>
> try {
> jdo = new JDO();
> jdo.setDatabaseName( DatabaseName );
> jdo.setConfiguration( Configuration );
> jdo.setClassLoader( getClass().getClassLoader() );
> jdo.setLogWriter(new PrintWriter(System.out));
>
> }catch (Exception e) {
> e.printStackTrace();
> }
> }
>
>
> public static Database getDatabase() {
> Database db = null;
> if (jdo != null ) {
> try {
> db = jdo.getDatabase();
>
> } catch (Exception e) {
> e.printStackTrace();
> }
> } else {
> new JDOConn();
> db = getDatabase();
> }
> return db;
> }
>
> public static void setDatabase(String db) {
> DatabaseName = db;
> }
>
> public static void setConfiguration(String config) {
> Configuration = config;
> }
>
> public static void close() {
> if (jdo != null) {
> jdo = null;
> }
> }
>}
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev