Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. Java EE and Message-Driven Beans > JMS Resources in Java EE

JMS Resources in Java EE

The two JMS resources that must be obtained from the JNDI context are the JMS destination (Queue and Topic) and the JMS connection factory (TopicConnectionFactory and QueueConnectionFactory). In previous examples in this book, these resources were obtained by first getting an InitialContext to the JMS provider and then performing a lookup using the published JNDI name. Keeping with our borrower and lender example from the previous chapters, let’s assume that we have a topic connection factory defined in the Java EE application server named “TopicCF,” and a topic used to publish prices also defined in the Java EE application server named “jms/Rates.” In previous examples, the constructor of the Lender class was where we established an InitialContext and obtained the TopicConnectionFactory and Topic via a JNDI lookup:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint