David Rauschenbach wrote:
>
> >> So, what's saved by pooling?  Two newInstances() and a
> setEntityContext().
>
> Almost. Can I add a third? The load on the gc. Minimizing lots of new's is
> the name of the game in scalable Java server, right?
>
> If you don't know me, lots = billions/day! I love my job.

I used to think so too.  Now, I'm not so sure.  Certainly this doesn't seem to
have been a priority in the implementation of the base Java classes, or the
networking support, or the database support.  Look at the number of of objects
allocated in the course of a remote method call (especially using CORBA), or in
the course of a database SELECT using JDBC.  These are allocations that a
"normal" developer (one who doesn't own his or her own VM) can't avoid, meaning
that there's little impetus for such a developer to be extra-careful to minimize
the allocations he/she CAN avoid -- it just doesn't buy very much.

I now tend to think that the solution will be in the form of better object
allocation and garbage collection schemes -- generational GC's, thread-specific
heaps where possible, and so on.  If so, then special-purpose pools like the one
suggested for Entity Beans will actually end up hurting things in the long run.
                                                -Larry Allen
                                                 SilverStream Software

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