• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic