On Nov 2, 2009, at 1:47 AM, Antonio Fornié wrote:


Hello!

I'd like to know about the real need for pooling SLSB. I think a SLSB is meant to have not shared data (not instance variables or so), it only has
methods that can be invoked from several clients at a time, right?

This is wrong. Each client gets a separate copy of the SLSB so that indeed they can have instance variables and separate requests don't interfere with each other. I won't try to comment on how useful instance variables are in an object called exactly once, but that is the design.

Whay
can't my clients shared the same object? If there's no problem in more than one thread using the same method of the same object (SLSB) at the same time,
why to have some SLSBs pooled instead of a singleton?


IIUC ejb 3.1 includes singleton ejbs.  I don't know much about them.


thanks
david jencks

I find it's necessary in cases where the SLSB has for example a DB
connection as an instance variable, that should not be used by more than one
thread at the same time, but it's only for those kinds of cases?

Thank you very much!

Antonio
--
View this message in context: 
http://old.nabble.com/The-need-for-pooling-beans-tp26156648s134p26156648.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Reply via email to