Luke-

Sorry for my late response on this, I've been out of town.

My original intention was to create a 'per-request' session, however, I couldn't find a good means within the framework to accomplish that. As a result, I settled for 'per-page per-request', which behaves exactly as you describe.

Reading further ahead in my email, I see that the HibernateMonitor has been posted. I'll have to try that out...

Cheers,

Eric Everman

At 2/11/2003, Luke Galea wrote:
Eric,
I was having a few probs with my solution to the Hibernate/Tapestry
session issue.. so I took a look at your code. It doesn't seem to work
for me because the page is null in the call to cycle.getPage() in
createSession().

A bigger question here is:
If I have a hibernate collection in my visit object.. and you move from
one page to another, the session is closed and another is created..

The problem case is:
Page 1 sets a value in the visit using a session, page 2 access this
value.. but it now has it's own new session.. this causes an error
because the object shouldn't be accessed outside of the context of the
first session.

Ie. Login page grabs user object, forwards user on to main page.. which
updates the user's lastAccessed field and updates the database (using a
new session).

So the question is.. is there any way to have a listener that is
informed when the request is complete instead of the page???

Thanks in advance

Luke Galea
Software Development
BlueCat Networks
905-762-5225


-----Original Message-----
From: Eric Everman [mailto:[EMAIL PROTECTED]]
Sent: November 25, 2002 2:39 PM
To: Howard M. Lewis Ship; [EMAIL PROTECTED]
Subject: [Tapestry-developer] Tapestry Hibernate Session Extension

Howard-

Thanks for the suggestion.  I guess I missed the fact that there was
such a
thing as an extension.

For anyone interested, attached is a Tapestry Extension helper bean
which
creates Hibernate Sessions on demand.  Setup and use info is in the
class
javadocs.  It does make some assumptions about how you configure
Hibernate
and how you use Sessions, so it is not a be-all solution.

Suggestions or questions are welcome,

Eric Everman

At 11/24/2002, Howard M. Lewis Ship wrote:
>I took a *very* cursory look at this.  Have you considered using the
>Tapestry <extension> mechanism to support this?  It is a more natural
way to
>provide global resources to applications and doesn't require
subclassing the
>ApplicationServlet.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to