Scott,

   Did you get a chance to look at this?

Vic




----- Original Message -----
From: "Victor Marinelli" <[EMAIL PROTECTED]>
To: "JRun-Talk" <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 8:47 AM
Subject: Re: database connections are not closing


> Scott,
>
>    I am using JRun 3.0 Service Pack 2a Version 3.02a.11614. I am using the
> Informix JDBC driver Version 2.20, type 4. Here is the bottom of my
> local.properties:
>
> # list of services to start
> ejb.services=ejb,jms
> ranConnector=yes
> java.args={default}
> java.jnipath={default}
> java.classpath={default}
> ha4.0.rootdir=/users/HA40gui/jrun/ha4.0
> ha4.0.class={webapp.service-class}
> webapp.mapping./ha4.0=ha4.0
> file.browsedirs=false
> web-app.welcome-file-list=index.htm
> jdbc.ifxConnection.display-name=Informix Connection
> jdbc.ifxConnection.driver=com.informix.jdbc.IfxDriver
>
jdbc.ifxConnection.url=jdbc:informix-sqli://ifxHost:1492/ha_40gui:informixse
> rver=ifxHostdb;user=user;password=Us3rr
> jdbc.ifxConnection.description=
> jdbc.ifxConnection.pooling=true
> jdbc.ifxConnection.timeout=3
> jdbc.ifxConnection.interval=30
> jdbc.ftConnection.param.user=
> jdbc.ftConnection.param.password=
> jdbc.ifxConnection.param.user=
> jdbc.ifxConnection.param.password=
>
>
> Here is sample code:
>
> <%@ page
> import="java.io.*,java.util.*,java.sql.*,javax.sql.*,javax.naming.*;" %>
>
>
> <%
>
>         String dsName = "ifxConnection";
>         Connection dbConnection = null;
>         Vector employees=new Vector();
>         Statement st1 = null;
>         ResultSet rs1 = null;
>         int rows1=0
>
>  try {
>          InitialContext ctx = new InitialContext();
>         DataSource ds =(DataSource)ctx.lookup("java:comp/env/jdbc/" +
> dsName);
>         dbConnection = ds.getConnection();
>         st1 = dbConnection.createStatement();
>         rs1 = st1.executeQuery("select id from employees");
>
>           while (rs1.next()) {
>                rows1++;
>                employees.addElement(rs1.getString(1));
>
>          }
>  }
>  catch (SQLException ex){
>        System.out.println ("\nSQLException-------------------\n");
>        System.out.println ("SQLState: " + ex.getSQLState ());
>        System.out.println ("Message :  " + ex.getMessage ());
>  }
>
>  finally {
>     try{
>           rs1.close();
>           st1.close();
>           dbConnection.close();
>     } catch (Exception ex){}
>    }
> %>
>
>  As mentioned earlier, I am the only one using this test app and yet this
> still produces on average 40 or so connections that do not close. During
> periods of inactivity(such as this past weekend)shouldn't these
connections
> close?
>
>
> Thanks,
> Vic
>
>
>
> ----- Original Message -----
> From: "Scott Stirling" <[EMAIL PROTECTED]>
> To: "JRun-Talk" <[EMAIL PROTECTED]>
> Sent: Friday, May 04, 2001 4:56 PM
> Subject: RE: database connections are not closing
>
>
> > Hi Vic,
> >
> > Could you post the bottom portion of your local.properties file where
the
> > jdbc datasources are configured?  This may simply be a bug in the
> properties
> > that the JMC writes in.  Which version of JRun are you using, and which
> > database drivers?
> >
> > Scott Stirling
> > Macromedia
> >
> > > -----Original Message-----
> > > From: Victor Marinelli [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, May 03, 2001 2:44 PM
> > > To: JRun-Talk
> > > Subject: database connections are not closing
> > >
> > >
> > > Hello,
> > >
> > >
> > >    I am using JRun 3.0 and Apache 1.3.14 on Solaris. I am
> > > using Informix IDS
> > > 2000 as the database. I noticed that everytime I access my
> > > web application
> > > and do a query, database connections remain open! They don't
> > > seem to ever
> > > close. I had a total of 49 connections open. I enabled
> > > connection pooling
> > > through JMC and I checked my code to make sure I was closing the
> > > dbConnection. I don't know what to try at this point and this
> > > is a serious
> > > problem. Can someone please help!!
> > >
> > >
> > > Thanks,
> > > Vic
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to