-
1. Re: EJBException: CMR field value is already loaded
godboles Oct 14, 2004 2:22 PM (in response to godboles)Hi all,
After waiting for the jboss support to response, (no one did), I out of desperation looked at the jboss code. The class in question is
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge
This class has a method called loadRelations which throws the above exception as follows:
public void loadRelations(Collection values)
{
if(isLoaded)
throw new EJBException("CMR field value is already loaded");
}
I noticed that this exception is thrown when the relation is already loaded. So, I experimented with the following change:
public void loadRelations(Collection values)
{
if(isLoaded)
return;
}
Instead of throwing exception, I just return. I ran my stress test again and it ran like a charm without a problem.
I hope that the CMP team can have a look at this and let me know if this will have any serious side effects. So far, I have not some across any.
I know this is a bad thing to do (changing server code). But I pretty much tried every other way possible....
HG -
2. Re: EJBException: CMR field value is already loaded
akuehne Apr 7, 2006 5:08 AM (in response to godboles)I do suffer from this problem, too.
Is there any progress seen here in the meantime ?
I would agree that just returning instead of throwing an Exception is kind of hack. The problem I guess is the unsynchronized use of the 'isLoaded' flag.
In my application the Exceptions usually occurs with two MDBs working with the same entity beans in parallel. Maybe there is a unsuffient isolation of contexts ??
Any ideas welcome ..