openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harald Wellmann <hwellmann...@googlemail.com>
Subject Re: Classloaders
Date Mon, 25 Jun 2012 14:47:00 GMT
Hi Mark,

hmm yes, I had thought the SingletonService might help, but I'm not
sure what it does and how to use it. What is this Object parameter in
get(Object) and getSingletonClassloader(Object)? Besides, for
overriding any SPI, the only way I've seen so far is setting a class
name in openwebbeans.properties. But this amounts to OWB calling
Class.newInstance() with a default constructor and then I can't pass
any parameters to the given service implementation.

What I'd really like to be able to do is something like
WebBeansContext.createNewContext(myClassLoader), to avoid messing
around with the TCCL...

Best regards,
Harald

2012/6/25 Mark Struberg <struberg@yahoo.de>:
> Hi Harald!
>
> By default OWB takes the TCCL (ThreadContextClassLoader) into account. An EE server (e.g.
WAS or Geronimo) could swap the SingletonService before starting up the container. But by
default each WebApp will start it's own BeanManager instance and it's own Extensions.
>
> In our production app we e.g. have all the owb, myfaces, openjpa, bval, etc jars in a
shared ClassLoader. See the shared.loader setting in ${catalina.home}/conf/catalina.properties
>
> Works superb!
>
> LieGrue,
> strub
>
>
>
>
> ----- Original Message -----
>> From: Harald Wellmann <hwellmann.de@googlemail.com>
>> To: user@openwebbeans.apache.org
>> Cc:
>> Sent: Monday, June 25, 2012 3:37 PM
>> Subject: Classloaders
>>
>> When creating multiple CDI containers from a single OpenWebBeans
>> library working with multiple classloaders in parallel, how do you
>> tell OpenWebBeans which classloader to use?
>>
>> Is there any alternative to setting the Thread Context Class Loader?
>>
>> Best regards,
>> Harald
>>

Mime
View raw message