so something like
session s=getsession();
user u=getUser(s);
setResponsePage(new ConfirmDeleteUserPage(u, s)
and thats all there is to it, now confirmdeleteuserpage can operate on the same conversation that the page that invoked it
the only trick is to diconnect and reconnect the session, but that can be done with a simple facade
-Igor
On 5/31/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
Easy enough to say, however, I don't know *how* Seam does what it does
- I have no idea how to implement something like this.
And yes, it's a long-running transaction (I suppose?) Perhaps they're
just storing the transaction in an http session so it's still relevant
to the user throughout the application before it's comitted and the
session is flushed.
I'm not really sure...
I guess that's the question then...would I have to resort to
bean-managed transactions, go outside of the container, and pass the
transaction around in a session until I decide to commit it? I'm
afraid that's out of the question and would complex enough *not* to
use EJB3 and just resort to using Wicket + Hibernate or Wicket +
Hibernate + Spring.
OpenSessionInView does work great, if you're using Hibernate! I'm not
using Hibernate. I'm using an entirely managed environment and am not
manually working w/ the session or the transaction.
I'm a relative newbie to most of you, I'm sure, so hopefully someone
can correct me where I'm making false assumptions.
On 5/31/06, Matej Knopp <[EMAIL PROTECTED]> wrote:
> I don't know why but I just don't like the idea of long-running
> transactions. I think web applications are just too unpredictable to
> hold one transaction during multiple request. You can never be sure when
> (and if) the next request will come.
>
> OpenSessionInView filter has always be sufficient for me. I either load
> all lazyly loaded collections in advance or re-associate the object with
> session on every request.
>
> I don't know seam internals either, but can't see a reason why it
> shouldn't be possible to have long running transaction with wicket.
> After all, transactions are not web layers responsibility.
>
> -MAtej
>
> Vincent Jenks wrote:
> > I'm not sure how familiar anyone here is w/ Seam and how it applies to
> > JSF when working w/ EJB3...but I thought I'd bring this up anyhow.
> >
> > You'll have to forgive my ignorance as I'm not entirely clear *how*
> > Seam works internally and haven't built a project w/ it yet...but it
> > seems to ease the pain that Hibernate users have long experienced w/
> > LazyInitializationExceptions.
> >
> > I realize there's some sort of solition for plain 'ol Hibernate users
> > in wicket-stuff, something about Spring? However, it's a different
> > story when using EJB3 in the JBoss container w/ container-managed
> > persistence.
> >
> > Apparently, Seam creates a long-running Hibernate session in the
> > container that supposidly eliminates the LazyInitializationException.
> >
> > I've gotten quite comfortable w/ Wicket and hope to continue to use it
> > for projects here at work...however working around lazily-loaded
> > collections in EJB3 is becoming messy for me at times when the domain
> > model becomes more than trivial. I have a great distaste for JSF and
> > would rather not use it, believe me, but Seam is very compelling for
> > large, complex projects where the LIE exception will be come much more
> > likely.
> >
> > How hard would it be to implement something like Seam has to ease this
> > problem? That is, assuming no one has come up w/ a solution yet...if
> > there is one, please let me know!
> >
> > I've mentioned something like this in passing before and have gotten
> > the usual response, which is "you need to use a session-per-request
> > pattern". The problem is; I'm using a container...I don't have
> > control of the hibernate session, the transactions (per se), etc. In
> > an entirely container-managed environment I don't have the options I
> > would w/ plain Hibernate.
> >
> > Thanks in advance!
> >
> >
> > -------------------------------------------------------
> > All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> > Fully trained technicians. The highest number of Red Hat certifications in
> > the hosting industry. Fanatical Support. Click to learn more
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
> -------------------------------------------------------
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
