Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

is it neccassary to narrow the object

843829Apr 3 2004 — edited Apr 5 2004
hi
in client side i have written like this;

ctx = new InitialContext(ht);
java.lang.Object obj = ctx.lookup("RemoteCabinHome");
CabinHome home = (CabinHome) PortableRemoteObject.narrow(obj, CabinHome.class);

Why did we write narrow () method in EJB? Is it necessary to write?what PortableRemoteObject will do here?

can't we write directly like this?

ctx = new InitialContext(ht);
CabinHome home = (CabinHome) ctx.lookup("RemoteCabinHome");


bye
chaitanya

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2004
Added on Apr 3 2004
2 comments
109 views