• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling local Session beans without JNDI

 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys !

I was jus wondering if I can call Local Entity/Session bean from another session bean without doing the lookup as they are on the same JVM.

Cheers,
Rahul
[ June 27, 2005: Message edited by: Rahul Juneja ]
 
Annie Smith
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although it intuitively seems that an enterprise bean should know another one residing on the same server, it doesn't really hold true. An enterprise bean or for that matter, any server object, is not suppose to know the storage structure/mechanism. That's where JNDI comes in the picture. Even for local objects, there has to be a lookup mechanism as for any server object. So, you couldn't just get away from JNDI.
 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Annie,

I am not sure about this. Have u tried that, I mean have u experienced that in past.

Cheers,
Rahul
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahul,
If you try to access the EJB without using the JNDI, you won't get the services provided by the container. You can call it as regular code, but that misses the point of EJBs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic