Programming Using the PTP Model

Every PTP messaging application follows the same basic pattern to connect to a queue, send or receive messages from the queue, and to close the queue connections. The basic PTP messaging client program development, as seen in earlier chapters, is as follows:

  • Obtain a queue connection factory through JNDI lookup

  • Obtain a queue through JNDI lookup

  • Create a queue connection from the queue connection factory

  • Use the queue connection to create the queue session

  • Decide whether to create a queue sender or a queue receiver

  • Start the queue connection

  • Send or receive messages

  • Close the queue session and queue connection

As we have covered the basics of PTP programming in 3, in this section, we will see how to implement a real-world messaging application using the PTP messaging model.



Professional JMS
Professional JMS
ISBN: 1861004931
EAN: 2147483647
Year: 2000
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net