cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brent Johnson <>
Subject Hibernate Beans in an HttpSession
Date Fri, 06 Aug 2004 22:38:36 GMT
(resending this.. it bounced the first time)

I load a User object using Hibernate from a MySQL database.  I put
this object into the users session so I can read it during web
requests.  I'm using Flowscript and JXTemplates (Cocoon 2.1.5) and
pulling all hibernate beans via SOAP (using Apache Axis).

The only bean thats not pulled via SOAP is the User bean which is
stored in the session.  Could someone enlighten me on why the bean in
the session doesnt get updated from the database?

Here's an example.. the user logs in and I put the bean in the
session.  It has a property set to "johnson".  Lets then say
later during the web transaction I make a SOAP call that does a
hibernateSession.load(User.class, pkid) then changes the username to
"brent" via Hibernate with myUser.setName("brent"), then

All fine.. but when the user clicks a button and I read the bean using
cocoon.session.getAttribute("user") it still retains the old bean
values and the value is still set to "johnson".

Is there a way I can update the bean in the session?  Right now I'm
making a SOAP request EVERY time the user does something to pull the
new bean down.  I really don't want to have to do it this way.

Any ideas?


- Brent

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message