Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 4226 invoked from network); 29 Jun 2006 12:50:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Jun 2006 12:50:51 -0000 Received: (qmail 4983 invoked by uid 500); 29 Jun 2006 12:50:47 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 4925 invoked by uid 500); 29 Jun 2006 12:50:47 -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 4893 invoked by uid 99); 29 Jun 2006 12:50:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jun 2006 05:50:47 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jeffgbutler@gmail.com designates 72.14.214.201 as permitted sender) Received: from [72.14.214.201] (HELO hu-out-0102.google.com) (72.14.214.201) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jun 2006 05:50:46 -0700 Received: by hu-out-0102.google.com with SMTP id 31so95835huc for ; Thu, 29 Jun 2006 05:50:24 -0700 (PDT) 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=eyNj/reXCGfXkOm01rBkTdf8eQnKmwKhq3l8mTTBcRJ7kF6WVaxuZttCmUr+1wfVsyEELhkB1uuITxRfCdqxDQ0G8S7El3OvBsu+0d7b+qMVs/XATEnC2BNy9TTy6kdv5yUaNkK/o1t3s9ttBk/GcjhOyy7bD9pXivNnePhJIOY= Received: by 10.66.219.11 with SMTP id r11mr1855249ugg; Thu, 29 Jun 2006 05:50:22 -0700 (PDT) Received: by 10.66.238.18 with HTTP; Thu, 29 Jun 2006 05:50:22 -0700 (PDT) Message-ID: Date: Thu, 29 Jun 2006 07:50:22 -0500 From: "Jeff Butler" To: user-java@ibatis.apache.org Subject: Re: How do i fetch a BLOB via AbatorDAO without reading the whole BLOB into memory In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_25459_26506914.1151585422758" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_25459_26506914.1151585422758 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline iBATIS doesn't support this directly, it's default BLOB handlers turn the BLOB into a byte[] (read the whole BLOB into memory). That's why Abator generates a byte[] for a BLOB. You could make this work differently by using a row handler, or a custom type handler, but Abator doesn't support those features of iBATIS so you're on your own to write the sql statement and the collateral objects. Jeff Butler On 6/29/06, Geoff Hollingworth wrote: > > normally i would fetch direct to the db with the rs and getBinaryStream > type > methods. > or should i not be worried about running out of memory because something > clever is being done i do not understand, cannot see > thanks > /geoff > > > ------=_Part_25459_26506914.1151585422758 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
iBATIS doesn't support this directly, it's default BLOB handlers turn the BLOB into a byte[] (read the whole BLOB into memory).  That's why Abator generates a byte[] for a BLOB.
 
You could make this work differently by using a row handler, or a custom type handler, but Abator doesn't support those features of iBATIS so you're on your own to write the sql statement and the collateral objects.
 
Jeff Butler

 
On 6/29/06, Geoff Hollingworth <eusholli@hotmail.com> wrote:
normally i would fetch direct to the db with the rs and getBinaryStream type
methods.
or should i not be worried about running out of memory because something
clever is being done i do not understand, cannot see
thanks
/geoff



------=_Part_25459_26506914.1151585422758--