Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 41197 invoked from network); 15 Aug 2008 16:39:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Aug 2008 16:39:12 -0000 Received: (qmail 83562 invoked by uid 500); 15 Aug 2008 16:39:08 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 83407 invoked by uid 500); 15 Aug 2008 16:39:08 -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 83396 invoked by uid 99); 15 Aug 2008 16:39:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2008 09:39:08 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2008 16:38:11 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KU2Jz-0004E4-As for user-java@ibatis.apache.org; Fri, 15 Aug 2008 09:38:39 -0700 Message-ID: <19001807.post@talk.nabble.com> Date: Fri, 15 Aug 2008 09:38:39 -0700 (PDT) From: hbuch4 To: user-java@ibatis.apache.org Subject: Re: don't call Managed Bean init method In-Reply-To: <18989735.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: hbuch@straussauto.com References: <18989735.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Actually, I found that it is far easier and clearer to simply retrieve the list of objects from the db directly in the "get" method corresponding to that list, rather than in the bean's init method. Thanks, Heather Buch hbuch4 wrote: > > Is there any way to prevent Ibatis from calling the init method of my > ManagedBean, when it creates a new bean for a ResultMap? > > I only want to call the ManagedBean's init method when it is being > instantiated through MyFaces, NOT through Ibatis. The only solution I > thought of was, before the init method, to iterate through the stack trace > and skip over if it finds: > > at com.ibatis.common.beans.ClassInfo.instantiateClass > > but execute if: > > at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance > > but this seems a little clunky..... > > any ideas? > > thanks, Heather Buch > -- View this message in context: http://www.nabble.com/don%27t-call-Managed-Bean-init-method-tp18989735p19001807.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com.