Weblog

All | Personal | Sun
« Previous day (Nov 22, 2005) | Main | Next day (Nov 23, 2005) »
20051123 Wednesday November 23, 2005

Developing Message Driven beans in NetBeans Today, I would like to start develop application that uses MDB bean in application tier. I hope that everyone knows Message Driven beans. If not, I shortly describe it. MDB is an enetrprise bean that enables J2EE applications to process messages asynchronously. JMS API provides two different approach for messaging:
Point-to-point messaging: Each message is addressed to a specific queue, and receiving clients extract messages from the queues established to hold their messages. Queues retain all messages sent to them until the messages are consumed or until the messages expire.
Publish/Subscribe: Clients address messages to a topic, which functions somewhat like a bulletin board. Publishers and subscribers are generally anonymous and can dynamically publish or subscribe to the content hierarchy. The system takes care of distributing the messages arriving from a topic's multiple publishers to its multiple subscribers. Topics retain messages only as long as it takes to distribute them to current subscribers.
Now, we know basic approach and I will describe other terminology. We need connection factory and destination for sending/receiving messages. A connection factory is the object a client uses to create a connection to a provider. A connection factory encapsulates a set of connection configuration parameters that has been defined by an administrator JMS server. A destination is the object a client uses to specify the target of messages it produces and the source of messages it consumes. In the PTP messaging domain, destinations are called queues. In the pub/sub messaging domain, destinations are called topics.
This application will send orders from J2SE client in application tier. Order's parameters are encapsulated in Order class. The class is shared between client and EJB module, therefore creation of library module with this class is helpfulness.

Sources of the library project are avalaible here.
Let's jump in EJB module: Posted by pblaha ( Nov 23 2005, 05:47:23 PM CET ) Permalink Comments [4]

Calendar

RSS Feeds

Search

Links

Navigation

Referers

Older blog entries