all inline

> -----Original Message-----
> From: Curt Smith [mailto:[EMAIL PROTECTED]]
> Sent: Martes, 04 de Septiembre de 2001 10:08
> To: Orion-Interest
> Subject: RE: Shared SB reference in Web tier business delegate??
> 
> 
> I didn't clearly state my architectural question:
> 
> What's the view on sharing a single remote SB interface among
> all servlet threads?  I.E. a single Business Delegate in the 
> ServletContext (as apposed to bloating out the Session).

Would work but... (continues below)
> 
> I've not read clear EJB spec / book statements regarding 
> sharing SB or 
> Entity remote interfaces?
It's the container resposability to do it. I can (as will you) enumerate
a number of reasons why not taking into your own hands somebody's else job. 
> 
> For SB's this should be perfectly ok since the container delagates
> methods to bean instances, it should not mater whether it's via a 
> single remote interface or separate?
Shouldn't, specially in a pure Java App server (and that's one of the things
I like 'bout orion
you can tweak it)
> 
> Threaded access to a single Entity might be a problem if reentrant
> is set to false.  I would still believe that the container should
> simply queue methods against the Entity in that case.
And here's the main reason for my objections. The server does queue
transactions fired upon the same stub.
Clearly, this is very bad if you have a SFSB, but even in the SLSB case, it
will _eventually_ clog up the 
server in a domino effect.

Two requests arrive, only the first is attended:

R1--->--->SLSB
R2--->blocks

Now, the server serves R2, which was blocked, but in the mean time, two more
requests arrive.

R1: Finished.
R2--->--->SLSB
R3--->blocks
R4--->blocks

If stressed, the server eventually comes to a halt.

What happens if you let the container manage the instances? Let's suppose
you set the pool size to 1.

R1--->--->SLSB1 (pool instance)
R2--->--->SLSB2 (new instance)

and then,
SLSB1--->pool
SLSB1--->gc
R1: Finished
R2: Finished.
R1--->--->SLSB1 (pool instance)
R2--->--->SLSB3 (new instance)

And there starts the deployer's job, tweaking the pool size for maximun
performance.
> 
> Thanks for you opinions on the shared reference issue.

Just my 2c,

Juan Pablo

Reply via email to