It is in the spec. It would be easy to support iterating outside of the spec, but you would get an inconsistent database on a writeable database.

-dain

Herve Tchepannou wrote:
Is this a requirement of EJB standard or just due to JBoss implementation?

-----Original Message-----
From: julien viet [mailto:julien_viet@;yahoo.fr]
Sent: Tuesday, November 05, 2002 6:16 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Does CMR Collections have to be accessed
(iterated) inside a transaction?


yes they have.

 --- Victor Batista
<[EMAIL PROTECTED]> a écrit : > Hello!
 >       I am developing two entity beans which have a
 > relatinship 1-N (One User can
 > have Many Roles).
 >       I have also a Facade session bean to handle the
 > business operations. I have
 > declared the Transaction property of my beans
 > (Entity and session) as
 > "Supports". The methods which insert or update data
 > are declared as
 > "Required". I don't want read-only operations to be
 > executed inside
 > transactions.
 >       I have one method (getUser) which returns a VO with
 > the User data and calls
 > the relation method (getRoles() which returns a
 > Collection of Roles). As
 > this is a read operation, I don't want a transaction
 > to handle this method.
 > Although I am having one exception when I try to
 > iterate the list of roles
 > returned by the getRoles method
 >
 >
 >       java.lang.IllegalStateException: A CMR collection
 > may only be used within
 > the transction in which it was created
 >
 >
 >       Does CMR collections have to be accessed inside
 > transactions?
 >
 >       Thanks in advance,
 >               Victor Batista
 >
 >
 >
 >
 >
 >
-------------------------------------------------------
 > This sf.net email is sponsored by: See the NEW Palm
 > Tungsten T handheld. Power & Color in a compact
 > size!
 >
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
 > _______________________________________________
 > JBoss-user mailing list
 > [EMAIL PROTECTED]
 >
https://lists.sourceforge.net/lists/listinfo/jboss-user

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--
xxxxxxxxxxxxxxxxxxxxxxxx
Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to