java - How do i properly cache common objects / entities when using JPA? -
i have web app needs load rows tables in database objects re-used in various places within application.
for instance, might retrieve list of locations change infrequently, want store in memory quicker access later on.
next, in future request, want associate 1 of these entities entity in database; however, jpa throws errors when attempting save, because cached entity detached.
how reattach cached entity can include in current transaction?
i'm using apache openjpa implementation.
calling entitymanager.merge()
re-attach detached object.
have @ informative page
Comments
Post a Comment