Not precisely; you can write code to require a local vs. distributed bean
reference, and the container must comply, but given a reference to a remote
interface, the other side of which is a bean, as in:
MyBeanIntf mbi = ctx.lookup("somebeanname");
// is mbi local or remote?
there's no spec-supported way to tell.
If you know your target vendor, and you do some spelunking, you might look
at the actual object on the other side of the reference (via
mbi.getClass().getName()) and see if you can deduce some hints about whether
its remote or not (as in, if the actual object's classname is "MyBeanProxy"
or "abbcd1123_MyBeanItf", it's probably remote), but that's completely
nonstandard and wouldn't hold up in another vendor's implementation.
Ted Neward
{.NET || Java} Course Author & Instructor, DevelopMentor
(http://www.develop.com)
http://www.javageeks.com/tneward
http://www.clrgeeks.com/tneward
----- Original Message -----
From: "daniel legziel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 09, 2002 1:47 PM
Subject: [EJB-INT] location transparancy
> Hello Fellows,
>
> my question:
>
> If location transparancy will not allow me to check if the object I am
> targeting is in my partition, is there a way to query the object directory
> anyway to get that info so that I can code a condition on either a remote
or
> local invocation?
>
> Thank's
>
> Daniel
>
> _________________________________________________________________
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".