Lukasz Szymik [
https://community.jboss.org/people/lszymik] created the discussion
"Re: Readonly transactions in session beans"
To view the discussion, visit:
https://community.jboss.org/message/788709#788709
--------------------------------------------------------------
I read article about transaction pitfalls. It is very interesting. So far I know that JPA2
does not support it directly and Hibernate Session could be used directly. I have real
life scenarion where it is lot of I18N messages stored in database and there is stateless
session bean which is providing method: getMessage(int id). The getMessage method is
annotated with TransactionAttribute(REQUIRED) so read is executed inside transaction. The
messages are rarely changed so I started to look for optimalizations. Springs developers
told me to use transaction - read only. However now I am little bit confused. Maybe
removing transaction from getMessage method will be better solution.
Thanks for valueble information.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/788709#788709]
Start a new discussion in JBoss AS 7 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]