• 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

Why dont we need to narrow the EJBObject stub reference

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

With remote client view we need to narrow the remote home stub reference we retrieve from JNDI.

But when we retrieve the EJBObject stub reference by invoking a create () on the remote home object we never do a narrow on the EJBObject stub reference we receive.

Can somebody explain this. Why we need narrowing on a remote home stub reference but not on the remote ejbobject stub reference

Bye
Manish
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Becoz in case of EJBHome Narrowing what u r narrowing is a object of java.lang.Object and u r not sure what Object that might be in case of IIOP where interaction might be between Objects of diffrent Languages.
Where as in case of the EJBObject u dont need a narrow as u r already aware what u will get back i.e a object of the type of yr Remote Interface and not just java.lang.Object.

Hope it helps...
 
manish ahuja
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Rajnish

Thanx for your response. I am still not getting this. When we say that the home object stub reference is not the same as the home interface which we want to cast to because of the IIOP wire protocol embellishes that object & hence narrowing is required.

So to my understanding the same rule even will even apply for an EJBObject stub reference. Even the EJBObject retrieved will pass through the same IIOP wire protocol. So how come that is exempt from narrowing.

When you say here
***********************
Where as in case of the EJBObject u dont need a narrow as u r already aware what u will get back i.e a object of the type of yr Remote Interface and not just java.lang.Object.
************************

even in case of EJBHome we know that the object reference we get back is a kind of our Remote Home interface but thats not the case as IIOP is in picture. So the same rule should be applicable to teh EJBObject reference also

Kindly ellaborate


Bye
Manish
 
Look! I laid an egg! Why does it smell like that? Tiny ad, does this smell weird to you?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic