----- Original Message -----
From: "yangjs" <[EMAIL PROTECTED]>
To: "Turbine JCS Users List" <[EMAIL PROTECTED]>
Sent: Sunday, September 01, 2002 9:23 PM
Subject: Re: "cache" and "pool"


>
> Thanks james for good ideas,about pool and cache discuss is infrequently.
>  it can say:
>     Object pooling is exclusive access.
>     pooled Object is not thread safe
> and cache is reverse .

Not necessarily,EJB stateless Session beans are pooled and thread safe in a
sense, in that the EJB container maintains a pool of them and only a single
thread is allowed access.

I would think that the best definition is this:

1. Pooled objects are objects that are expensive to create, they are utility
objects that are used and reused. Because they are utility objects intended
for exclusive use in a thread, they need not be synchronized.

2. Cache objects are objects that represent state that must be shared across
accesses (i.e. across client objects, threads, JVMs, machines, etc. Because
they represent state, they must be synchronized.



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to