Cemal are you talking about guice persist? Anyhow very nice :)
2010/6/8 Cemal Bayramoglu <jweekend_for...@cabouge.com>: > Nino, > > Now that a Warp 2.0 snapshot (which works with Guice 2) is on a Maven > repo, we will upgrade the affected LegUp s [1]. Look out for an > announcement, hopefully in the next week or so. > > Regards - Cemal > jWeekend > OO & Java Technologies, Wicket > Consulting, Development, Training > http://jWeekend.com > > [1] http://jweekend.co.uk/dev/LegUp > > > > > On 8 June 2010 11:56, nino martinez wael <nino.martinez.w...@gmail.com> wrote: >> Hi yaniv >> >> replying inline.. And thanks for the ideas. >> >> 2010/6/8 yaniv kessler <yan...@gmail.com>: >>> Perhaps inject the model instead of manually creating it or maybe inject a >>> data service into the page and use that reference in the model. My point is, >>> passing the injector around (or in this case InjectorHolder), should be >>> avoided, since as it degrades the entire Guice DI into a simple service >>> locator pattern (which has its uses and shortcomings) >> Yeah I know and it annoys me too. So what you are saying is that the >> the ioc serialise proxy will be discovered in my ldm and be replaced >> on deserialise, also if I do not use injectorholder (that makes sense >> to me). The idea behind using injectorholder directly was because I >> wanted the ldm to be selfcontained. >>> >>> Anyways, putting code habits aside, I was unable to understand from your >>> last mail if you succeeded in solving your problem, did you ? >> Well I've started a quickstart project (based on the legup archetype, >> but "upgraded" to guice 2) to trace what I am doing wrong, and have >> been unable to replicate the problem so far. I'll continue searching >> for what I've done wrong in the non working project. >>> >>> On Tue, Jun 8, 2010 at 2:26 AM, nino martinez wael < >>> nino.martinez.w...@gmail.com> wrote: >>> >>>> Well as I manually create the the loadabledetachmodel which extends >>>> the ClassWithDao, it has to call injectorholder. I am not aware of any >>>> other method that can solve this.. >>>> >>>> 2010/6/8 yaniv kessler <yan...@gmail.com>: >>>> > I agree with Jorge here and additionally, would like to ask what is the >>>> > motivation to use InjectorHolder directly? >>>> > >>>> > Are you simply doing new ClassWithDao() somewhere in your code ? >>>> > >>>> > On Mon, Jun 7, 2010 at 9:21 PM, Jorge Rodrigez <mg.mli...@gmail.com> >>>> wrote: >>>> > >>>> >> Why phoneDao is transient ? >>>> >> Wicket-Guice injects a Serializable proxy and thus after deserialization >>>> >> the >>>> >> field will be non-null. >>>> >> >>>> >> On Mon, Jun 7, 2010 at 7:31 PM, nino martinez wael < >>>> >> nino.martinez.w...@gmail.com> wrote: >>>> >> >>>> >> > sure: >>>> >> > >>>> >> > public class ClassWithDao { >>>> >> > >>>> >> > public ClassWithDao() { >>>> >> > InjectorHolder.getInjector().inject(this); >>>> >> > } >>>> >> > >>>> >> > @Inject >>>> >> > private transient PhoneDao phoneDao; >>>> >> > >>>> >> > public PhoneDao getPhoneDao() { >>>> >> > return phoneDao; >>>> >> > } >>>> >> > >>>> >> > public void setPhoneDao(PhoneDao phoneDao) { >>>> >> > this.phoneDao = phoneDao; >>>> >> > } >>>> >> > >>>> >> > That's where I get the failure... And the working version you have >>>> seen.. >>>> >> > >>>> >> > 2010/6/7 yaniv kessler <yan...@gmail.com>: >>>> >> > > Nino, can you show the ClassWithDao code before the so called >>>> >> "ugliness" >>>> >> > was >>>> >> > > introduced? >>>> >> > > >>>> >> > > On Sun, Jun 6, 2010 at 1:44 PM, nino martinez wael < >>>> >> > > nino.martinez.w...@gmail.com> wrote: >>>> >> > > >>>> >> > >> im still working on the quickstart.. So far I've been unable to >>>> >> > >> replicate.. I'll continue tomorrow >>>> >> > >> >>>> >> > >> 2010/6/5 nino martinez wael <nino.martinez.w...@gmail.com>: >>>> >> > >> > I was too quick to say it worked, as it appears it does not. I'll >>>> >> try >>>> >> > >> > to make a quickstart based on legup, where should I put it? Just >>>> on >>>> >> > >> > jira? >>>> >> > >> > >>>> >> > >> > -Nino >>>> >> > >> > >>>> >> > >> > 2010/6/4 nino martinez wael <nino.martinez.w...@gmail.com>: >>>> >> > >> >> yeah me too, what Igor said worked so must be true or a bug.. I >>>> >> don't >>>> >> > >> >> think it's a bug.. >>>> >> > >> >> >>>> >> > >> >> 2010/6/3 James Carman <ja...@carmanconsulting.com>: >>>> >> > >> >>> I thought the filters were executed in the order of their >>>> >> > >> >>> filter-mappings, not their filter definitions. >>>> >> > >> >>> >>>> >> > >> >>> On Thu, Jun 3, 2010 at 5:23 PM, nino martinez wael >>>> >> > >> >>> <nino.martinez.w...@gmail.com> wrote: >>>> >> > >> >>>> Argh, how stupid.. Thanks a lot igor, how can I buy you a beer >>>> or >>>> >> > >> Coke? >>>> >> > >> >>>> >>>> >> > >> >>>> I spend a tremendous time trying to figure out what was wrong. >>>> I >>>> >> > even >>>> >> > >> >>>> considered going back to spring.. >>>> >> > >> >>>> >>>> >> > >> >>>> regards Nino >>>> >> > >> >>>> >>>> >> > >> >>>> 2010/6/3 Igor Vaynberg <igor.vaynb...@gmail.com>: >>>> >> > >> >>>>> noep, the filters are processed in the order they are defined >>>> in >>>> >> > >> >>>>> web.xml, move the wicket filter decl below the warp persist >>>> >> stuff. >>>> >> > >> >>>>> >>>> >> > >> >>>>> -igor >>>> >> > >> >>>>> >>>> >> > >> >>>>> On Thu, Jun 3, 2010 at 1:05 PM, nino martinez wael >>>> >> > >> >>>>> <nino.martinez.w...@gmail.com> wrote: >>>> >> > >> >>>>>> yes, i think so: >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> <?xml version="1.0" encoding="ISO-8859-1"?> >>>> >> > >> >>>>>> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" >>>> >> > >> >>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>> >> > >> >>>>>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee >>>> >> > >> >>>>>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >>>> >> > >> >>>>>> version="2.4"> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> <display-name>IVR Web frontend</display-name> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> <filter> >>>> >> > >> >>>>>> <filter-name>wicket.WicketWarp</filter-name> >>>> >> > >> >>>>>> >>>> >> > >> >>>> >> > >>>> >> >>>> <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> >>>> >> > >> >>>>>> <init-param> >>>> >> > >> >>>>>> >>>> >> > <param-name>applicationClassName</param-name> >>>> >> > >> >>>>>> >>>> >> > >> >>>> >> > >>>> >> >>>> <param-value>com.netdesign.codan.webadmin.WicketApplication</param-value> >>>> >> > >> >>>>>> </init-param> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> <init-param> >>>> >> > >> >>>>>> >>>> <param-name>configuration</param-name> >>>> >> > >> >>>>>> <param-value>deployment</param-value> >>>> >> > >> >>>>>> </init-param> >>>> >> > >> >>>>>> </filter> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> <filter> >>>> >> > >> >>>>>> <filter-name>warpPersistFilter</filter-name> >>>> >> > >> >>>>>> >>>> >> > >> >>>> >> > >>>> <filter-class>com.wideplay.warp.persist.PersistenceFilter</filter-class> >>>> >> > >> >>>>>> </filter> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> <filter-mapping> >>>> >> > >> >>>>>> <filter-name>warpPersistFilter</filter-name> >>>> >> > >> >>>>>> <url-pattern>/*</url-pattern> >>>> >> > >> >>>>>> </filter-mapping> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> <filter-mapping> >>>> >> > >> >>>>>> <filter-name>wicket.WicketWarp</filter-name> >>>> >> > >> >>>>>> <url-pattern>/*</url-pattern> >>>> >> > >> >>>>>> </filter-mapping> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> </web-app> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> 2010/6/2 Igor Vaynberg <igor.vaynb...@gmail.com>: >>>> >> > >> >>>>>>> did you install warp's open entity manager in view filter >>>> >> > *before* >>>> >> > >> >>>>>>> wicket's filter? >>>> >> > >> >>>>>>> >>>> >> > >> >>>>>>> -igor >>>> >> > >> >>>>>>> >>>> >> > >> >>>>>>> On Wed, Jun 2, 2010 at 5:46 AM, nino martinez wael >>>> >> > >> >>>>>>> <nino.martinez.w...@gmail.com> wrote: >>>> >> > >> >>>>>>>> Hi I somehow think theres something wrong with the Wicket >>>> >> Guice >>>> >> > >> proxy >>>> >> > >> >>>>>>>> (probably only if you are using guice 2 & possibly warp >>>> >> > persist) >>>> >> > >> >>>>>>>> >>>> >> > >> >>>>>>>> Anyhow I have had to change my LDM's to this code, notice >>>> the >>>> >> > >> injector >>>> >> > >> >>>>>>>> holder in the getter method really really bad. But if not >>>> I >>>> >> get >>>> >> > an >>>> >> > >> >>>>>>>> "entity manager is closed": >>>> >> > >> >>>>>>>> >>>> >> > >> >>>>>>>> public class ClassWithDao { >>>> >> > >> >>>>>>>> >>>> >> > >> >>>>>>>> public ClassWithDao() { >>>> >> > >> >>>>>>>> InjectorHolder.getInjector().inject(this); >>>> >> > >> >>>>>>>> } >>>> >> > >> >>>>>>>> >>>> >> > >> >>>>>>>> �...@inject >>>> >> > >> >>>>>>>> private transient PhoneDao phoneDao; >>>> >> > >> >>>>>>>> >>>> >> > >> >>>>>>>> /** >>>> >> > >> >>>>>>>> * This method contains a fix, should ordinary be >>>> >> > avoided! >>>> >> > >> There >>>> >> > >> >>>>>>>> should be no need for calling the extra InjectorHolder >>>> >> method! >>>> >> > >> >>>>>>>> * @return >>>> >> > >> >>>>>>>> */ >>>> >> > >> >>>>>>>>>> public PhoneDao getPhoneDao() { >>>> >> > >> >>>>>>>>>> InjectorHolder.getInjector().inject(this); >>>> >> > >> >>>>>>>>>> return phoneDao; >>>> >> > >> >>>>>>>>>> } >>>> >> > >> >>>>>>>> >>>> >> > >> >>>>>>>> public void setPhoneDao(PhoneDao phoneDao) { >>>> >> > >> >>>>>>>> this.phoneDao = phoneDao; >>>> >> > >> >>>>>>>> } >>>> >> > >> >>>>>>>> >>>> >> > >> >>>>>>>> Am I doing anything wrong I wonder, however the first >>>> >> requests >>>> >> > are >>>> >> > >> >>>>>>>> always working it's after something has been trough the >>>> >> session >>>> >> > >> store >>>> >> > >> >>>>>>>> it goes wrong.. >>>> >> > >> >>>>>>>> >>>> >> > >> >>>>>>>> -regards Nino >>>> >> > >> >>>>>>>> >>>> >> > >> >>>>>>>> >>>> >> > >> >>>> --------------------------------------------------------------------- >>>> >> > >> >>>>>>>> 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 >>>> >> > >> >>>>>>> >>>> >> > >> >>>>>>> >>>> >> > >> >>>>>> >>>> >> > >> >>>>>> >>>> >> > >> >>>> --------------------------------------------------------------------- >>>> >> > >> >>>>>> 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 >>>> >> > >> >>>>> >>>> >> > >> >>>>> >>>> >> > >> >>>> >>>> >> > >> >>>> >>>> >> > --------------------------------------------------------------------- >>>> >> > >> >>>> 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 >>>> >> > >> >>> >>>> >> > >> >>> >>>> >> > >> >> >>>> >> > >> > >>>> >> > >> >>>> >> > >> >>>> --------------------------------------------------------------------- >>>> >> > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> >> > >> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >> > >> >>>> >> > >> >>>> >> > > >>>> >> > > >>>> >> > > -- >>>> >> > > Tel: +972-77-4100977 >>>> >> > > Fax: +972-77-4100976 >>>> >> > > Mobile: +972-54-7755427 >>>> >> > > >>>> >> > > http://www.codeark.com >>>> >> > > http://blogs.microsoft.co.il/blogs/yanush/ >>>> >> > > http://headtoscreencollision.blogspot.com >>>> >> > > >>>> >> > >>>> >> > --------------------------------------------------------------------- >>>> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> >> > For additional commands, e-mail: users-h...@wicket.apache.org >>>> >> > >>>> >> > >>>> >> >>>> > >>>> > >>>> > >>>> > -- >>>> > Tel: +972-77-4100977 >>>> > Fax: +972-77-4100976 >>>> > Mobile: +972-54-7755427 >>>> > >>>> > http://www.codeark.com >>>> > http://blogs.microsoft.co.il/blogs/yanush/ >>>> > http://headtoscreencollision.blogspot.com >>>> > >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >>>> >>> >>> >>> -- >>> Tel: +972-77-4100977 >>> Fax: +972-77-4100976 >>> Mobile: +972-54-7755427 >>> >>> http://www.codeark.com >>> http://blogs.microsoft.co.il/blogs/yanush/ >>> http://headtoscreencollision.blogspot.com >>> >> >> --------------------------------------------------------------------- >> 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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org