Here goes my highly imaginary use case I'm going to use to demo Liberty Profile with Enterprise OSGi (OSGi Blueprint) and Java EE.
$ ./bin/server version WebSphere Application Server wlp-1.0.1.cl0120121004-1949(websphere-kernel_1.0.1) on OpenJDK 64-Bit Server VM, version 1.7.0-u10-b09-20121009
I'd like to base my web application (WAB) on services that come and go at any time while the app's running. Since a part of the web app is a servlet I use
context = new InitialContext(); Hello hello = (Hello) context.lookup( "blueprint:comp/HelloBeanBeanService"); hello.hello();
The web app uses blueprint.xml to register a reference to a service.
How should I structure the web app and the other bundles so refreshing a browser will pick up the changes in the service without restarting/redeploying the web app with the servlet?
I thought about developing an EBA with interfaces and dropping it to a shared repository. Another EBA (OSGi app?) to expose/register the service and the WAB in another EBA to use the service. Is this the way to leverage the potential of LP with Enterprise OSGi? Could you perhaps enhance the example to better suit my needs of developing a highly dynamic web app based upon OSGi services? Any help appreciated.
Japila :: verba docent, exempla trahunt