You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Gropp Volker <Vo...@e-velopment.de> on 2016/02/24 18:11:40 UTC
Hibernate Validator class scanning in OpenEjb 7.0.0-M1
Hi,
we are upgrading our openejb-based unit-tests of a fairly large JEE-app to OpenEjb 7.0.0-M1 and I noticed a very slow startup while scanning all classes for Bean Validation with Hibernate Validator 5 5.2.2.Final. Is there any way to limit classes/packages which are scanned by Hibernate Validator or to disable it completely (in our tests)? Maybe this is not a problem solely in 7.0.0-M1, but I noticed it because of lot of warnings/errors while starting up the container.
Regards,
Volker Gropp
Re: Hibernate Validator class scanning in OpenEjb 7.0.0-M1
Posted by Romain Manni-Bucau <rm...@gmail.com>.
https://tomee.apache.org/refcard/refcard.html references it in "Scanning
configuration" part.
I suspect a library (understand something line guava or commons-xxx) is
scanned cause of CDI 1.2 and was not before so customizing exclusions.list
should help a lot as well (note for tests: system property
openejb.additional.exclude can be used too:
-Dopenejb.additional.exclude=guava for instance).
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>
2016-02-25 12:56 GMT+01:00 Gropp Volker <Vo...@e-velopment.de>:
> Hi,
>
> thanks for the fast reply. I'm now using
>
> <scan>
> <exclude name="my.package.**"/>
> </scan>
>
> in my beans.xml, it's a lot faster. I'm also using
> openejb.deployments.classpath.include and
> openejb.deployments.classpath.exclude and I try to limit the packages by
> using a scan.xml (in META-INF) with only specific packages.
>
> Older Hibernate Validator Versions (5.0.0) did not help. I still see
> warnings about some packages like
> java.util.HashMap.java.util.HashMap$TreeNode<K, V>, but maybe it's because
> those are used in beans? Is there any other trick to limit the scanning I
> might try? I could not find a nice documentation about how to configure
> such things. OpenEjb still mentions " openejb.deployments.package.exclude".
>
> Regards Volker
>
> -----Original Message-----
> From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> Sent: Mittwoch, 24. Februar 2016 18:26
> To: users@tomee.apache.org
> Subject: Re: Hibernate Validator class scanning in OpenEjb 7.0.0-M1
>
> Hi
>
> if you can share some jstack dump in the "slow" period it could help to
> tackle that. Also maybe try previous releases - know they fixed some
> inheritance bugs so maybe they added some overhead by side effect. Bean
> validation scanning should be limited to CDI during startup so same tricks
> as for CDI should work.
>
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> | Blog <
> http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau>
> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <
> http://www.tomitribe.com>
>
> 2016-02-24 18:11 GMT+01:00 Gropp Volker <Vo...@e-velopment.de>:
>
> > Hi,
> >
> > we are upgrading our openejb-based unit-tests of a fairly large
> > JEE-app to OpenEjb 7.0.0-M1 and I noticed a very slow startup while
> > scanning all classes for Bean Validation with Hibernate Validator 5
> > 5.2.2.Final. Is there any way to limit classes/packages which are
> > scanned by Hibernate Validator or to disable it completely (in our
> > tests)? Maybe this is not a problem solely in 7.0.0-M1, but I noticed
> > it because of lot of warnings/errors while starting up the container.
> >
> > Regards,
> >
> > Volker Gropp
> >
>
RE: Hibernate Validator class scanning in OpenEjb 7.0.0-M1
Posted by Gropp Volker <Vo...@e-velopment.de>.
Hi,
thanks for the fast reply. I'm now using
<scan>
<exclude name="my.package.**"/>
</scan>
in my beans.xml, it's a lot faster. I'm also using openejb.deployments.classpath.include and openejb.deployments.classpath.exclude and I try to limit the packages by using a scan.xml (in META-INF) with only specific packages.
Older Hibernate Validator Versions (5.0.0) did not help. I still see warnings about some packages like java.util.HashMap.java.util.HashMap$TreeNode<K, V>, but maybe it's because those are used in beans? Is there any other trick to limit the scanning I might try? I could not find a nice documentation about how to configure such things. OpenEjb still mentions " openejb.deployments.package.exclude".
Regards Volker
-----Original Message-----
From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
Sent: Mittwoch, 24. Februar 2016 18:26
To: users@tomee.apache.org
Subject: Re: Hibernate Validator class scanning in OpenEjb 7.0.0-M1
Hi
if you can share some jstack dump in the "slow" period it could help to tackle that. Also maybe try previous releases - know they fixed some inheritance bugs so maybe they added some overhead by side effect. Bean validation scanning should be limited to CDI during startup so same tricks as for CDI should work.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com>
2016-02-24 18:11 GMT+01:00 Gropp Volker <Vo...@e-velopment.de>:
> Hi,
>
> we are upgrading our openejb-based unit-tests of a fairly large
> JEE-app to OpenEjb 7.0.0-M1 and I noticed a very slow startup while
> scanning all classes for Bean Validation with Hibernate Validator 5
> 5.2.2.Final. Is there any way to limit classes/packages which are
> scanned by Hibernate Validator or to disable it completely (in our
> tests)? Maybe this is not a problem solely in 7.0.0-M1, but I noticed
> it because of lot of warnings/errors while starting up the container.
>
> Regards,
>
> Volker Gropp
>
Re: Hibernate Validator class scanning in OpenEjb 7.0.0-M1
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
if you can share some jstack dump in the "slow" period it could help to
tackle that. Also maybe try previous releases - know they fixed some
inheritance bugs so maybe they added some overhead by side effect. Bean
validation scanning should be limited to CDI during startup so same tricks
as for CDI should work.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>
2016-02-24 18:11 GMT+01:00 Gropp Volker <Vo...@e-velopment.de>:
> Hi,
>
> we are upgrading our openejb-based unit-tests of a fairly large JEE-app to
> OpenEjb 7.0.0-M1 and I noticed a very slow startup while scanning all
> classes for Bean Validation with Hibernate Validator 5 5.2.2.Final. Is
> there any way to limit classes/packages which are scanned by Hibernate
> Validator or to disable it completely (in our tests)? Maybe this is not a
> problem solely in 7.0.0-M1, but I noticed it because of lot of
> warnings/errors while starting up the container.
>
> Regards,
>
> Volker Gropp
>