This is not a bug :)
You should use the narrow method to do this, or you are not ejb2.0
compatible or corba to be more spesific.
Here is an example on how i would do it:
************************* SNIP START
Context ctx = new InitialContext();
MyRemoteHome home = (MyRemoteHome)
          PortableRemoteObject.narrow(ctx.lookup("java:comp/env/myserver"),
                                                 MyRemoteHome.class);
MyRemote remote = home.create(); // for session beans ofcourse :)
************************* SNIP END
This is the way you should do it....Btw to be corba aware with session beans
do a remote.remove() when done with the session bean in the client...Many
dont do this, and then they get humongus memory problems very fast
:)....remember corba dont do distributed GC like RMI does....

Now have fun!! Hope you get it working :)

Regards
Klaus Myrseth


-----Opprinnelig melding-----
Fra: Roger Vaughn [mailto:[EMAIL PROTECTED]]
Sendt: 30. januar 2001 14:47
Til: Orion-Interest
Emne: Disregard: Re: BUG: Can't cast RMI interfaces in 1.4.5


Oops.  My bad.  This isn't working under 1.3.8 either.
 I still don't know why - it's a valid cast, the class
is there, and I *compiled* with it after all.

--- Roger Vaughn <[EMAIL PROTECTED]> wrote:
> In one of my webapps, I have to do an RMI call to an
> outside RMI server.  I'm locating the server with a
> plain old traditional lookup like this:
> 
>   MyRemote server =
> (MyRemote)Naming.lookup("myserver");
> 
> But Orion 1.4.5 complains that it can't load the
> class
> MyRemote, even though it is included in my
> application
> jars in WEB-INF/lib.
> 
> This works correctly in 1.3.8.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great
> prices. 
> http://auctions.yahoo.com/
> 


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Reply via email to