Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Caching Behavior for @ReadOnly Entities?
Caching Behavior for @ReadOnly Entities? [message #517594] Mon, 01 March 2010 08:14 Go to previous message
No real name is currently offline No real name
Messages: 2
Registered: March 2010
Junior Member
Hey folks,

I've got a number of entities tagged as @ReadOnly, and I can't seem to
control when they refresh their state from the database, either manually or
through cache configuration. My ideal would be one of these two options:

1) Configure the cache so the state of a @ReadOnly entity is preserved for
the duration of a single UnitOfWork.
2) Be able to manually refresh the state of a @ReadOnly entity.

I've tried various ways to accomplish #1 (Even setting CacheType to NONE as
an experiment) and EclipseLink doesn't seem to care. The documentation is
sparse on the intersection of @Cache and @ReadOnly, though, so hopefully I'm
just missing something.

There isn't an obvious way to get at #2 either. @ReadOnly entities are
detached, so calling EntityManager.refresh() just causes an exception.

Anybody have any advice for me?

Thanks,
Ryan
 
Read Message
Read Message
Read Message
Previous Topic:preUpdateWithChanges
Next Topic:How to obtain connection from EntityManagerFactory?
Goto Forum:
  


Current Time: Mon May 20 17:18:49 EDT 2013

Powered by FUDForum. Page generated in 0.01690 seconds