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

Narrowing of EJBObject from Handle

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you need to narrow the remote stub that is returned from the getEJBObject method in Handle? (HF page 139-144)
As I have understood things so far the reason that you need to narrowing the stub you get from a JNDI lookup is to make it castable in Java when it has gone through RMI-IIOP.
But the EJBObject you get from the getEJBObject method does not come from RMI-IIOP or is it? Will not a regular cast be enough?
/Magnus
 
Ranch Hand
Posts: 8946
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will narrow when the returned interface is not of a specific Remote type .
1. JNDI lookup of home (Object is returned).
2. Getting EJBObject from Handle (EJBObject is returned ).
3. Getting EJBHome from HomeHandle.
etc
PortableRemoteObject.narrow() is not required when the remote type is specified in the method signature For example create and finder methods

But the EJBObject you get from the getEJBObject method does not come from RMI-IIOP or is it?


Yes it is.
[ December 10, 2003: Message edited by: Pradeep Bhat ]
 
I am displeased. You are no longer allowed to read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic