Hey

Chuck Zheng wrote:
> I know this is an implementation specific question.  But I am interested
> in knowing what strategies vendors are using to minimize resoruce
> consumption therefore improve scalability.

Yup, this is very implementation specific.

> EJB spec describ how to perform bean pooling/swapping.  But it seems to me
> that if there is a reference to EJBHome/EJBObject, then you will have
> one corresponding object running.  So for 1000 concurrent users, there
> will be 1000+ EJBHome/EJBObject object on server although most of them
> idle, while we may only have 100 bean instances or so doing real work.
> If a client exits or crashes, its corresponding EJBHome/EJBObject object
> will be gc-ed.  Is this understanding correct?  How expensive are to keep
> those EJBHome/EJBObject objects around (compared with bean instance?)

If you follow the spec word by word, then the above is correct. For
example, if you do a find on a EntityBean and you get 1000 or so back,
then if the implementor followed the spec literally it would create 1000
EJBObjects.

I'm fiddling with an approach that instead uses 1 (one) EJBHome and 1
(one) EJBObject per bean. If you think 5 minutes about it is is not that
hard to figure out how to do it, and it is *much* more efficient IMHO
than the brute force method. In this case you would never have to worry
about DGC or such issues, because you would never have idle EJBObjects
around. A nice sideeffect is that you can entirely skip the "create
container-specific EJBObject implementations"-phase.

But that's just me, and I'm only a CS student doing it for fun. ;-)

> I thought there were some discussion touching this topic on the list,
> and I just could not find it any more.

Well, this list is indeed more focused on app design issues, and spec
interpretations, simply because the vendors want to compete about
implementations so these kinds of topics are seldom touched. I'm glad
you brought it up though. A good brain teaser is always welcome 8-)

/Rickard

--
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684

===========================================================================
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".

Reply via email to