[ 
https://issues.apache.org/jira/browse/WICKET-5465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887808#comment-13887808
 ] 

Martin Grigorov commented on WICKET-5465:
-----------------------------------------

I see no good solution for this at the moment.
Having RequestCycle thread local won't be enough. What is needed is a complete 
request processing, i.e. all request cycle listeners should be invoked when the 
cycle starts. But this leads to new 'last rendered page' and many tests in our 
suite fail.

> WicketTester.newFormTester() should work within RequestCycle
> ------------------------------------------------------------
>
>                 Key: WICKET-5465
>                 URL: https://issues.apache.org/jira/browse/WICKET-5465
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.12.0
>            Reporter: Ilia Naryzhny
>              Labels: wicket-tester
>         Attachments: WICKET-5465.patch
>
>
> Application is using JPA for working with database.
> Transaction/EntityManager is opened and closed with the aid of RequestCycle 
> listener.
> But there is a place when WicketTester can initiate working with JPA/DB not 
> with in transaction. That is there:
> WicketTester.newFormTester() invokes "new FormTester" and there is following 
> place within FormTester constructor:
> String[] values = getInputValue(formComponent);  //(line number 399 for 
> wicket 6.12.0)
> Ofcause, finally, this leads to DB invocation out of transaction and lots of 
> other bad stuff.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to