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.
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 ...
Get Java EE 7 Development with NetBeans 8 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.