Hi Jonathan,
That is a very unfortuate disparity, that my application with my current
implementations will loadbalance on one vendor server but not on another!
Perhaps the best vendor implementation is to have global loadbalancing, i.e.
all clusterable stubs (JNDI Contexts, EJBHomes, stateles EJBObjects)
register to a container-singleton LoadBalanceRegistry. Then loadbalancing
can occur either on a per-stub-type basis, or
per-request-regardless-of-stub-type basis.
What do you think?
Gene
-----Original Message-----
From: Jonathan K. Weedon
To: [EMAIL PROTECTED]
Sent: 5/25/01 10:56 AM
Subject: Re: Are home interface references thread-safe?
Gene,
That's one of the awkwardness of EJB, that the behavior of
load-balancing is
unspecified. So, for example, while for some vendors load-balancing
only works
if you reuse the same EJBHome, for other vendors, load-balancing will
not work
if you reuse the same home. For example, with some products, load
balancing
occurs in the naming service.
I'm not trying to start a debate as to which model is correct (they both
have
benefits). I am just pointing out the annoying fact that when it comes
to features
above and beyond the EJB spec (such as LB), you may have to write your
application differently depending on the target server. Again, it's
awkward,
but that's how it is...
-jkw
Gene Chuang wrote:
> Yes and yes. Not only should you cache them for obvious performance
and
> convenience reasons, but for some vendors, loadbalancing will NOT work
> unless you reuse the same EJBHome!
>
> Gene
>
> -----Original Message-----
> From: Bryan Field-Elliot
> To: [EMAIL PROTECTED]
> Sent: 5/25/01 6:42 AM
> Subject: Are home interface references thread-safe?
>
> I have a question about EJB home interface references, specifically
> about caching and re-using them:
>
> My "client" is a web application (servlet based), with many
simultaneous
> users.
>
> Are they (home interface references) thread-safe? Can I do a home
> interface lookup at initialization time (as a singleton), and reuse it
> for each simultaneous user in my servlet?
>
> Thanks,
>
> Bryan
========================================================================
===
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".