users@glassfish.java.net

Re: mappedName inevitable in Glassfish

From: Sahoo <Sahoo_at_Sun.COM>
Date: Thu, 08 Jan 2009 18:49:46 +0530

"name" attribute can be used by clients which are packaged as part of
the same application as the EJBs. e.g., you can use it from a war if the
war and ejb-jar are part of the same ear file. To resolve an EJB which
is packaged in some other application, you need to use actual JNDI name
of the EJB which is what the mappedName corresponds to in GlassFish. You
are not forced to use mappedName. You can specify the JNDI name in
sun-ejb-jar.xml file. Similarly, in the client archive, you have to bind
the ejb-ref to the JNDI name using appropriate sun-*.xml file.

Sahoo

glassfish_at_javadesktop.org wrote:
> Hi,
>
> I have one Remote interface and two beans implementing it. The client of the Remote interface identifies the two beans only by the 'mappedName' attribute of the bean. Absence of the mappedName results in ambiguity. Usage of 'name' did not seem to add value.
>
> The EJB specification Simplified (Section 10.1.1) states that Applications that use mapped names may not be portable.
>
> Am i correct that only 'mappedName' can identify which of the bean is required by the client?
>
> How does the developer benefit by 'name' attribute?
>
> Regards,
> Rajesh
> [Message sent by forum member 'rajesh_s' (rajesh_s)]
>
> http://forums.java.net/jive/thread.jspa?messageID=324734
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>