-
1. Re: The iterator of a CMR collection may only be used within
zarni Nov 19, 2002 4:31 PM (in response to erikture)I have a similar problem.
I have a collection of beans that has a cmr field. If i try to iterate over the cmr field i get this error, but only in JBoss 3.0.4...
original exception as thrown by jboss
>java.lang.IllegalStateException: A CMR collection may only >be used within the transction in which it was created
If I use JBoss3.0.0 this exception is not thrown.
here's an example of what I'm doing...
let's say Item is the bean i'm iterating over and while iterating I call a CMR get method:
ArrayList relatedBeans = new ArrayList( Item.getCMRbeans );
this work's fine but when I try to iterate over this new collection and do some get methods on it I get that ugly exception.
Maybe it's just JBoss 3.0.4 making the problem...
I don't know...
Someone please help.
zarni
oh... and by the way transction should be transaction!!!!
:-) never mind, I like such errors, reminds me on Microzoft