problem with EJB-CMR access

"Storhaug, Henning" <[email protected]>
Newsgroups gmane.comp.java.tapestry.devel
Message-ID <[email protected]>
I use EJB's for persistence (CMP 2.0 with CMR). I use the Foreach component
in Tapestry to loop over a CMR collection. This seems to be working ok. 

Page A
   foreach ObjectType in CMR-collection
       viewObjectType

- viewObjectType is a self-made jwc that will access an relation in the
ObjectType-instance. E.g: objectType.getInstances().size(). getInstances()
returns a CMR-collection.

This generates an exception - "A CMR collection may only be used within the
transction in which it was created". I'm sure this is due to some
threading-problem I don't fully understand. 

Can anyone shed some light on what I'm doing wrong?


- Henning


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.