Hi experts,
I am facing a very interesting problem. After updating an entity through EntityManager API, I update the data through a stored proc via a
jdbc connection object. both the updates - done by em and stored proc are reflected in database. Then in another call to em.find() is made but that does not reflect the changes done by stored proc.
the code flow looks like the following...
..
..//do some changes in entity
..
em.flush();
callToStoredProc(); // this method invokes stored proc via connection object obtained from datasource and does updates
em.clear();
..
And then from within another session bean I call em.find() which does gives me back the data updated through stored proc.
Please provide solutions to my problem.
Thanks in advance!
regards,
Pushker Chaubey