• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is the naming convention of JNDI for EJB 2.1 based component in Glassfish

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I'm using GlassFish V3.0 and working on a very simple stateless session bean example and I my ejb-jar.xml is as follows



In my stand alone client, I tried to lookup for the home as below


I did not setup properties for JNDI server and port as this link, does say "its not required".

I have the interfaces of the package org.ejb.session.interfaces, jar'ed and added to my client class path and also have gf-client.jar in the classpath, again as mentioned in the above link.

My above setup did not work, and returned me javax.naming.NamingException (caused by Caused by: javax.naming.NameNotFoundException: HelloWorld not found).

Then I did asadmin list-jndi-entries from my glassfish installation and found that the JNDI name is actually org.ejb.session.interfaces.HelloWorldHome. So I changed my lookup to use the above reference and it worked.

My question here is, I thought ejb-name in deployment descriptor would be used in JNDI lookup. Did I miss any other file? I knew that, I did not use any container specific configuration file, but I thought GlassFish provides one by default. So is the default setting of GlassFish is to use the entire home object including the package.

Thanks
Rajani
 
Rajani Gummadi
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any advice on this.
reply
    Bookmark Topic Watch Topic
  • New Topic