You would get ClassCastExceptions (I think).

Orion does not use RMI over IIOP so the old method will work, but will not
necessarily be portable to all app servers (including the J2EE).

Dave Smith
Senior Team Leader
Aristocrat Technologies Australia Pty Ltd

mailto:[EMAIL PROTECTED]


-----Original Message-----
From: Joel Shellman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 27 July 2000 9:51
To: Orion-Interest
Subject: Re: Getting remote objects


Does anyone know what problems could occur if you used the old method?
What symptoms would we see if we were using the old method, but it
wasn't working?

Thanks,
-- 
Joel Shellman
Chief Software Architect
The virally-driven B2B marketplace for outsourcing projects
http://www.ants.com/90589781


Dave Smith wrote:
> 
> These are not exclusive, they are both required:
> 
>  Context context = new InitialContext();
>  MyHome mh = (MyHome)javax.rmi.PortableRemoteObject.narrow(
> context.lookup("HomeName"), MyHome.class);
> 
> It used to be permissible to just do
> 
> MyHome th = (MyHome)context.lookup("HomeName");
> 
> but the advent of RMI-IIOP made this extra narrowing step necessary. You
may
> find that EJB servers that do not use RMI over IIOP will work with the old
> (brief) method, but protect yourself by using the narrowing step for all
> remote objects as well.
> 
> Dave Smith
> Senior Team Leader
> Aristocrat Technologies Australia Pty Ltd

Reply via email to