i didnt say to do that. i simply said that this is what persistent
context means...and that session object in my example is the hibernate
session.
-igor
On Sun, Mar 23, 2008 at 1:21 AM, Paolo Di Tommaso
<[EMAIL PROTECTED]> wrote:
> Nice and interesting. This could be a valid alternative to simulate the Seam
> conversation-scoped persistent context.
>
> Although doing so the presentation layer is too tied to persistent session
> handling aspect. I think this could be really useful in a simple scenario
> with few pages, but in complex use causes (and integrating other frameworks
> like jbpm that need to share the same hibernate session) it will drive in a
> hell.
>
>
> Thank you.
>
> // Paolo
>
> On Sun, Mar 23, 2008 at 2:25 AM, Igor Vaynberg <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > conversation scope is slightly different, for long running hibernate
> > sessions it is an equivalent of doing:
> >
> > class conversationpage extends webpage {
> > private org.hibernate.Session session;
> >
> > public conversationpage(Session session) {
> > this.session=session;
> > }
> >
> > protected Session getSession() {
> > if (!session.isconnected()) { session.reconnect(); }
> > return session;
> > }
> >
> > protected void ondetach() { session.disconnect(); }
> > }
> >
> > so in this case the conversation would be propogated so:
> >
> > setresponsepage(new edituserstep2page(getsession(), usermodel));
> >
> > -igor
> >
> >
> > On Sat, Mar 22, 2008 at 6:13 PM, brian.diekelman <[EMAIL PROTECTED]>
> > wrote:
> > >
> > > I have only read up on Seam a few times, so help me out where I'm
> > > incorrect...
> > >
> > > As far as I can tell Seam uses the conversation scope as a step between
> > > request scope and session scope to persist values across a couple of
> > > requests, for instance a user creation wizard, etc.
> > >
> > > I don't know what integration they've enabled or how it works, but
> > passing
> > > an object between requests is simple and straight forward in wicket.
> > Say
> > > that you want to pass a user object (or any other combination of
> > objects)
> > > from one page to another when the user clicks a link:
> > >
> > > public class SimplePage extends WebPage
> > > {
> > > public SimplePage(final User user)
> > > {
> > > add(new Link("link")
> > > {
> > > public void onClick()
> > > {
> > > setResponsePage(new SomeOtherPage(user));
> > > }
> > > }
> > > }
> > > }
> > >
> > > You would pass it directly by reference. Like I said, I don't know how
> > Seam
> > > is integrating, but when you're using Wicket you don't really have a
> > need
> > > for something like a conversation scope. You can use whatever
> > granularity
> > > you'd like to pass objects between pages, not necessarily bound to any
> > > particular scope.
> > >
> > > Please let me know if I'm just completely missing your point here.
> > >
> > > --
> > > View this message in context:
> >
> http://www.nabble.com/Seam-Wicket-integration-and-conversation-scope-tp16228793p16230158.html
> > > Sent from the Wicket - User mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]