Hallo!
I have a stupid question:
I'm using Eclipse+Lomboz to create EJB and it creates a client this way:
CabinHomeRemote home=(CabinHomeRemote)jndiContext.lookup("CabinHomeRemote");
...
It works!
Now I'm reading a book about EJB and i read that i must write:
Object ref=(CabinHomeRemote)jndiContext.lookup("CabinHomeRemote");
CabinHomeRemote
home=(CabinHomeRemote)PortableRemoteObject.narrow(ref,CabinHomeRemote.class)
;
...
The first solution (without "narrow") it's correct?! If not, why it works
with JBoss?!
Thanx for any help!
Gio
Both are correct.
-- Juha