• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Use of @EJB name and mappedName

 
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
 
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
 
Yup, yup, yup. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic