hi paul,

i think this problem should disappear when usinf proxy-prefetching-limit = 0.
see QueryReferenceBroker#retrieveCollection

...

if (prefetchProxies && (m_retrievalTasks != null)
&& (cds.getProxyPrefetchingLimit() > 0) <<<<<<
&& (cds.getQueryCustomizer() == null)
&& (ProxyHelper.isCollectionProxy(value)))
{
if (addRetrievalTask(obj, cds))
{
new PBCollectionProxyListener(obj,
m_retrievalTasks, cds, cds.getProxyPrefetchingLimit());
}
}
...


but imo this is not the way to do it. i assume that that class-cast-exception occurs when casing to CollectionProxyDefaultImpl:

protected void addThisListenerTo(Object owner)
{
PersistentField collectionField =
((CollectionDescriptor) _key).getPersistentField();
_listenedCollection = (CollectionProxyDefaultImpl) collectionField.get(owner); <<<<<<<
_listenedCollection.addListener(this);
}


can you confirm this ? what class is returned by collectionField.get(owner) ?

jakob

Nase, Paul R. schrieb:
We are currently on OJB RC6 and cannot move to OJB 1.0 at this time due to product 
release schedules.  During multi-user/load testing, we occasionally see the following 
ClassCastException occurring:

Caused by: java.lang.ClassCastException
        at 
org.apache.ojb.broker.core.QueryReferenceBroker$PBCollectionProxyListener.addThisListenerTo(QueryReferenceBroker.java:835)
        at 
org.apache.ojb.broker.core.QueryReferenceBroker$PBPrefetchingListener.<init>(QueryReferenceBroker.java:757)
        at 
org.apache.ojb.broker.core.QueryReferenceBroker$PBCollectionProxyListener.<init>(QueryReferenceBroker.java:828)
        at 
org.apache.ojb.broker.core.QueryReferenceBroker.retrieveCollection(QueryReferenceBroker.java:510)
        at 
org.apache.ojb.broker.core.QueryReferenceBroker.retrieveCollections(QueryReferenceBroker.java:656)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(PersistenceBrokerImpl.java:1291)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.doGetObjectByIdentity(PersistenceBrokerImpl.java:1371)
        at 
org.apache.ojb.broker.core.QueryReferenceBroker.retrieveReference(QueryReferenceBroker.java:309)
        at 
org.apache.ojb.broker.core.QueryReferenceBroker.retrieveReferences(QueryReferenceBroker.java:361)
        at 
org.apache.ojb.broker.accesslayer.RsIterator.getObjectFromResultSet(RsIterator.java:472)

From past postings, it appears that this could eliminated by setting proxy-prefetching-limit to 0. Could someone confirm if this is a correct resolution for these errors and also give me an idea of how this may impact our current performance?

Thanks in advance,

Paul

---------------------------------------------------------------------
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