Am 19.05.2012 14:45 schrieb "Hardy Ferentschik" <hardy@hibernate.org>:
>
>
> On May 18, 2012, at 4:38 AM, Michael Nascimento wrote:
>
> > Issues like this:
> >
> > https://hibernate.onjira.com/browse/HHH-7084
> >
> > Thread Context ClassLoader is the de facto standard these days. If we
> > choose to actually defining and allowing classloading to be
> > customized, the default must be TCCL.
>
> Funny that you that. We had just had an Hibernate Validator issue not so long ago where
> a modular system expert told us just the opposite. Don't use TCCL first ;-)
>
> I think the bottom line is that there is no standard. Checking TCCL first and then the
> current class loader was a strategy which Hibernate applied for quite some time.
> It proved to be a good approach for quite some time. However, the current trend seems to be
> to make the class loading more configurable and allow to for example pass a class loader.
Yepp, I think that's the best way.
The default behavior could be the one you describe, but if a specific classloader is configured by the user, this one should be taken to load user provided resources and classes.
AFAIK under OSGi it's not defined what CL is set as the TCCL, so one can't really rely on it there.
--Gunnar
>
> --Hardy
>
>
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev