• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use of @EJB name and mappedName

 
Rajesh So
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Glassfish server and have deployed a bean @Stateful(name="ThePlaceOrderBean", mappedName="ThePlaceOrderBean"). The deployment is Successful.

In the Client, I have the following


When the client is run, I get a Unresolved Ejb-Ref error. That is the client is not able to pick the Remote or reach a particular Bean.

Could you please help me on how to reach the "named" beans from the Client?

Where to look at the JNDI mapping in the Glassfish server, so that we could see the key/value of beans?

What is the use of name and mappedName in @EJB?

Thanks in advance,
Raj
 
Chaminda Amarasinghe
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please help me on how to reach the "named" beans from the Client?


Seems your code is ok. post the whole code for more help

Where to look at the JNDI mapping in the Glassfish server, so that we could see the key/value of beans?


logto localhost:4848 and select the application server link in left. select jndi view on right.

also you can list the bounded jndi names using context.list method

What is the use of name and mappedName in @EJB?

name is bounded name. beanname is only valid within the application. mappedname is vendor specific. in general its not portable and dont use.



 
Rajesh So
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Chaminda.

One other link on this topic was also useful.
http://forums.sun.com/thread.jspa?threadID=5332558&tstart=15
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic