You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Ertl <pe...@gmx.org> on 2005/09/28 09:57:40 UTC

"Page Transactions"

Hi everybody!

My current solution required access access to the full lifecycle 
of the page. The only way I know is through IMonitor. 

Afaik this can be done by setting application extension 
'org.apache.tapestry.monitor-factory' or by overriding 
hivemind service point 'tapestry.monitor.DefaultMonitorFactory'.

However this does not allow multiple IMonitors without letting the
instances know of each other (and cascading method invocations).

Is this true or did I miss something? Is there a better approach
to monitor the lifecycle of a page?

Best regards
Peter


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


Re: "Page Transactions"

Posted by Renat Zubairov <re...@gmail.com>.
That's true. Hivetranse doesn't implement a long running sessions,
however there is a possiblity to implement it, and it's quite simple
(thanks to HiveMinds service model, for me it is a killer feature
against Spring and Pico/Nano). You can check it here:

http://wiki.apache.org/jakarta-hivemind/ImplementingHibernateLongSessions

Another possibility is that if tapestry pages are somehow generated or
called by the service instantiated by HiveMind then, you can apply
transactional interceptor (say from hivetranse) to the service that is
responsible for page instantiation/render/call-backs. Allthough it's a
bit allot of work :)

On 30/09/05, Pete <pe...@gmx.org> wrote:
>
> HiveTranse is not fitting as I want to implement a
> session-per-application-transactions
> pattern using annotations. HiveTranse (version 0.5.0) seems to be limited
> to session-per-request or
> at least session-per-view but does not support long running sessions /
> transactions beyond the lifetime
> of a request.
>
> see: http://www.hibernate.org/168.html
>
> On Fri, 30 Sep 2005 13:13:40 +0200, Renat Zubairov
> <re...@gmail.com> wrote:
>
> > Hello Peter,
> >
> > There is a possiblity to have a declarative transactioning but on on
> > the page but on the services (e.g. HiveMInd) that are called from the
> > page.
> > You can have a look on HiveMind and HiveTranse for example.
> > Will it suit you needs?
> >
> > Renat
> >
> > On 29/09/05, Peter Ertl <pe...@gmx.org> wrote:
> >> I would like to manage transactions using annotations on pages.
> >>
> >> Something like that...
> >>
> >> @Transaction(type = TransactionType.RequiresNew, scope="OrderWizardTx")
> >> public class OrderWizardPage1 extends BasePage
> >> {
> >>   // do some initial stuff
> >> }
> >>
> >> @Transaction(type = TransactionType.Requires, scope="OrderWizardTx")
> >> public class OrderWizardPage2 extends BasePage
> >> {
> >>   // do even more stuff
> >> }
> >>
> >> @Transaction(type = TransactionType.Requires, scope="OrderWizardTx")
> >> public class OrderWizardLastPage extends BasePage
> >> {
> >>   // finish the stuff
> >>
> >>   public void onSave()
> >>   {
> >>    // end user transaction
> >>    // go home
> >>   }
> >> }
> >>
> >> As the user could navigate to any other page at any time I need
> >> some demarcation where the transaction begin, continues or ends.
> >>
> >> Regards
> >> Peter
> >>
> >>
> >> > --- Ursprüngliche Nachricht ---
> >> > Von: Kent Tong <ke...@cpttm.org.mo>
> >> > An: tapestry-user@jakarta.apache.org
> >> > Betreff: Re: "Page Transactions"
> >> > Datum: Thu, 29 Sep 2005 10:41:06 +0000 (UTC)
> >> >
> >> > Peter Ertl <pertl <at> gmx.org> writes:
> >> >
> >> > > My current solution required access access to the full lifecycle
> >> > > of the page. The only way I know is through IMonitor.
> >> >
> >> > Actually, what would you like to do?
> >> >
> >> > --
> >> > Author of a book for learning Tapestry (www.agileskills2.org/EWDT)
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >>
> >
> >
> > --
> > Best regards,
> > Renat Zubairov
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Best regards,
Renat Zubairov

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


Re: "Page Transactions"

Posted by Pete <pe...@gmx.org>.
HiveTranse is not fitting as I want to implement a  
session-per-application-transactions
pattern using annotations. HiveTranse (version 0.5.0) seems to be limited  
to session-per-request or
at least session-per-view but does not support long running sessions /  
transactions beyond the lifetime
of a request.

see: http://www.hibernate.org/168.html

On Fri, 30 Sep 2005 13:13:40 +0200, Renat Zubairov  
<re...@gmail.com> wrote:

> Hello Peter,
>
> There is a possiblity to have a declarative transactioning but on on
> the page but on the services (e.g. HiveMInd) that are called from the
> page.
> You can have a look on HiveMind and HiveTranse for example.
> Will it suit you needs?
>
> Renat
>
> On 29/09/05, Peter Ertl <pe...@gmx.org> wrote:
>> I would like to manage transactions using annotations on pages.
>>
>> Something like that...
>>
>> @Transaction(type = TransactionType.RequiresNew, scope="OrderWizardTx")
>> public class OrderWizardPage1 extends BasePage
>> {
>>   // do some initial stuff
>> }
>>
>> @Transaction(type = TransactionType.Requires, scope="OrderWizardTx")
>> public class OrderWizardPage2 extends BasePage
>> {
>>   // do even more stuff
>> }
>>
>> @Transaction(type = TransactionType.Requires, scope="OrderWizardTx")
>> public class OrderWizardLastPage extends BasePage
>> {
>>   // finish the stuff
>>
>>   public void onSave()
>>   {
>>    // end user transaction
>>    // go home
>>   }
>> }
>>
>> As the user could navigate to any other page at any time I need
>> some demarcation where the transaction begin, continues or ends.
>>
>> Regards
>> Peter
>>
>>
>> > --- Ursprüngliche Nachricht ---
>> > Von: Kent Tong <ke...@cpttm.org.mo>
>> > An: tapestry-user@jakarta.apache.org
>> > Betreff: Re: "Page Transactions"
>> > Datum: Thu, 29 Sep 2005 10:41:06 +0000 (UTC)
>> >
>> > Peter Ertl <pertl <at> gmx.org> writes:
>> >
>> > > My current solution required access access to the full lifecycle
>> > > of the page. The only way I know is through IMonitor.
>> >
>> > Actually, what would you like to do?
>> >
>> > --
>> > Author of a book for learning Tapestry (www.agileskills2.org/EWDT)
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
> --
> Best regards,
> Renat Zubairov
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>



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


Re: "Page Transactions"

Posted by Renat Zubairov <re...@gmail.com>.
Hello Peter,

There is a possiblity to have a declarative transactioning but on on
the page but on the services (e.g. HiveMInd) that are called from the
page.
You can have a look on HiveMind and HiveTranse for example.
Will it suit you needs?

Renat

On 29/09/05, Peter Ertl <pe...@gmx.org> wrote:
> I would like to manage transactions using annotations on pages.
>
> Something like that...
>
> @Transaction(type = TransactionType.RequiresNew, scope="OrderWizardTx")
> public class OrderWizardPage1 extends BasePage
> {
>   // do some initial stuff
> }
>
> @Transaction(type = TransactionType.Requires, scope="OrderWizardTx")
> public class OrderWizardPage2 extends BasePage
> {
>   // do even more stuff
> }
>
> @Transaction(type = TransactionType.Requires, scope="OrderWizardTx")
> public class OrderWizardLastPage extends BasePage
> {
>   // finish the stuff
>
>   public void onSave()
>   {
>    // end user transaction
>    // go home
>   }
> }
>
> As the user could navigate to any other page at any time I need
> some demarcation where the transaction begin, continues or ends.
>
> Regards
> Peter
>
>
> > --- Ursprüngliche Nachricht ---
> > Von: Kent Tong <ke...@cpttm.org.mo>
> > An: tapestry-user@jakarta.apache.org
> > Betreff: Re: "Page Transactions"
> > Datum: Thu, 29 Sep 2005 10:41:06 +0000 (UTC)
> >
> > Peter Ertl <pertl <at> gmx.org> writes:
> >
> > > My current solution required access access to the full lifecycle
> > > of the page. The only way I know is through IMonitor.
> >
> > Actually, what would you like to do?
> >
> > --
> > Author of a book for learning Tapestry (www.agileskills2.org/EWDT)
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Best regards,
Renat Zubairov

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


Re: "Page Transactions"

Posted by Peter Ertl <pe...@gmx.org>.
I would like to manage transactions using annotations on pages.

Something like that...

@Transaction(type = TransactionType.RequiresNew, scope="OrderWizardTx")
public class OrderWizardPage1 extends BasePage
{
  // do some initial stuff
}

@Transaction(type = TransactionType.Requires, scope="OrderWizardTx")
public class OrderWizardPage2 extends BasePage
{
  // do even more stuff
}

@Transaction(type = TransactionType.Requires, scope="OrderWizardTx")
public class OrderWizardLastPage extends BasePage
{
  // finish the stuff

  public void onSave()
  {
   // end user transaction
   // go home
  }
}

As the user could navigate to any other page at any time I need
some demarcation where the transaction begin, continues or ends.

Regards
Peter


> --- Ursprüngliche Nachricht ---
> Von: Kent Tong <ke...@cpttm.org.mo>
> An: tapestry-user@jakarta.apache.org
> Betreff: Re: "Page Transactions"
> Datum: Thu, 29 Sep 2005 10:41:06 +0000 (UTC)
> 
> Peter Ertl <pertl <at> gmx.org> writes:
> 
> > My current solution required access access to the full lifecycle 
> > of the page. The only way I know is through IMonitor. 
> 
> Actually, what would you like to do?
> 
> --
> Author of a book for learning Tapestry (www.agileskills2.org/EWDT)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 

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


Re: "Page Transactions"

Posted by Kent Tong <ke...@cpttm.org.mo>.
Peter Ertl <pertl <at> gmx.org> writes:

> My current solution required access access to the full lifecycle 
> of the page. The only way I know is through IMonitor. 

Actually, what would you like to do?

--
Author of a book for learning Tapestry (www.agileskills2.org/EWDT)


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