Transaction mode is not likely to help much. You can
- use tuned-updates, which keeps copies of all the field values and compares when ejbStore is called to see if a db write is necessary
-implement an isModified method in which you say whether anything changed
-in jboss 3, use the jboss.xml read-only tag, which prevents ejbStore from ever being called.
-in jboss 3, use cmp2 which does the first two choices for you automatically.
The container can't tell how much data is changing from the "getXXX" call- you could doa anything you wanted to spite the naming convention.
but anyway, what is the sense of making then bean persistent after a read operation.
To me it doesn't make any sense.
There's no way of telling the container that a getXXX() method is read-only. It's just a naming convention. Therefore for correctness the container has to play safe and sync the bean to the database.
I'll bet somewhere someone's got a method called getRidOfAttribute() !