getResultList() is not up-to-date

Hi,

maybe someone can give me a hint, why getResultList() of my query doesnt give me the actual information of the database.

@Stateless

...

javax.persistence.Query q=em.createQuery("select object(o) from dbView as o");

java.util.List retList=q.getResultList();

...

If I run a sql update from outside the application, getResultList does not show the changes.

I have tried to call em.clear() and em.flush() without any success.

If I monitor the database, I can see that the backend calls at first SHOW TRANSACTION ISOLATION LEVEL and then the corresponding SQL statement but the result of getResultList() remains the same.

Any suggestions ?

PostgreSQL 7

JAVA 5

EJB 3.0

Regards

Volker Jordan

[787 byte] By [vjordan03a] at [2007-11-27 7:04:56]
# 1
Ok, I solved it. It was the toplink cache.I noticed, that this question was very similar to a thread in one other section.
vjordan03a at 2007-7-12 18:56:14 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...