users@glassfish.java.net

Re: howto: How can the same bean multiple times configured differently ?

From: Dies Koper <dies_at_jp.fujitsu.com>
Date: Fri, 09 Nov 2007 08:58:22 +0900

In case of MDBs with a JMS listener, that jndi-name tag is used to
specify the queue or topic name in your environment.
For the other EJBs it is used to denote the name to use to bind the
bean's remote (business) interface in the JNDI directory.

Note that MDBs do not have a business interface: clients will not try to
look it up, so MDBs do not need their name bound in the JNDI directory.

So depending on the bean type this tag is used for different purposes.


glassfish_at_javadesktop.org wrote:
> Thanks, setting the jndi-name in the sun-ejb-jar.xml resolves the name conflict for the session beans. Perfect!!!
>
> For message beans however, Dies Koper said to use jndi-name in the sun-ejb-jar.xml to specify which queue a MDB listens to. Was this incorrect?
>
> http://forums.java.net/jive/message.jspa?messageID=243964
>
> [i]<ejb>
> <ejb-name>HubToFabReceiverMDBean</ejb-name>
> <jndi-name>YourQueue</jndi-name>
> <mdb-connection-factory>[/i]
> [Message sent by forum member 'frenchdrip' (frenchdrip)]