Hi Sven,

I don't know if your problem rely on a concurrency problem. Between rc4 and rc5 I changed handling of DB resources in RsIterator class.
Now OJB is very strict in closing used resources. All resources will be released when
- PB instance was closed
- PB commit call is done
- PB abort call is done
This helps to avoid abandoned Statement/ResultSet instances.


> org.apache.ojb.broker.PersistenceBrokerException:
> org.apache.ojb.broker.accesslayer.RsIterator$ResourceClosedException:
> Resources no longer reachable, RsIterator will be automatic cleaned up
> on PB.close/.commitTransaction/.abortTransaction

The exception says that OJB has already closed the DB resources used by the Iterator, e.g. one of the three events described above occur.

Can you post the source code or some pseudo code where the exception arise?

regards,
Armin


Sven Efftinge wrote:
Hi,
I just got some errors when using/retrieving the same persistentobjects in multiple threads (request cause it's a webapp).
I tried many different configurations for class-descriptor, reference-descriptor, ... but the problem was still there.
At the moment I only have proxy="dynamic" specified all other attributes are set to default.
I only have the problem with OJB RC5. RC4 works fine.


This is a sequence from the stacktraces:

Caused by: org.apache.ojb.broker.PersistenceBrokerException: org.apache.ojb.broker.PersistenceBrokerException: org.apache.ojb.broker.accesslayer.RsIterator$ResourceClosedException: Resources no longer reachable, RsIterator will be automatic cleaned up on PB.close/.commitTransaction/.abortTransaction
at org.apache.ojb.broker.accesslayer.IndirectionHandler.materializeSubject(Unknown Source)
at org.apache.ojb.broker.accesslayer.IndirectionHandler.getRealSubject(Unknown Source)
... 33 more
Caused by: org.apache.ojb.broker.PersistenceBrokerException: org.apache.ojb.broker.accesslayer.RsIterator$ResourceClosedException: Resources no longer reachable, RsIterator will be automatic cleaned up on PB.close/.commitTransaction/.abortTransaction
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.accesslayer.BasePrefetcher.prefetchRelationship(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker$PBPrefetchingListener.prefetch(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker$PBMaterializationListener.beforeMaterialization(Unknown Source)
at org.apache.ojb.broker.accesslayer.IndirectionHandler.beforeMaterialization(Unknown Source)
... 35 more
Caused by: org.apache.ojb.broker.accesslayer.RsIterator$ResourceClosedException: Resources no longer reachable, RsIterator will be automatic cleaned up on PB.close/.commitTransaction/.abortTransaction
at org.apache.ojb.broker.accesslayer.RsIterator.getRsAndStmt(Unknown Source)
at org.apache.ojb.broker.accesslayer.RsIterator.hasNext(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown Source)
... 42 more


Does this has to do with the "prefetch and autoRetreive"-problem discussed on this list in november?

regards,
Sven

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






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



Reply via email to