Re: Role of "READ_ONLY" transactions vs no transaction
It depends on two-three questions:
- Are you working with DB data? (Some Alfresco operations may not necessarily need to check any data managed in the DB)
- Do you need those operations to be consistent with regards to the DB state?
If all three questions are answered with yes then you should set the transaction on the web script layer. Otherwise Alfresco will automatically create small transactions when necessary, e.g. when you call services that deal with DB data (which are most of them).
I recommend always setting the transaction. It doesn't hurt performance and it is way more efficient to have one transaction than to potentially have multiple, automatically created ones.