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;


No comments: