Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

jndi lookup

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i am tested the AdivceBean in RI from HeadFirstEJB
For this we created a NJDI name for the Bean , but
in the lookup process the client getting a HoemOBject, i am getting confusion, registering a bean, but getting ahome object.
How this can happen, any body could let me know
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
During deployment when you give the JNDI name , its for the server to register the stub of the class that the server creates by implementing the home interface.
So that the client call lookup this using the JNDI name.
 
vijay ks
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, in that case i am also loading all the 3 (2 interface, 1bean) using RI, then y not i can give the JNDI name for home interface.so that the server can use it to register the Home stub class at run time.( but i am giving the bean a JDNI name , it is misleading somewhat)Is ther any issues if i register the home interface(i guess interface we cannot register, at least the refernce variable can point at runtime the stub object)
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by vijay ks:
ok, in that case i am also loading all the 3 (2 interface, 1bean) using RI, then y not i can give the JNDI name for home interface.so that the server can use it to register the Home stub class at run time.( but i am giving the bean a JDNI name , it is misleading somewhat)Is ther any issues if i register the home interface(i guess interface we cannot register, at least the refernce variable can point at runtime the stub object)



First of all the server register the home stub during deploytime.
While deploying the EJB , I do not think that you get any option to register the home interface.Its done by the application server.You just need to specify the JNDI name for your bean.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!