I am using Commons Pool and detecting some strange behavior when returning the same object two times (in some junit tests). What should be the correct behavior ?
I now signal that:
- The first returnObject returns the object to the pool and makes it idle
- The second returnObject removes the object, so it's not idle anymore.
- When I then retrieve two new objects without returning any of them, I notice that they are the same :(. I don't think this is the corect behavior, as when the code contains some bug and the same object is returned two times, the other pool code will also fail.. or not ??
Why is this ?
What I have ?:
I have a GenericKeyedObjectPool and a KeyedPoolableObjectFactory. In the factory I only implemented the makeObject method. I pass a Class as argument such that I can use only one makeObject method to create different kind of object instances.
Please some help on how to solve this ? Regards, Ed Bras
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
