struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: Struts 2 + Hibernate question
Date Tue, 03 Jun 2008 19:12:28 GMT
Márcio Gurgel wrote:
> Hi all!
> 
> I'm using struts 2 + hibernate.
> I've a strange problem, if someone could give me a hand I'll be so tankfull..
> 
> If I persist a object in my app every things go well and all relationchips
> are stored correctey correctly.
> The problem occours when I update this object... After the update all data
> are stored correctly too, but the problem is that my page shows the old
> object (different from database).
> 
> This could be some kind of cash from struts 2? Or my problem is just
> hibernate?
> 
> I tryed this methods to force a refresh after bring the object from database
> session.refresh(obj)
> session.flush()

I can tell you that Struts doesn't cache your data anywhere for you. You 
may be storing a reference in the session or some other web-tier scope, 
holding it in a static field or otherwise keeping a stale reference 
somewhere. Or you may be seeing client-side page caching or even 
mis-configured caching at the Hibernate or database level.

You'll need to trace through your data access paths to determine at what 
point you're picking up the stale reference, and then figure out where 
that's coming from.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message