• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mdb destination-type Pg 449.

 
Arun
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
In reference to the following snippet found in the DD:
<message-driven-destination>
<destination-type>javax.jms.Topic</destination>
</message-driven-destination>

Why does the bean provider have to tell the bean deployer the destination-type to which the bean is listening for? Is there some coding in the bean that relies on the destination type? All the bean will be concerned about is that it get's a message. The message producer will have to be concerned about whether to send a message to a topic or queue, not the listener(bean).

Am i missing something?
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, the bean code is the same for messages coming from a Topic or Queue. But the bigger picture is that the app will not work unless the bean is bound to a specific Topic or Queue. So, the container has to be told about this so that the binding can be done on server startup or deployment.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic