The road so far….

May 17, 2011

Integrating Apache OpenWebbeans with other frameworks

Filed under: java — Tags: — Rahul Sharma @ 9:02 pm

In my last post “Apache OWB CDI: from standalone to webapp I added a servlet over my existing RandomService. In this post I would like to expose a web-service over the same. I would update the source in the same project which was used for creating the servlet in my previous blog. For exposing the WS I would use jax-ws with Metro. Now Metro is  a third party framework, my intention here is to see how JEE6 CDI integrates with other frameworks. (more…)

Advertisements

May 15, 2011

Apache OpenWebBeans CDI, from standalone to webapp

Filed under: java — Tags: — Rahul Sharma @ 9:33 pm

In my post regarding “JEE6 : Apache OpenWebbeans” I created a standalone app that was being tested using Junit but that was not sufficient. In my this post I will extend the same application and use servlet to create a webapp that can be deployed on Tomcat 6.  The OpenWebBeans project provides a Tomcat 6 plugin that will be used here. Also in order to enable the servlet to be initialized by the ContainerLifecycle we  will be required to use the WebBeansConfigurationListener available in the openwebbeans-web project.

We already had a container in our project now if we include openwebbeans-web dependency in the project there will be one more container implementation in the project. The  ContainerLifecyle API  that we used in out Junit  would now complain as it will try to load the WebContainerLifeCycle  and that would require a ServletContext. There can be couple of ways to fix this issue. (more…)

May 14, 2011

JEE6 CDI : Using Apache OpenWebBeans

Filed under: java — Tags: — Rahul Sharma @ 7:53 pm

Past couple of weeks  I was playing with JEE6 Context and dependency injection(CDI) using the Apache OpenWebBeans implementation. My intention was  have a look at the SPI, play around with it and make it work for a few samples. I started with a simple application and tested it in standalone manner using Junit, then created a web app that deployed in Tomcat and then added a web services layer over it. Before I can go forward I need to download a an implementation of JEE6 CDI specification. I am using the Apache OWB implementation for this purpose. The OWB project released their 1.1 version few weeks back. The project uses the specs from the Apache Geromino (open src JEE server) and I believe OWB will be used in the project for its JEE6 implementation. (more…)