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

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: 8945
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 ]
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic