When developing message driven beans, we use @ActivationConfigProperty
annotations to specify the acknowledge mode of the bean (see explanation in the
previous section). The destination type of the JMS destination the bean is assigned
to, can be javax.jms.Queue when using point to point messaging domain, or
javax.jms.Topic when using the publish/subscribe messaging domain.
In addition to the annotations, we should also notice that the generated message
driven bean implements javax.jms.MessageListener , which has a single method,
onMessage() , all message driven beans must implement this interface.
In this chapter we covered how to develop messaging applications using the JMS
API with NetBeans. We talked about how to configure the application server by
adding JMS resources directly from NetBeans. We also covered how NetBeans can
generate most of the code necessary to send a JMS message, leaving the application
developers to simply "ill in the blanks", and write only the business logic part that
is specific to our application. Similarly, we covered how NetBeans can generate most
of the code necessary to receive a JMS message from a Message Driven Bean, again
leaving only the business logic part of our application to be written by hand.