File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Explination needed ..what's happening behind the IDE.

 
Srinivas Karthik
Greenhorn
Posts: 28
Eclipse IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,
Anyone here, Please explain me each line of code and its purpose..This is a client which tries to access the ejb bean.


Thanks in advance..
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33697
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you make a remote call to an EJB, you need to do so from a JNDI/initial context. Each app server provides certain properties for doing this lookup which is the first half of your code.


Then you have the context go into the JNDI (directory) and get the remote object. In EJB 2.1, there is an extra step where you have to get the home interface first and lookup the bean from it. In EJB 3 - which your sample is using - it looks like you get the bean directly. (I didn't know you could do this.)


Then you make your call.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic