Creating JMS application using JSF and CDI beans

In this section, we will see how to create a JMS application using JSF and Component Dependency Injection (CDI) beans. With CDI beans, we can reduce the code that we wrote using JMS APIs, because we can use annotations to inject objects such as the JMS connection factory, queue, and topic. Once we obtain references to these objects, the steps to send or receive data are the same as those discussed in the previous section. Therefore, our examples in this section do not list the entire code. For the complete source code, download the source code for this chapter.

To prepare our project for using JSF, we need to create web.xml and add the JSF servlet definition and mapping in it. Right-click on ...

Get Java EE 8 Development with Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.