users@glassfish.java.net

Re: Caching problem with build b58c-fcs?

From: <glassfish_at_javadesktop.org>
Date: Fri, 24 Aug 2007 13:35:22 PDT

Hello Marina,

> Does it work differently with another build?

I already had the problem with b85-rc1, but I wanted to verify it with the newest build. I did not recognize the problem with earlier builds, but I probably overlooked it.

> If you
> set or change relationships from one side, and it's a
> bidirectional relationship, your application must
> synchronize the other side as well. Or you can call
> em.refresh() to get fresh data from the database.

It's an unidirectional OneToMany relationship from A to B in my description. I'm calling em.find() with the primary key of the A entity in a stateless session bean, and the size of the list of B items for the OneToMany relationship is wrong. As I said, when I look into the database I can see that there are more B records for the A entity, and after a restart of Glassfish I get the expected result.

Is there any further possibility for me to troubleshoot this in my environment? If not I will try to build an isolated reproduction scenario, but that will require a significant effort.

Thanks
Stephan
[Message sent by forum member 'smuehlst' (smuehlst)]

http://forums.java.net/jive/thread.jspa?messageID=232541