tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darjan Oblak <dar...@gmail.com>
Subject Re: Tomee 7 validation provider configuration and performance issues
Date Wed, 09 Nov 2016 11:18:30 GMT
Obviously the inlined images did not get attached .. attaching them
separately. The worse performance one is tomee 7.

On Wed, Nov 9, 2016 at 12:15 PM, Darjan Oblak <darjan@gmail.com> wrote:

> Hi,
>
> recently we migrated our app from tomee 1.7 to tomee 7.0.1. Surprisingly
> execution time of hundreds of integration tests became 30 % longer.
> Investigation with a profiler revealed the org.apache.bval seems to be the
> bottleneck.
>
> Obviously we even had the application misconfigured even in tomee 1.7
> where bval is used used instead of hibernate validator provided through
> pom.xml. The same remains with tomee 7.
>
> I have two questions:
>
> 1. How exactly can I configure tomee 7 to use hibernate validator instead
> of apache bval. I tried including META-INF/validation.xml and specifying
> <default-provider>org.hibernate.validator.HibernateValidator</default-provider>,
but
> got: org.apache.openejb.assembler.classic.ValidatorBuilder getConfig
> WARNING: Unable create  validator factory with provider
> org.hibernate.validator.HibernateValidator (Unable to find provider:
> class org.hibernate.validator.HibernateValidator). Default one will be
> used.
>
> 2. Are you aware of any performance issues with the bval version provided
> by tomee 7? Isn't validator supposed to cache annotations somehow, not
> inspecting them over and over again?
>
> Here are two profiler screenshots for a dummy test of app startup together
> with a test doing 100k persist operations of a simple object with even no
> validation used. I know hibernate is not meant to be used in such way for
> batch inserts, I used it just as a proof of concept. The jdbc operations
> are identical for both versions, just bval processing differs (in tomee7
> being ~2.5x slower for the example provided).
>
> tomee 1.7:
>
> [image: Inline image 1]
>
> tomee 7:
> [image: Inline image 2]
>
> Thank you
>
> Best Regards,
> Darjan Oblak
>

Mime
View raw message