Re: Re: Wicket Spring boot - use spring devtools
On Wed, Aug 28, 2019 at 12:04 PM Per Newgro wrote: > Hello Martin, > > the problem is that i assign a model in request cycle metadata by using > the key > > public class IdentityInstance extends MetaDataKey> { > > public static IdentityInstance KEY = new IdentityInstance(); > > private IdentityInstance() { > super(); > } > } > > Page: > getRequestCycle().setMetaData(IdentityInstance.KEY, identityModel); > > Widget: > IModel identity = > getRequestCycle().getMetaData(IdentityInstance.KEY); > > But the model in Widget is always null. While debugging i found that > object identity is used in Class#equals(Object o), what is ok for me. > But with different classloaders class is loaded multiple times. > > I could provide a quickstart for this & create an issue, if you like. (?) > No, I don't. I don't see why Wicket should be responsible for the way other libraries work. If you create a quickstart that does not use any third party libraries then we will take a look! > > I would like to adapt my configuration so that devtools are still > available. > > (DCEVM i need to inspect :-).) > > Thanks for your support. > Regards > Per > > > Gesendet: Mittwoch, 28. August 2019 um 10:37 Uhr > > Von: "Martin Grigorov" > > An: "users@wicket.apache.org" > > Betreff: Re: Wicket Spring boot - use spring devtools > > > > Hi, > > > > This is how Spring Dev Tools work. When it detects a change it removes > the > > old application class loader and creates a new one. > > Why this is a problem for you ? > > > > I personally prefer to use DCEVM (https://dcevm.github.io/). It is able > to > > redefine a specific class in the current class loader. > > When I change a Spring @Configuration or Hibernate mapping I just restart > > the application manually. > > > > On Wed, Aug 28, 2019 at 11:25 AM Per Newgro wrote: > > > > > Hello *, > > > > > > I migrate my current wicket app to spring boot version ( > > > https://github.com/MarcGiffing/wicket-spring-boot). > > > > > > So far it was straightforward. But now i experience a problem with > > > inclusion of > > > > > > > > > org.springframework.boot > > > > > > spring-boot-devtools > > > > > > > > > It seems that the "restart / reload feature" of devtools loads my > classes > > > multiple times, so that they are not equal anymore (x.class <> > x.class). > > > I understand that this is happening. But i would like to know if there > is > > > another option for me beside - removing spring-boot-devtools. > > > > > > Would be nice to here from you > > > Thanks > > > Per > > > > > > - > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Aw: Re: Wicket Spring boot - use spring devtools
Hello Martin, the problem is that i assign a model in request cycle metadata by using the key public class IdentityInstance extends MetaDataKey> { public static IdentityInstance KEY = new IdentityInstance(); private IdentityInstance() { super(); } } Page: getRequestCycle().setMetaData(IdentityInstance.KEY, identityModel); Widget: IModel identity = getRequestCycle().getMetaData(IdentityInstance.KEY); But the model in Widget is always null. While debugging i found that object identity is used in Class#equals(Object o), what is ok for me. But with different classloaders class is loaded multiple times. I could provide a quickstart for this & create an issue, if you like. (?) I would like to adapt my configuration so that devtools are still available. (DCEVM i need to inspect :-).) Thanks for your support. Regards Per > Gesendet: Mittwoch, 28. August 2019 um 10:37 Uhr > Von: "Martin Grigorov" > An: "users@wicket.apache.org" > Betreff: Re: Wicket Spring boot - use spring devtools > > Hi, > > This is how Spring Dev Tools work. When it detects a change it removes the > old application class loader and creates a new one. > Why this is a problem for you ? > > I personally prefer to use DCEVM (https://dcevm.github.io/). It is able to > redefine a specific class in the current class loader. > When I change a Spring @Configuration or Hibernate mapping I just restart > the application manually. > > On Wed, Aug 28, 2019 at 11:25 AM Per Newgro wrote: > > > Hello *, > > > > I migrate my current wicket app to spring boot version ( > > https://github.com/MarcGiffing/wicket-spring-boot). > > > > So far it was straightforward. But now i experience a problem with > > inclusion of > > > > > > org.springframework.boot > > > > spring-boot-devtools > > > > > > It seems that the "restart / reload feature" of devtools loads my classes > > multiple times, so that they are not equal anymore (x.class <> x.class). > > I understand that this is happening. But i would like to know if there is > > another option for me beside - removing spring-boot-devtools. > > > > Would be nice to here from you > > Thanks > > Per > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Spring boot - use spring devtools
Hi, This is how Spring Dev Tools work. When it detects a change it removes the old application class loader and creates a new one. Why this is a problem for you ? I personally prefer to use DCEVM (https://dcevm.github.io/). It is able to redefine a specific class in the current class loader. When I change a Spring @Configuration or Hibernate mapping I just restart the application manually. On Wed, Aug 28, 2019 at 11:25 AM Per Newgro wrote: > Hello *, > > I migrate my current wicket app to spring boot version ( > https://github.com/MarcGiffing/wicket-spring-boot). > > So far it was straightforward. But now i experience a problem with > inclusion of > > > org.springframework.boot > > spring-boot-devtools > > > It seems that the "restart / reload feature" of devtools loads my classes > multiple times, so that they are not equal anymore (x.class <> x.class). > I understand that this is happening. But i would like to know if there is > another option for me beside - removing spring-boot-devtools. > > Would be nice to here from you > Thanks > Per > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >