> From: Stephen McConnell [mailto:[EMAIL PROTECTED]]
>
> Concerning the interface org.apache.avalon.excalibur.mpool.Pool.
>
>   1. I acquire an object
>   2. I get instance A
>   3. I acquire another object B
>   4. if A == B, and I have not released A, I presume that this
>      would constitute an illegal state
>
> Can anyone confirm this?

Yes. Pooled components are not used by more than one client at a time,
and it should be possible to grab two of them.

For example:

interface MyPooledComponent {

  /**
   * Call this one just as you obtain the component.
   */
  public void A ();

  /**
   * Must be called after A.
   */
  public void B ();

  /**
   * Must be called after B.
   */
  public void C ();
}

(In Cocoon, MyPooledComponent -> Transformer, MyPooledComponent.A ->
Transformer.setup,
so this is a real-life use case. One should be able to grab two transformers
to
create a pipeline.)

/LS


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

Reply via email to