Mark, Vladimir,

On 4/28/22 12:10, Mark Thomas wrote:
On 28/04/2022 16:54, vladimir dvorak wrote:
   Hi,

my intention is to use custom el-api with modified BeanELResolver, that
uses instead slow reflection API much faster
https://github.com/EsotericSoftware/reflectasm

You have a couple of options.

1. Replace the el-api.jar in $CATALINA_BASE/lib.

Not ideal as deploy just got a lot more complicated than just copying a WAR file but it does give you exactly what you want.

2. If you are using the EL in JSPs, then you can add your custom ELResolver to the JspApplicationContext and it will get used in preference to the BeanELResolver.

This keeps everything in the application but does require a little plumbing to register the customer resolver when the web app starts.

I wonder how much of a performance benefit reflectasm gives, since Tomcat's implementation should be providing not just reflective-access to object properties, but /cached/ reflective access to properties.

It's not just calling Class.forName(beanType).getMethod("get" + capicalize(propertyName)) every time it sees a property-access.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to