Q1: | What are the major differences between Message-driven beans and Entity or Session beans? |
A1: | Message-driven beans have no client interface; they have no Home, Local, or Remote interfaces—their methods cannot be called directly. Message-driven beans exist only to consume JMS messages and are controlled by the container. They are anonymous and are called asynchronously. They do not have a passive state. They have no client security context. |
Q2: | What are the two interfaces a Message-driven bean must implement? |
A2: | The javax.ejb.MessageDrivenBean interface and the javax.jms.MessageListener interface. |
Q3: | What is the Method Ready Pool? |
A3: | The Method Ready Pool is the collection of Message-driven bean instances that are available in the container to consume JMS messages. |
Q4: | How can I associate a Message-driven bean with a queue or a topic? |
A4: | A queue or topic is associated with a Message-driven bean at deploy time. The queue or topic must have already been registered with the J2EE system. |
18.191.254.44