Re: AW: How to initialize a component coming from the pool?

2004-02-11 Thread Stephan Coboos
Olivier Billard wrote: Hi Stefan, I had the same pb, and I solved it the way Marco wrote, that is to say : private field : - private Connection connection; initialize (called once in the lifetime) : - get the datasource dispose (called once in the lifetime); - release the datasource recycle (

Re: AW: How to initialize a component coming from the pool?

2004-02-11 Thread Olivier Billard
Hi Stefan, I had the same pb, and I solved it the way Marco wrote, that is to say : private field : - private Connection connection; initialize (called once in the lifetime) : - get the datasource dispose (called once in the lifetime); - release the datasource recycle (called each time your co

Re: AW: How to initialize a component coming from the pool?

2004-02-10 Thread Stephan Coboos
Marco Rolappe wrote: and why isn't that possible? AFAIK implementing Poolable doesn't prevent implementing Disposable. if you implement Disposable, the component's dispose() method should get called when the pool and therefore the pooled/recycled component itself gets disposed. Hello Marco, ye

AW: How to initialize a component coming from the pool?

2004-02-10 Thread Marco Rolappe
hi stephan, > -Ursprungliche Nachricht- > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Auftrag > von Stephan Coboos > Gesendet: Dienstag, 10. Februar 2004 12:22 > An: [EMAIL PROTECTED] > Betreff: Re: AW: How to initialize a component coming from the pool? >

Re: AW: How to initialize a component coming from the pool?

2004-02-10 Thread Stephan Coboos
Marco Rolappe wrote: hi stephan, I don't know exactly your use case, but... why don't you just keep the datasource, I assume it won't change anyway. so just close the connection in recycle() Yes, this is what I'am doing. and release the data source in dispose() (i.e. implement Disposable).

AW: How to initialize a component coming from the pool?

2004-02-10 Thread Marco Rolappe
hi stephan, I don't know exactly your use case, but... why don't you just keep the datasource, I assume it won't change anyway. so just close the connection in recycle() and release the data source in dispose() (i.e. implement Disposable). in your processSomethingXY()s get the connection by using