Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jndi lookup  RSS feed

 
vijay ks
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
 
Rahul Bhattacharjee
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!