On Saturday 17 Dec 2005 15:19, Igor Vaynberg wrote:
> you might not be able to do it using the try/catch/finally semantic, but
> there are plenty of hooks in there to do it without. the
> iexceptionresponsestrategy is indirectly part of the cycle as well.

So the answer is no, you cannot have transaction handling code in one class?

This seems like it should be really simple to do so I am not sure I doing it 
the way you suggest.

Is this your suggested approach:

1 - Override WebApplication.getDefaultRequestCycleFactory() to return new 
instances of my own custom RequestCycle.

2 - Subclass WebRequestCycle to override onEndRequest() where I can 
commit/rollback the transaction.

3 - Override WebApplication.getDefaultRequestCycleProcessor to create and 
cache a single instance of CompoundRequestCycleProcessor with my own custom 
IExceptionResponseStrategy.

4 - Subclass DefaultExceptionResponseProcessor to catch exceptions and signal 
my custom WebRequestCycle that the transaction should be rolled back in 
onEndRequest().

Thanks,

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to