Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Data not refreshing in EJB3 read only app  RSS feed

Wes Wild
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all -

I have small read only app developed in JDeveloper the model layer has been built using EJB3.

I have created/generated an entity bean from a database View which queries a table that is updated nightly by a procedure with dashboard type metrics. The problem I'm seeing is that when the underlying table is updated and the update is committed to the database normally etc, the application running on a 10g OAS or even when running the app locally from the JDeveloper thru the provided OC4J server does not pull in the refreshed/updated data from the database. The only way to actually present/display the updated current data thru the applications EJB3 architecture is to bounce the app on the server completely, then it seems that a cache someplace must be purged and the current state of the database is displayed.

I have tried to use the entitymanager.refresh() method with no luck. It appears refresh() looks for a specific object to refresh. In my case I am returning/just reading a List<of entities>so I'm not sure refresh() will work for me.

So again If I startup my sessionEJBBean then run my EJBClient tester and get a value returned for a given record/column of say 100... then leaving the OC4J running, go into the database and modify/update that record to say 1000, then come back and rerun the EJBClient tester I still see 100. The EJB3 container is not refreshing with the new updated data?

Any suggestions? Has anyone dealt with anything similar to this?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!