Friday, June 11, 2010

OpenWebBeans Tomcat 7 Support

Hello;

As you may have already know, Apache Tomcat has been creating release candidates for Apache Tomcat 7 that implements the Java EE 6 Servlet, JSP, EL specifications.

Now, Apache OpenWebBeans supports Apache Tomcat 7. How could you write a JSR-299 based applications using Apache Tomcat 7?

1- Checkout http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_0_RC4/ and run "ant" in trunk

2- Add following jars into tomcat "lib" folder
  • geronimo-atinject_1.0_spec-1.0.jar
  • geronimo-interceptor_1.1_spec-1.0.jar
  • geronimo-jcdi_1.0_spec-1.0.jar
  • openwebbeans-spi-1.0.0-SNAPSHOT.jar
  • openwebbeans-tomcat7-1.0.0-SNAPSHOT.jar
 3- Add the following entry to "conf/server.xml"
  •  <Listener className="org.apache.webbeans.web.tomcat.ContextLifecycleListener" />
4- Write your JSR-299 application
   
      Example Project :
That is it! Run tomcat!

If you have any questions, drop an email into our user or development forms.

PS : We will publish our first 1.0.0 branch relesase canidate this week! Stay tune!

2 comments:

Patrik Varga said...

Hi Gurkan!

Thanks for the description.
However I should notice that I needed some more jar files for OWB to work, specifically:
- the openwebbeans-impl (which is quite understandable),
- furthermore a scannontation and a javassist jar (which are not included in Tomcat 7), although the OWB "Project Dependencies" page says that "There are no dependencies for this project."

Regards,
Patrik

Gurkan Erdogdu said...

You are right, thanks for your observation