One thing that I've noticed with BeanUtils is that it will overuse that
introspection.
for example. I have 2 beans:
BeanA BeanB
String a; String a;
String b; String c;
String c; String d;
String e;
String f;
String g;
if I call BeanUtils.
all getters for BeanB will be called even though d e f and g do not exist in
BeanA.
Thats a waste of cycles in high load applications.
-Tim
-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
Sent: Thursday, November 14, 2002 7:04 PM
To: Struts Users Mailing List
Subject: Re: How stable is Struts-el? - seek more info
On Thu, 14 Nov 2002, Dan Tran wrote:
> Date: Thu, 14 Nov 2002 15:37:22 -0800
> From: Dan Tran <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: How stable is Struts-el? - seek more info
>
> Hi Karr and Craig, I will post back any info they will provide.
>
> However, I am just get more curious on this topic after
> reading the BeanInfo spec and Struts-es source code.
>
> In the case of Buton-el I found ELButtonTagBeanInfo and ELButtonTag,
however
> after doing more text search
> I found they are not quite related. The question here is
> how can java introspection know to use ELButtonTagBeanInfo to get the
> correct geter/setter methods.
> Does struts-el setup this up somewhere else outside the source?
All of the analysis is done courtesy of the java.beans.Introspector class.
See the Javadocs (and the sources) for that class to understand the
algorithm that is used -- it's pretty straightforward.
Everything that uses BeanUtils and PropertyUtils under the covers (and
that's pretty much everything in Struts) uses this standard Java
introspection mechanisms to look up property getter and setter methods.
The struts-el library isn't doing anything unusual.
This is also consistent with the behavior required by the JSP spec, as
David pointed out, so the same rules apply to things like
<jsp:getProperty> and <jsp:setProperty> in addition to figuring out which
setter to call for custom tag handlers.
>
> Any info is very appreciated
>
> -Dan
Craig
--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>