dev@glassfish.java.net

Re: What is the default mapped-name, if any, for an MDB in EJB3?

From: Peter Williams <Pete.Williams_at_Sun.COM>
Date: Fri, 19 May 2006 09:52:11 -0700

Hong Zhang wrote:
> Hi, Peter
>
>>>
>>> So in your case, you would need to
>>>
>>> 1. provide mapped-name through deployment descriptor (or mappedName
>>> attribute within the @javax.ejb.MessageDriven annotation).
>>> OR
>>> 2. specify the global jndi-name in sun-ejb-jar.xml
>>>
>>> Note: when both are present, the jndi-name in sun-ejb-jar.xml
>>> overrides the value specified through mapped-name element (or the
>>> mappedName attribute).
>>
>>
>> Thanks for this information.
>>
>> I can work with this. I was hoping for a default name though :(
>> I will have to generate a jndi-name for the NetBeans user in cases
>> where they do not specify a mapped name in the MDB wizard.
>
> How would you know what jndi name to generate? In the case when there
> are multiple external jms resources, how do you determine which one is
> the one you should use?
We also generate the resource.

-Peter
>
> Thanks,
>
> - Hong
>
>> This is trivial, but if they later add a mapped name to the bean, it
>> may cause a bit of runtime confusion since they will also have to
>> manually delete the jndi-name we created for them. There is no easy
>> way to inform them about this.
>>
>
>
>> I will file a bug against the verifier then since it should have
>> flagged my lack of both mapped-name and jndi-name as an error.
>>
>> -Peter
>>
>>>
>>> You could look at this mdb dev test as an example:
>>> http://fisheye5.cenqua.com/viewrep/glassfish/appserv-tests/devtests/ejb/ejb30/hello/mdb
>>>
>>>
>>> Thanks,
>>>
>>> - Hong
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>