Hi All,
I would like to build a Cloud based application server using Apache 
OpenWebBeans and Apache Ignite. I would like to use the OpenWebBeans JavaSE 
container to build a modular application server using CDI extensions, bean 
discovery, injection, etc. which is straight forward. However as part of the 
application jar files will be deployed to Apache Ignite and I would like to 
build a custom classloader to load and unload these applications at runtime 
similar to to Tomcat and how it deploys and undeploys web applications. My 
first thought is to build a custom application classloader that would load from 
the application jar file(s) first and then delegate to the parent class load 
which would shield access to most of the server class loader except for some 
exceptions like OpenWebBeans and API classes. However I think there are some 
challenges to this approach:
1) There would be multiple OpenWebBeans contexts, the server container and then 
multiple application containers. As long as OpenWebBeans is loaded from the 
application classloader and the CDI API is loaded at the server level and 
delegated down to the application level  there should be no container 
conflicts, right?
2) I would like to shield the server classloader as much as possible from the 
application classloader to avoid duplicate class scanning. Are there any 
OpenWebBeans properties I could set on the application WebBeansContext to 
ignore or include specific jars? Should I build my own extension of the 
ScannerService or use the org.apache.webbeans.scanExclusionPaths configuration?

3) In some cases I would like to bridge the server CDI container to the 
application CDI container to provide API implementations. For instance if there 
is an API interface called Foo with an implementation Bar both in the server 
container I would like for the application's CDI container to be aware of the 
Foo interface and have it be injectable but behind the scenes an instance in 
the server's CDI container would handle the requests. Has anything like this 
been done before? Are there any OpenWebBeans SPI interfaces that I should look 
into implementing for this bridging logic?

Thanks!
Aaron

Reply via email to