Monday, March 15, 2010

OpenWebBeans Apache Tomcat Support


OpenWebBeans has been integrated with Apache Tomcat 6.x Java EE servlet/jsp container. So what?
  • You can deploy your JSR-299 enabled applications(Web deployment archives that contains WEB-INF/beans.xml marker file. ) directly into Tomcat. There is no need to define "servlet context listener" in a web.xml. Tomcat integration code automatically handles all configuration.
  • You can inject JSR-299 bean instances into Java EE component types including, Servlets, Filters, Tag Handlers, Listeners, JSF Managed Beans
You can checkout trunk from "". And install it from root as "mvn install". After that do the followings
  • Add lifecycle listener to the server.xml of Tomcat. Listener class is
  • Put JSR-299 API, JSR-330 API, Interceptor 1.1 API, and openwebbeans-tomcat and openwebbeans-spi modules to the "lib" directory of the Tomcat. (You can use geronimo-specs jars for JSR-299, JSR-330 and Interceptor APIs from
  • Package your application with openwebbeans jars (Or if you use maven, just add dependency to openwebbeans-impl)
  • Enjoy!
There is an example in the samples directory :

Have a nice week;


Saturday, March 6, 2010

OpenWebBeans M4 is Released


OpenWebBeans M4 is officially released. You can download it from

OpenWebBeans main motivation is an ease of use. There are several samples in the distribution that show how to use OpenWebBeans in
  • Java EE Web Containers
  • Embeddable OpenEJB in Tomcat
  • Java SE (Standalone Swing Application)
  • With JSF 1.2 and JSF2
  • With JSF Conversation Context
  • and more...
For example, if you wish to use OpenWebBeans in a web container such as Tomcat or Jetty, just add following listener element into web.xml