Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 88140 invoked from network); 2 Jun 2009 20:15:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jun 2009 20:15:55 -0000 Received: (qmail 73633 invoked by uid 500); 2 Jun 2009 20:16:07 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 73614 invoked by uid 500); 2 Jun 2009 20:16:07 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 73606 invoked by uid 99); 2 Jun 2009 20:16:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2009 20:16:07 +0000 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of fatboysuns@gmail.com designates 209.85.216.173 as permitted sender) Received: from [209.85.216.173] (HELO mail-px0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2009 20:15:57 +0000 Received: by pxi3 with SMTP id 3so785927pxi.4 for ; Tue, 02 Jun 2009 13:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=Ef3x1+go6TQoRi9inH7IXY/Nuh979fZufQqxHxT6Vu8=; b=QE7cxus0+vvvCzqTgLsIgF8whYyfBf6sg2qIhCO3r2t/mEQF5wZtFBzGLkEVHLW2nP TbqfKb++pFXufvhWM+0nMS+3cYBjBZr/WlO5GCkiWhfYRpIs4miU9Z+D46xX2Xtgd3rZ pqcu6TQYlFB6lMDz4tqPNX+Pep+Nujq0RtVYU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=PE2Ftd7f+2+JzQsbE0Bf8TQOq1RzUUa2rdK35WZ9ep9t8Thd2t28Pkj0EEkNqk3Vaw YzsO7cYZfPtwOO/4V7Bd2HSN9chXV4YYxHLPkxvBqPtJDQXQ01EF1rPvYbQUUzkdoHM3 JQqlCyM3a2RpkAlVbEJYd3UISfuUL5sqY1cyw= MIME-Version: 1.0 Received: by 10.142.225.20 with SMTP id x20mr40662wfg.292.1243973736078; Tue, 02 Jun 2009 13:15:36 -0700 (PDT) In-Reply-To: References: From: Sundar Sankar Date: Tue, 2 Jun 2009 13:15:16 -0700 Message-ID: Subject: Re: FW: Connection Closing Problem To: user-java@ibatis.apache.org Content-Type: multipart/alternative; boundary=000e0cd28cf0a61db6046b633413 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd28cf0a61db6046b633413 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Did u try stepping in through the Ibatis code to see what might actually be happening when u make the call? On Tue, Jun 2, 2009 at 1:03 PM, Nathan Modrzewski wrote: > I'm still having problems with this and have not been able to figure it > out. Anybody have any ideas? > > Thanks, > -- Nathan > > -----Original Message----- > From: Nathan Modrzewski [mailto:nmodrzewski@eaglexm.com] > Sent: Saturday, May 30, 2009 4:35 PM > To: user-java@ibatis.apache.org > Subject: Connection Closing Problem > > I am having a problem with my Postgresql 8.3 connections not being > closed when the program is finished. Here are a few of the messages from > the Postgresql log file: > > 2009-05-30 16:18:59 MDT [echodrive_machine @ echodrive]: LOG: > unexpected EOF on client connection > 2009-05-30 16:19:00 MDT [echodrive_machine @ echodrive]: LOG: > unexpected EOF on client connection > 2009-05-30 16:19:00 MDT [echodrive_machine @ echodrive]: LOG: > unexpected EOF on client connection > 2009-05-30 16:19:02 MDT [echodrive_machine @ echodrive]: LOG: > unexpected EOF on client connection > > > I'm sure its something I'm doing wrong. I am using Apache Dbcp for my > connection pooling. I'm using IBatis 2.3.4 and Apache DBCP 1.2.2. > > Below is a the xml settings I use for my IBatis and DBCP setup. > > > > useStatementNamespaces="true" > cacheModelsEnabled="false" > enhancementEnabled="false" > lazyLoadingEnabled="false" > maxRequests="1024" > maxSessions="256" > maxTransactions="64" > /> > > > > > > value="org.postgresql.Driver" /> > value="jdbc:postgresql://db-05.eaglexm.com:5432/${database}" > /> > > > > > > > > value="60000" /> > > value="600000" /> > > > > ... my "sqlMap" statements / includes ... > > > Below is some java code that uses it: > > Reader reader = > Resources.getResourceAsReader("ibatis_map/echodrive/server/SqlMapConfig. > xml"); > try { > map = SqlMapClientBuilder.buildSqlMapClient(reader,properties); > map.startTransaction(); > try { > // Do some selects / updates / inserts > > map.commitTransaction(); > } finally { > map.endTransaction(); > } > } finally { > reader.close(); > } > > If anyone has any ideas, I would appreciate it. > > Thanks, > -- Nathan > --000e0cd28cf0a61db6046b633413 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Did u try stepping in through the Ibatis code to see what might actually be= happening when u make the call?

On Tue, = Jun 2, 2009 at 1:03 PM, Nathan Modrzewski <nmodrzewski@eaglexm.com> wrot= e:
I'm still hav= ing problems with this and have not been able to figure it
out. Anybody have any ideas?

Thanks,
=A0-- Nathan

-----Original Message-----
From: Nathan Modrzewski [mailto:= nmodrzewski@eaglexm.com]
Sent: Saturday, May 30, 2009 4:35 PM
To: user-java@ibatis.apache.= org
Subject: Connection Closing Problem=

I am having a problem with my Postgresql 8.3 connections not being
closed when the program is finished. Here are a few of the messages from the Postgresql log file:

2009-05-30 16:18:59 MDT [echodrive_machine @ echodrive]: LOG:
unexpected EOF on client connection
2009-05-30 16:19:00 MDT [echodrive_machine @ echodrive]: LOG:
unexpected EOF on client connection
2009-05-30 16:19:00 MDT [echodrive_machine @ echodrive]: LOG:
unexpected EOF on client connection
2009-05-30 16:19:02 MDT [echodrive_machine @ echodrive]: LOG:
unexpected EOF on client connection


I'm sure its something I'm doing wrong. I am using Apache Dbcp for = my
connection pooling. I'm using IBatis 2.3.4 and Apache DBCP 1.2.2.

Below is a the xml settings I use for my IBatis and DBCP setup.


<sqlMapConfig>
=A0 =A0<settings
=A0 =A0 =A0 =A0useStatementNamespaces=3D"true"
=A0 =A0 =A0 =A0cacheModelsEnabled=3D"false"
=A0 =A0 =A0 =A0enhancementEnabled=3D"false"
=A0 =A0 =A0 =A0lazyLoadingEnabled=3D"false"
=A0 =A0 =A0 =A0maxRequests=3D"1024"
=A0 =A0 =A0 =A0maxSessions=3D"256"
=A0 =A0 =A0 =A0maxTransactions=3D"64"
=A0 =A0/>

=A0 =A0<transactionManager type=3D"JDBC" commitRequired=3D&qu= ot;true">
=A0 =A0 =A0 =A0 =A0 =A0<property name=3D"JDBC.DefaultAutoCommit&qu= ot; value=3D"false" />
=A0 =A0 =A0 =A0 =A0 =A0<property name=3D"JDBC.SetAutoCommitAllowed= " value=3D"false" />
=A0 =A0 =A0 =A0 =A0<dataSource type=3D"DBCP">
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"driverClassName&q= uot;
value=3D"org.postgresql.Driver" />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"url"
value=3D"jdbc:postgresql://db-05.eaglexm.com:5432/${database}&quo= t; />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"username&= quot; value=3D"${username}" />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"password&= quot; value=3D"${password}" />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"maxActive= " value=3D"32" />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"maxIdle&q= uot; value=3D"5" />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"maxWait&q= uot; value=3D"30000" />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"validatio= nQuery" value=3D"select id
from system_settings" />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"logAbando= ned" value=3D"false" />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"timeBetwe= enEvictionRunsMillis"
value=3D"60000" />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"numTestsP= erEvictionRun" value=3D"5" />
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<property name=3D"minEvicta= bleIdleTimeMillis"
value=3D"600000" />
=A0 =A0 =A0 =A0</dataSource>
=A0 =A0</transactionManager>

=A0 =A0... my "sqlMap" statements / includes ...
</sqlMapConfig>

Below is some java code that uses it:

Reader reader =3D
Resources.getResourceAsReader("ibatis_map/echodrive/server/SqlMapConfi= g.
xml");
try {
=A0 =A0map =3D SqlMapClientBuilder.buildSqlMapClient(reader,properties); =A0 =A0map.startTransaction();
=A0 =A0try {
=A0 =A0 =A0 =A0// Do some selects / updates / inserts

=A0 =A0 =A0 =A0map.commitTransaction();
=A0 =A0} finally {
=A0 =A0 =A0 =A0map.endTransaction();
=A0 =A0}
} finally {
=A0 =A0reader.close();
}

If anyone has any ideas, I would appreciate it.

Thanks,
=A0-- Nathan

--000e0cd28cf0a61db6046b633413--