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

Difference between Lookup and Import

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, all
In petStore, Sun let the session bean to look up the DAOS, in my opinion, the difference of lookup and import is that if the daos and ejbs will be put on one server machine or not. Am I right? Cause Lookup waster much more time than import, so I if I just put the ejbs and daos into one server machine, it is not necessary to look up daos or such resource, am I right?
 
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, when we perform the lookup then actually the object is looked up in JNDI tree and compare to imports it offcourse takes much time.
Though I am not sure but In remote machine we must bind it to JNDI tree.
Rashid
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
Actually import and Lookup r altogether different .
import, we use in our java program to make the class files avilable to the appln for eg if we r using Date class of the util package then we need to write the full name including package i.e java.util.Date wherever we r using Date object it,or just import the file once and use Date later in the program.
while lookup is the method of the initial context which provides a way to find the object bind to the name which is passed as a parameter. And the object which is returned is basically the stub of the remote object.Generally used in client server technology to make the object location transparent.
regards
Subhash
 
reply
    Bookmark Topic Watch Topic
  • New Topic