tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Thread context class loader delegation in openEJB
Date Tue, 14 Feb 2012 13:09:29 GMT
Hi Katya,

yes it needs a validation.xml. I just added a system property
"openejb.bean-validation.provider" to specify a global provider (qualified
name as value).

If i remember we are using geronimo osgi locator/registry stuff to get
META-INF/services info.

Once again if i remember the main issues with OSGi was when we were using
the app classloader and the app was not importing anything of openejb/bval.
The goal was mainly to be able to deploy an app without needing to import
openejb (which IMHO breaks a bit OSGi but is probably more logical for an
app server)

- Romain


2012/2/14 Katya Todorova <katya.k.todorova@gmail.com>

> Hi Romain,
>
> Specifying a custom provider would require adding a validation.xml to
> every deployed app? Is this the only option?
>
> Regarding the OSGi issues, I think I'm missing something in the current
> setup:
>  - openEJB has optional imports to bval but not to META-INF/services
>  - bval declares validator provider via META-INF/services but it
> doesn't export the "package"
> If so, I don't see how openEJB would find the declared in bval
> provider. How this is supposed to work in standard OSGi environment?
>
> What kind of OSGi issues you have overcome with setting openEJB loader
> as TCCL in case of default provider?
>
> Thank you very much,
> Katya
>
>
> On Mon, Feb 13, 2012 at 7:02 PM, Romain Manni-Bucau
> <rmannibucau@gmail.com> wrote:
> > Hi Katya,
> >
> > we use this classloader when using the default provider so we want to be
> > sure it is our default provider. If you specify the provider manually we
> > are using the TCCL (line 97) so it should be ok.
> >
> > Maybe try forcing the provider...
> >
> > The reason why we resetted the classloader like this when falling back to
> > the default provider was to avoid to get OSGi issues.
> >
> > - Romain
> >
> >
> > 2012/2/13 Katya Todorova <katya.k.todorova@gmail.com>
> >
> >> Hi guys,
> >>
> >> While trying to run openEJB in OSGi, I came across an issue with
> >> validator provider detection. It turned out that
> >> org.apache.openejb.assembler.classic.ValidatorBuilder class uses its
> >> own loader to look for available providers.
> >> This causes problems when openEJB is not embedded in an application.
> >> Shouldn't the ejb container use the current TCCL (application loader)
> >> instead of resetting it to its own loader?
> >> (ValidatorBuilder#getConfig: 116)
> >>
> >> Thank you in advance for your help,
> >> Katya
> >>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message