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

question #5 p292

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
b. is true - how come? I see you can use getHandle() to get a handle but I don't see how you can use a handle to get a object ref. I know it must exist or else what good would getting a handle be. I just don't know what method you would call to convert a Handle to and Object ref.
c. is not true - why? can't I call get the object ref from findByPrimaryKey(pk) ?
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Following are the methods u can call upon in order to get Object refrences to either yr Home or yr Remote interface.
1)getHomeHandle() method in java.ejb.EJBHome interface returns a javax.ejb.Handle Object.You can call getEJBHome() method on this HomeHandle Object to get a refrence to yr Home Interface.
2)getHandle() in yr javax.ejb.EJBObject interface returns a javax.ejb.Handle Object.You can call getEJBObject() method on this Handle Object to get a refrence to yr Remote/EJBObject Interface.
Hope that was of help to you...
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic