You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Per Newgro <pe...@gmx.ch> on 2018/03/23 18:47:46 UTC

Wicket Spring Boot open entity manager in view config

Hello,

we would like to use the open-entitymanager-in-view pattern. It was 
working in our "old fashioned" spring application by configuring filter 
in web.xml.

But we can not find the appropriate config for wicket spring boot. 
Enable spring.jpa.open-entitymanager-in-view=true seems not to be enough.

We still get LazyInitException - no session.

Can one of you please provide a short comment, what we can still check?


Thanks for your support.

Per


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket Spring Boot open entity manager in view config

Posted by Per Newgro <pe...@gmx.ch>.
Hi,

i can answer myself :-)

     public @Bean FilterRegistrationBean openEntityManagerInViewFilter() {
         FilterRegistrationBean registration = new FilterRegistrationBean();
         registration.setFilter(new OpenEntityManagerInViewFilter());
         registration.setName("openEntityManagerInView");
         registration.addUrlPatterns("/*");
         return registration;
     }

If some1 else looks for this.

Cheers
Per

Am 23.03.2018 um 19:47 schrieb Per Newgro:
> Hello,
>
> we would like to use the open-entitymanager-in-view pattern. It was 
> working in our "old fashioned" spring application by configuring 
> filter in web.xml.
>
> But we can not find the appropriate config for wicket spring boot. 
> Enable spring.jpa.open-entitymanager-in-view=true seems not to be enough.
>
> We still get LazyInitException - no session.
>
> Can one of you please provide a short comment, what we can still check?
>
>
> Thanks for your support.
>
> Per
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org