• 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

JNDI Name in EJB3

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My query is how and where to specify the JNDI Name while creating EJB3 ? I know in EJB3 , we dont have necessarily ejb-jar.xml.

I tried following:-
Defining global jndi name using mappedName attribute in @Stateless annonation. However when i'm running Test client ,I'm getting :-
javax.naming.NameNotFoundException: Unable to resolve 'CalculatorService'. exception


I'm created and deployed Stateless Session EJB3.0 Bean
Bean class is as follows


Many thanks in advance,
Somesh
 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be someting like mappedName#

a proper google search under Oracle weblogic forums , will find you a solution .
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Somesh Rathi,

In EJB 3.0, JNDI names depend on the Application Server.
Weblogic builds global JNDI names for EJB remote references as follows:

mappedName\#interfacepackage.CalculatorRemote

interfacepackage: the package of CalculatorRemote

You can check this out by accessing Weblogic Admin Console (search for something like: Environment->Server->View JNDI Tree)


The name of EJB local references is defined in deployment descriptors (web.xml and ejb-jar.xml).

Anyway, if you do not want to use lookup explicitly, you could use the @EJB annotation.


Hope this helps,

Manuel
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic