Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF7F2973A for ; Wed, 1 Feb 2012 16:04:39 +0000 (UTC) Received: (qmail 56049 invoked by uid 500); 1 Feb 2012 16:04:39 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 55797 invoked by uid 500); 1 Feb 2012 16:04:38 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 55787 invoked by uid 99); 1 Feb 2012 16:04:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2012 16:04:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of grobmeier@gmail.com designates 209.85.216.50 as permitted sender) Received: from [209.85.216.50] (HELO mail-qw0-f50.google.com) (209.85.216.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2012 16:04:34 +0000 Received: by qabg27 with SMTP id g27so3941655qab.9 for ; Wed, 01 Feb 2012 08:04:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=Dm1tuU11+YW9a9fxNAfBRFs7u6ypA6uY3qQN59oXN3s=; b=BNFqcgVaVinxo6HlyD+v42GjWLOczYf/ovvyrMO6fAV5FDXh3u9p1mgbUDhSgs/r5C 2ID+EbYhrMwyyRxfjb9YPKcTfYzc9oRxHwq/sTxRU0lS06nEYBqRSq8MX7YefPm8dDRG TznuftCk7OnsxfxdpTJd8L9RgiIP13gBwQV+c= Received: by 10.224.187.145 with SMTP id cw17mr3749887qab.37.1328112253216; Wed, 01 Feb 2012 08:04:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.8.140 with HTTP; Wed, 1 Feb 2012 08:03:51 -0800 (PST) In-Reply-To: References: From: Christian Grobmeier Date: Wed, 1 Feb 2012 17:03:51 +0100 Message-ID: Subject: Re: [OGNL] CacheException To: Commons Developers List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Feb 1, 2012 at 4:55 PM, Maurizio Cucchiara wrote: > Hi guys, > I was trying to integrate Struts2 with the new api layout. > Unfortunately I realized that due to the introduction of the new checked > CacheException [1] (which basically inherits the Exception class), every > method (which uses a cache, practically all of them) of OgnlRuntime [2] > must throw the aforementioned exception. > Furthermore it seems that there is only one class able to produce > exceptions [3] > This is make very hard the integration process of Struts2. > I was thinking to change the exception in a unchecked version, but [3] > makes me think the contrary. Why do you now think contrary? When I read the first part of your message I thought: heck, why is it a checked exception? Stupid question: can a OgnlException exception occur on objects in the cache? I mean in practice... To my understanding the checked OgnlException occurs before putting something into the cache. Therefore the CachedException is more or less an exception which is somehow produced at runtime, due to a programming error. Sounds like a runtime exception for me, but I would love to hear why you are not thinking different Cheers > > I would like to know your thought. > > > [1] > http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/= apache/commons/ognl/internal/CacheException.java?revision=3D1194943&view=3D= markup > [2] > http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/= apache/commons/ognl/OgnlRuntime.java?revision=3D1203594&view=3Dmarkup > [3] > http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/= apache/commons/ognl/internal/entry/PropertyDescriptorCacheEntryFactory.java= ?revision=3D1194960&view=3Dmarkup > > Twitter =C2=A0 =C2=A0 :http://www.twitter.com/m_cucchiara > G+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:https://plus.google.com/10790371154= 0963855921 > Linkedin =C2=A0 =C2=A0:http://www.linkedin.com/in/mauriziocucchiara > > Maurizio Cucchiara --=20 http://www.grobmeier.de https://www.timeandbill.de --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org