openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID (ATTCINW)" <dk0...@att.com>
Subject Impact of not using a transactional service layer in a read-only JPA application?
Date Sun, 13 Dec 2009 18:13:55 GMT
I'm constructing an application that at the present time and foreseeable
future, will just be reading from a database (Oracle) and serializing
those results to XML/JSON.  It will not be writing or modifying the
database.

I have a Controller layer, and I have a DAO layer.  I'm going to
assemble a service layer between those two, but I'm wondering whether I
should specify transactional semantics in that layer.  I can put
"readOnly" on it (using Spring's "Transactional" annotation), or perhaps
set the transaction attribute to "NOT_SUPPORTED".

I think I'd prefer to have the service layer be transactional, even if
it's only read-only, but I'm wondering what the impact will be either
way.  Will this give me overhead I don't need?  Will NOT using
transactional semantics possibly create some race condition that might
bite me somehow?

Mime
View raw message