Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 36676 invoked from network); 29 Nov 2006 17:08:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Nov 2006 17:08:26 -0000 Received: (qmail 7700 invoked by uid 500); 29 Nov 2006 17:08:32 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 7688 invoked by uid 500); 29 Nov 2006 17:08:32 -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 7665 invoked by uid 99); 29 Nov 2006 17:08:32 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2006 09:08:32 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ustaudinger@gmail.com designates 64.233.182.184 as permitted sender) Received: from [64.233.182.184] (HELO nf-out-0910.google.com) (64.233.182.184) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2006 09:08:19 -0800 Received: by nf-out-0910.google.com with SMTP id l24so2876860nfc for ; Wed, 29 Nov 2006 09:07:58 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=LX9L47ngK88vA5qgAvH5HnjsvSxf5PYGw3+9xNREEgdfDF1Vp9GSDbIx/CPt+C6IWiyFIMrHSIJfgoWv+aMWOLnhpqkmSYk+vWC5kSw/ermtxjMn1FlZe+PinQMl/abU4lZZQoLH2PmYAshxHgVRl9uEDGQSqfi6brFJu+3ccVQ= Received: by 10.82.135.13 with SMTP id i13mr633611bud.1164820077510; Wed, 29 Nov 2006 09:07:57 -0800 (PST) Received: by 10.82.145.17 with HTTP; Wed, 29 Nov 2006 09:07:57 -0800 (PST) Message-ID: <65daf6a60611290907j31ba5a27h3c535cf2a86a28b9@mail.gmail.com> Date: Wed, 29 Nov 2006 18:07:57 +0100 From: "Ulrich Staudinger" To: user-java@ibatis.apache.org Subject: Re: How to avoid implicit transaction ? In-Reply-To: <2fe5ef5b0611290852g41ec555bm9d293da201dfd3ab@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_28040_19884777.1164820077414" References: <456DABAF.3040604@activestocks.de> <2fe5ef5b0611290852g41ec555bm9d293da201dfd3ab@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_28040_19884777.1164820077414 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Will double check, thanks On 11/29/06, Brandon Goodin wrote: > > What version of iBATIS are you using? This seems like an issue we > addressed in the past. If you are not running the latest please > upgrade and reexamine this. If you are then please provide a repetable > test that displays this problem. > > Thanks, > Brandon > > On 11/29/06, Ulrich Staudinger wrote: > > Hi there, > > > > despite the fact that ibatis is really very handy once you know how to > > use it, i am wondering if i can avoid the implicit transaction it starts > > when i want to read something from a datasource somehow. > > > > Here is the output from my log: > > > > 1164808167.146 - INFO "[getContact] 10" "-" > > 1164808167.146 - DEBUG Checked out connection 12159142 from pool. "-" > > 1164808167.146 - DEBUG {conn-100082} Connection "-" > > 1164808167.146 - DEBUG {conn-100083} Connection "-" > > 1164808167.185 - DEBUG "[getContact] fetched 16 values from db" "-" > > 1164808167.185 - DEBUG "[getContact] fetched 2 contact cards" "-" > > 1164808167.185 - DEBUG Returned connection 12159142 to pool. "-" > > > > The problem is, that ibatis fetches a conncetion from the pool when i > > just read something from the cache. How can i avoid this ? Since there > > are no SQL statements in the debug log, it fetches information from the > > cache. > > > > Now, when we disconnect the pc (on the network level) from the database > > network, ibatis stops to work, although it should fetch stuff from the > > cache. Actually ibatis throws an exception from somewhere inside > > transaction management when you pull the wire. > > > > Anyway, this checking out and returning of connections is in my case the > > real performance problem. > > > > Here are my configuration files: > > > > > > > > > 2.0//EN" > > "http://ibatis.apache.org/dtd/sql-map-config-2.dtd > > "> > > > > > > > > > > > cacheModelsEnabled="true" > > enhancementEnabled="true" > > maxSessions="64" > > maxTransactions="8" > > maxRequests="128"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [...] > > > > > > Does someone have an idea how to avoid that implicit transaction ? > > > > Thanks, > > best regards, > > Ulrich > > > > P.s. could it be that the mail server for the ibatis list is quite slow > > ? It takes aeons until i see my posts ... if i receive them at all. One > > of my former posts never reached me, but i see it online in the archives > > ... > > > -- Ulrich B. Staudinger ------=_Part_28040_19884777.1164820077414 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Will double check, thanks


On 11/29/06, Brandon Goodin <brandon.goodin@gmail.com> wrote:
What version of iBATIS are you using? This seems like an issue we
addressed in the past. If you are not running the latest please
upgrade and reexamine this. If you are then please provide a repetable
test that displays this problem.

Thanks,
Brandon

On 11/29/06, Ulrich Staudinger <us@activestocks.de> wrote:
> Hi there,
>
> despite the fact that ibatis is really very handy once you know how to
> use it, i am wondering if i can avoid the implicit transaction it starts
> when i want to read something from a datasource somehow.
>
> Here is the output from my log:
>
> 1164808167.146 - INFO  "[getContact] 10" "-"
> 1164808167.146 - DEBUG Checked out connection 12159142 from pool. "-"
> 1164808167.146 - DEBUG {conn-100082} Connection "-"
> 1164808167.146 - DEBUG {conn-100083} Connection "-"
> 1164808167.185 - DEBUG "[getContact] fetched 16 values from db" "-"
> 1164808167.185 - DEBUG "[getContact] fetched  2 contact cards" "-"
> 1164808167.185 - DEBUG Returned connection 12159142 to pool. "-"
>
> The problem is, that ibatis fetches a conncetion from the pool when i
> just read something from the cache. How can i avoid this ? Since there
> are no SQL statements in the debug log, it fetches information from the
> cache.
>
> Now, when we disconnect the pc (on the network level) from the database
> network, ibatis stops to work, although it should fetch stuff from the
> cache. Actually ibatis throws an exception from somewhere inside
> transaction management when you pull the wire.
>
> Anyway, this checking out and returning of connections is in my case the
> real performance problem.
>
> Here are my configuration files:
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config
> 2.0//EN"
>     "http://ibatis.apache.org/dtd/sql-map-config-2.dtd
> < http://ibatis.apache.org/dtd/sql-map-config-2.dtd>">
>
> <sqlMapConfig>
>       <properties resource="database.properties"/>
>
>   <settings
>     cacheModelsEnabled="true"
>     enhancementEnabled="true"
>     maxSessions="64"
>     maxTransactions="8"
>     maxRequests="128"/>
>
>   <transactionManager type="JDBC">
>     <dataSource type="SIMPLE">
>       <property value="${driver}" name="JDBC.Driver"/>
>       <property value="${url}" name="JDBC.ConnectionURL "/>
>       <property value="${username}" name="JDBC.Username"/>
>       <property value="${password}" name="JDBC.Password"/>
>       <property value="15" name=" Pool.MaximumActiveConnections"/>
>       <property value="15" name="Pool.MaximumIdleConnections"/>
>       <property value="1000" name="Pool.MaximumWait"/>
>
>       <property name="useUnicode" value="true"/>
>       <property name="characterEncoding" value="UTF-8"/>
>
>       <!-- ping query -->
>       <property name="Pool.PingQuery" value="select 1 from contact2"/>
>       <property name="Pool.PingEnabled" value="true"/>
>       <property name=" Pool.PingConnectionsOlderThan" value="60000"/>
>       <property name="Pool.PingConnectionsNotUsedFor" value="60000"/>
>
>     </dataSource>
>   </transactionManager>
>   <sqlMap resource="Contact.xml" />
>
>
> </sqlMapConfig>
>
>
>
> <sqlMap namespace="Contact">
>
>       <cacheModel id="contact-cache" type="FIFO">
>       <flushInterval hours="2"/>
>       <flushOnExecute statement="flushStatement"/>
>       <property name="size" value="10000" />
>     </cacheModel>
> [...]
>
>
> Does someone have an idea how to avoid that implicit transaction ?
>
> Thanks,
> best regards,
> Ulrich
>
> P.s. could it be that the mail server for the ibatis list is quite slow
> ? It takes aeons until i see my posts ... if i receive them at all. One
> of my former posts never reached me, but i see it online in the archives
> ...
>



--
Ulrich B. Staudinger ------=_Part_28040_19884777.1164820077414--