You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joel Trunick <jo...@webifysolutions.com> on 2006/01/20 20:46:41 UTC

RE: IMonitor and T4/4.1

I found an answer that works for me (in 4.0):

	<implementation
service-id="tapestry.monitor.DefaultMonitorFactory">
	  <invoke-factory>
	  	<construct class="...web.tapestry.MyMonitorFactory" />
 	  </invoke-factory>
	</implementation>	


However, still curious what my other option is when 4.1 comes out, as
IMonitor is supposed to go away. Anybody?

Joel

-----Original Message-----
From: Joel Trunick 
Sent: Thursday, December 29, 2005 6:46 PM
To: Tapestry users
Subject: IMonitor and T4

What's happening with IMonitor?

I have the following code where do I place it in Tapestry 4.0?

MyMonitor:
    public void serviceException(Throwable arg0) {
        this.t = arg0;
    }

    public void pageRenderBegin(String arg0) {
        if (t == null) {
            DataContext.getThreadDataContext().commitChanges();   
        } else {
            DataContext.getThreadDataContext().rollbackChanges();

        }
    }

I saw an earlier thread but no answer...

Joel




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


Re: IMonitor and T4/4.1

Posted by Chris Conrad <cc...@vasoftware.com>.
Except that at the beginning of the request you don't have access to  
the IPage instance that will be handling the request.  It'd be nice  
if WebRequestServicerPipeline already had the requestCycle set up or  
of there was another pipeline after the WebRequestServicerPipeline  
where we can get to the IPage.  That'd allow annotating the IPage  
with any transaction/security meta-data necessary.

--Chris

On Jan 20, 2006, at 4:00 PM, Howard Lewis Ship wrote:

> Contribute a filter into
>
> http://jakarta.apache.org/tapestry/tapestry/hivedocs/config/ 
> tapestry.request.WebRequestServicerPipeline.html
>
> will be a good way to be notified of the start and end of any request.
>  Good place to manage Hibernate sessions and transactions, for
> example.
>
> On 1/20/06, Joel Trunick <jo...@webifysolutions.com> wrote:
>> I found an answer that works for me (in 4.0):
>>
>>         <implementation
>> service-id="tapestry.monitor.DefaultMonitorFactory">
>>           <invoke-factory>
>>                 <construct  
>> class="...web.tapestry.MyMonitorFactory" />
>>           </invoke-factory>
>>         </implementation>
>>
>>
>> However, still curious what my other option is when 4.1 comes out, as
>> IMonitor is supposed to go away. Anybody?
>>
>> Joel
>>
>> -----Original Message-----
>> From: Joel Trunick
>> Sent: Thursday, December 29, 2005 6:46 PM
>> To: Tapestry users
>> Subject: IMonitor and T4
>>
>> What's happening with IMonitor?
>>
>> I have the following code where do I place it in Tapestry 4.0?
>>
>> MyMonitor:
>>     public void serviceException(Throwable arg0) {
>>         this.t = arg0;
>>     }
>>
>>     public void pageRenderBegin(String arg0) {
>>         if (t == null) {
>>             DataContext.getThreadDataContext().commitChanges();
>>         } else {
>>             DataContext.getThreadDataContext().rollbackChanges();
>>
>>         }
>>     }
>>
>> I saw an earlier thread but no answer...
>>
>> Joel
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user- 
>> help@jakarta.apache.org
>>
>>
>
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> 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: IMonitor and T4/4.1

Posted by Howard Lewis Ship <hl...@gmail.com>.
Contribute a filter into

http://jakarta.apache.org/tapestry/tapestry/hivedocs/config/tapestry.request.WebRequestServicerPipeline.html

will be a good way to be notified of the start and end of any request.
 Good place to manage Hibernate sessions and transactions, for
example.

On 1/20/06, Joel Trunick <jo...@webifysolutions.com> wrote:
> I found an answer that works for me (in 4.0):
>
>         <implementation
> service-id="tapestry.monitor.DefaultMonitorFactory">
>           <invoke-factory>
>                 <construct class="...web.tapestry.MyMonitorFactory" />
>           </invoke-factory>
>         </implementation>
>
>
> However, still curious what my other option is when 4.1 comes out, as
> IMonitor is supposed to go away. Anybody?
>
> Joel
>
> -----Original Message-----
> From: Joel Trunick
> Sent: Thursday, December 29, 2005 6:46 PM
> To: Tapestry users
> Subject: IMonitor and T4
>
> What's happening with IMonitor?
>
> I have the following code where do I place it in Tapestry 4.0?
>
> MyMonitor:
>     public void serviceException(Throwable arg0) {
>         this.t = arg0;
>     }
>
>     public void pageRenderBegin(String arg0) {
>         if (t == null) {
>             DataContext.getThreadDataContext().commitChanges();
>         } else {
>             DataContext.getThreadDataContext().rollbackChanges();
>
>         }
>     }
>
> I saw an earlier thread but no answer...
>
> Joel
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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