Java Reference
In-Depth Information
When working with JMS in NetBeans, we need to create an Enterprise Application
project. Additionally, when using GlassFish, the necessary JMS resources such as
JMS destinations and connection factories can be created directly in NetBeans.
Creating the Project and JMS Resources
In order to take advantage of JMS, we need to create an Enterprise Application
project, as usual.
In our example, we will be adding an EJB module and an Application Client module.
Any type of Java EE module can be a JMS message producer and/or
consumer by simply invoking methods from the JMS API. We chose
to create an EJB module, since, later in the chapter, we will be creating
a Message Driven Bean (MDB), which is a type of EJB. We chose an
application client since it is one of the simplest modules that can be added
to an enterprise application, allowing us to focus on JMS code without
having to worry about writing lots of extraneous code. However, in real
applications, it is common to have web applications or Session Beans act
as JMS message producers, with an MDB acting as the consumer.
 
Search WWH ::




Custom Search