O'Reilly logo

Java EE 7 Development with NetBeans 8 by David R. Heffelfinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing a JMS message producer

In this section, we will develop a simple JSF application. One of the CDI managed beans in our application will produce a JMS message and send it to the queue we configured in the previous section.

Let's create a new Java class named JmsMessageModel. This class will store the message text that will be sent to the queue.

Implementing a JMS message producer

We should then annotate the class with the @Named annotation to make the class a CDI named bean. We should also annotate the class with the @RequestScoped annotation to give it a scope of request.

We should add a private variable named msgText of type String, along with its corresponding getter and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required