Jon Onstott
Jon Onstott

Reputation: 13727

CDI/Weld with JEE5 and Tomcat6

I'm working on a web application that is Java EE 5. I may be able to upgrade it to EE 6 at some point, but can't at the moment. The web app is running in Tomcat 6. Can I use CDI with it?

I noticed in the Weld documentation that there is a note that I can't use session beans:

There is a major limitation to using a servlet container. Weld doesn't support deploying session beans, injection using @EJB or @PersistenceContext, or using transactional events in servlet containers. For enterprise features such as these, you should really be looking at a Java EE application server.

Does this mean I can't use the @SessionScoped annotation? If so, that would be a show-stopper for using CDI at the moment.

Any thoughts? Thanks.

Upvotes: 1

Views: 1217

Answers (1)

Bozho
Bozho

Reputation: 597234

This is about EJB session beans. You can use CDI with JSF in tomcat 6. Just follow the installation instructions for Weld.

Upvotes: 2

Related Questions