Jee... why would you want to encapsulate _every_ request to a webpage in a transaction? what if there's errors in the forms, like field validation or data dependency (one field depends on other). Transactions should begin right before start working with persistent data or outside services like JMS.

doRequest =>
validate =>
>beginTransaction =>
doSomething =>
endTransation =>
endRequest =>

this is how should be your flow... :P

On 5/11/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
use RequestCyle.onBeginRequest/onEndRequest for that.

johan



On 5/11/06, Ralf Ebert <[EMAIL PROTECTED] > wrote:
Hi,

I'm using a RequestCycleProcessor to provide a threadlocal-based
transaction to my application. I use something like:

        protected IRequestCycleProcessor newRequestCycleProcessor() {
                return new DefaultWebRequestCycleProcessor() {

                        public void respond(RequestCycle requestCycle) {
                                System.out.println("Respond =>");
                                //prepare tx
                                super.respond(requestCycle);
                                //close tx
                                System.out.println("Respond <=");
                        }

                };

        }

With a page with form action, I get something like this:

>onSubmit <=
Respond =>
Respond <=

This is not what I intended to do, because I need to provide one
transaction around every request to a WebPage (the only exception are
resources like images or css). So the request cycle processor doesn't
seem to be right. Servlet filter is too complicated as well, because I
want wicket exception handling and wraping requests to WebPages
only... Anything I can do about this?

Regards,
Ralf


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Bruno Borges
[EMAIL PROTECTED]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4

Reply via email to