开发者

CDI/Weld with JEE5 and Tomcat6

开发者 https://www.devze.com 2023-02-07 15:54 出处:网络
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'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 shoul开发者_运维知识库d 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号