Manjula
Manjula

Reputation: 5101

Is there any way to clear entity cache in a weblogic server without restarting? [for debugging]

I am investigating a bug in my application which runs on Weblogic 10.3.4 server. For this investigation, sometimes I need to clear some tables in the database directly (using SQL Navigator). But these changes doesn't reflect immediately in the weblogic server unless I restart it. It is a time consuming task to restart this every time I modify the data in the database.

I was wondering whether there is an easy and quick way to clear the database cache in the weblogic server and force it to reload the modified data. I think if I add a ejb which calls the flush method related to every entity and if I call that method, it will do this task. But do you have any suggestion or any other way to do this task, may be by changing a weblogic server setting? Is there any one method call we can do for forcing flushing of all the entities in current container?

Upvotes: 4

Views: 3899

Answers (1)

James
James

Reputation: 18379

JPA 2.0 has a Cache API that allows you to clear the cache (evictAll).

EclipseLink also has its own API previous the JPA 2.0.

See, http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Caching/Cache_API

Upvotes: 3

Related Questions