Re: Guice & Wicket Guice Proxy

2010-06-08 Thread yaniv kessler
Please do and I will contribute :-)

On Tue, Jun 8, 2010 at 8:46 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Hi yaniv
>
> Taking your idea a little further, one could also just get the LDM
> injected, which actually archives what I wanted. However this has
> strayed a lot from the topic. So I think we should start a new thread
> on howto manage Wicket with IOC frameworks..
>
> regards Nino
>
> 2010/6/8 yaniv kessler :
> > 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)
> >
> > Anyways, putting code habits aside, I was unable to understand from your
> > last mail if you succeeded in solving your problem, did you ?
> >
> > 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 :
> >> > 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 
> >> 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 :
> >> >> > > 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 :
> >> >> > >> > 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 :
> >> >> > >> >> 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 :
> >> >> > >> >>> 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
> >> >> > >> >>>  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 :
> >> >> > >> > 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
> >> >> > >> >  wrote:
> >> >> > >> >> yes, i think so:
> >> >> > >> >>
> >> >> > >> >> 
> >> >> > >> >> 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">
> >> >> > >> >>
> >> >> > >> >>IVR Web frontend
> >> >> > >> >>
> >> >> > >> >>
> 

Re: Guice & Wicket Guice Proxy

2010-06-08 Thread nino martinez wael
Hi yaniv

Taking your idea a little further, one could also just get the LDM
injected, which actually archives what I wanted. However this has
strayed a lot from the topic. So I think we should start a new thread
on howto manage Wicket with IOC frameworks..

regards Nino

2010/6/8 yaniv kessler :
> 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)
>
> Anyways, putting code habits aside, I was unable to understand from your
> last mail if you succeeded in solving your problem, did you ?
>
> 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 :
>> > 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 
>> 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 :
>> >> > > 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 :
>> >> > >> > 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 :
>> >> > >> >> 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 :
>> >> > >> >>> 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
>> >> > >> >>>  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 :
>> >> > >> > 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
>> >> > >> >  wrote:
>> >> > >> >> yes, i think so:
>> >> > >> >>
>> >> > >> >> 
>> >> > >> >> 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">
>> >> > >> >>
>> >> > >> >>        IVR Web frontend
>> >> > >> >>
>> >> > >> >>        
>> >> > >> >>                wicket.WicketWarp
>> >> > >> >>
>> >> > >>
>> >> >
>> >>
>>  org.apache.wicket.protocol.http.WicketFilter
>> >> > >> >>                
>> >> > >> >>
>> >> >  applicationClassName
>> >> > >> >>
>> >> > >>
>> >> >
>> >>
>>  com.netdesign.codan.webadmin.WicketApplication
>> >> > >> >>                
>> >> > >> >>
>> >> > >> >>                
>> >> >

Re: Guice & Wicket Guice Proxy

2010-06-08 Thread nino martinez wael
Cemal are you talking about guice persist?

Anyhow very nice :)

2010/6/8 Cemal Bayramoglu :
> 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  wrote:
>> Hi yaniv
>>
>> replying inline.. And thanks for the ideas.
>>
>> 2010/6/8 yaniv kessler :
>>> 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 :
 > 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 
 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 :
 >> > > 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 :
 >> > >> > 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 :
 >> > >> >> 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 :
 >> > >> >>> 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
 >> > >> >>>  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 :
 >> > >> > noep, the filters are processed in the order they are defined
 in
 >> > >> > web.xml, mo

Re: Guice & Wicket Guice Proxy

2010-06-08 Thread Cemal Bayramoglu
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  wrote:
> Hi yaniv
>
> replying inline.. And thanks for the ideas.
>
> 2010/6/8 yaniv kessler :
>> 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 :
>>> > 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 
>>> 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 :
>>> >> > > 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 :
>>> >> > >> > 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 :
>>> >> > >> >> 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 :
>>> >> > >> >>> 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
>>> >> > >> >>>  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 :
>>> >> > >> > 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
>>> >> > >> >  wrote:
>>> >> > >> >> y

Re: Guice & Wicket Guice Proxy

2010-06-08 Thread nino martinez wael
Hi yaniv

replying inline.. And thanks for the ideas.

2010/6/8 yaniv kessler :
> 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 :
>> > 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 
>> 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 :
>> >> > > 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 :
>> >> > >> > 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 :
>> >> > >> >> 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 :
>> >> > >> >>> 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
>> >> > >> >>>  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 :
>> >> > >> > 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
>> >> > >> >  wrote:
>> >> > >> >> yes, i think so:
>> >> > >> >>
>> >> > >> >> 
>> >> > >> >> 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">
>> >> > >> >>
>> >> > >> >>        IVR Web frontend
>> >> > >> >>
>> >> > >> >>        
>> >> > >> >>                wicket.WicketWarp
>> >> >

Re: Guice & Wicket Guice Proxy

2010-06-08 Thread yaniv kessler
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)

Anyways, putting code habits aside, I was unable to understand from your
last mail if you succeeded in solving your problem, did you ?

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 :
> > 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 
> 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 :
> >> > > 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 :
> >> > >> > 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 :
> >> > >> >> 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 :
> >> > >> >>> 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
> >> > >> >>>  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 :
> >> > >> > 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
> >> > >> >  wrote:
> >> > >> >> yes, i think so:
> >> > >> >>
> >> > >> >> 
> >> > >> >> 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">
> >> > >> >>
> >> > >> >>IVR Web frontend
> >> > >> >>
> >> > >> >>
> >> > >> >>wicket.WicketWarp
> >> > >> >>
> >> > >>
> >> >
> >>
>  org.apache.wicket.protocol.http.WicketFilter
> >> > >> >>
> >> > >> >>
> >> >  applicationClassName
> >> > >> >>
> >> > >>
> >> >
> >>
>  com.netdesign.codan.webadmin.WicketApplication
> >> > >> >>
> >> > >> >>
> >> > >> >>
> >> > >> >>
>  configuration
> >> > >> >>deployment
> >> > >> >>
> >> > >> >>
> >> > >> >>
> >> > >> >>
> >> > >> >>warpPersistFilter
> >> > >> >>
> >> > >>
> >> >
>  com.wideplay.warp.persist.PersistenceFilter
> >> > >> >>
> >> > >> >>
> >> > >> >>
> >> > >> >>warpPersistFilter
> >> > >> >>  

Re: Guice & Wicket Guice Proxy

2010-06-07 Thread nino martinez wael
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 :
> 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  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 :
>> > > 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 :
>> > >> > 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 :
>> > >> >> 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 :
>> > >> >>> 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
>> > >> >>>  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 :
>> > >> > 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
>> > >> >  wrote:
>> > >> >> yes, i think so:
>> > >> >>
>> > >> >> 
>> > >> >> 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">
>> > >> >>
>> > >> >>        IVR Web frontend
>> > >> >>
>> > >> >>        
>> > >> >>                wicket.WicketWarp
>> > >> >>
>> > >>
>> >
>>  org.apache.wicket.protocol.http.WicketFilter
>> > >> >>                
>> > >> >>
>> >  applicationClassName
>> > >> >>
>> > >>
>> >
>>  com.netdesign.codan.webadmin.WicketApplication
>> > >> >>                
>> > >> >>
>> > >> >>                
>> > >> >>                        configuration
>> > >> >>                        deployment
>> > >> >>                
>> > >> >>        
>> > >> >>
>> > >> >>        
>> > >> >>                warpPersistFilter
>> > >> >>
>> > >>
>> >  com.wideplay.warp.persist.PersistenceFilter
>> > >> >>        
>> > >> >>
>> > >> >>        
>> > >> >>                warpPersistFilter
>> > >> >>                /*
>> > >> >>        
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>        
>> > >> >>                wicket.WicketWarp
>> > >> >>                /*
>> > >> >>        
>> > >> >>
>> > >> >>
>> > >> >> 
>> > >> >>
>> > >> >>
>> > >> >> 2010/6/2 Igor Vaynberg :
>> > >> >>> 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
>> > >> >>>  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 ha

Re: Guice & Wicket Guice Proxy

2010-06-07 Thread nino martinez wael
in my trying to fix the problem, I read about a bug regarding this.
However it is probably fixed now (was an old thread)..

2010/6/7 Jorge Rodrigez :
> 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 :
>> > 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 :
>> >> > 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 :
>> >> >> 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 :
>> >> >>> 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
>> >> >>>  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 :
>> >> > 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
>> >> >  wrote:
>> >> >> yes, i think so:
>> >> >>
>> >> >> 
>> >> >> 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">
>> >> >>
>> >> >>        IVR Web frontend
>> >> >>
>> >> >>        
>> >> >>                wicket.WicketWarp
>> >> >>
>> >>
>>  org.apache.wicket.protocol.http.WicketFilter
>> >> >>                
>> >> >>
>>  applicationClassName
>> >> >>
>> >>
>>  com.netdesign.codan.webadmin.WicketApplication
>> >> >>                
>> >> >>
>> >> >>                
>> >> >>                        configuration
>> >> >>                        deployment
>> >> >>                
>> >> >>        
>> >> >>
>> >> >>        
>> >> >>                warpPersistFilter
>> >> >>
>> >>
>>  com.wideplay.warp.persist.PersistenceFilter
>> >> >>        
>> >> >>
>> >> >>        
>> >> >>                warpPersistFilter
>> >> >>                /*
>> >> >>        
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>        
>> >> >>                wicket.WicketWarp
>> >> >>                /*
>> >> >>        
>> >> >>
>> >> >>
>> >> >> 
>> >> >>
>> >> >>
>> >> >> 2010/6/2 Igor Vaynberg :
>> >> >>> 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
>> >> >>>  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 conta

Re: Guice & Wicket Guice Proxy

2010-06-07 Thread yaniv kessler
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  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 :
> > > 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 :
> > >> > 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 :
> > >> >> 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 :
> > >> >>> 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
> > >> >>>  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 :
> > >> > 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
> > >> >  wrote:
> > >> >> yes, i think so:
> > >> >>
> > >> >> 
> > >> >> 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">
> > >> >>
> > >> >>IVR Web frontend
> > >> >>
> > >> >>
> > >> >>wicket.WicketWarp
> > >> >>
> > >>
> >
>  org.apache.wicket.protocol.http.WicketFilter
> > >> >>
> > >> >>
> >  applicationClassName
> > >> >>
> > >>
> >
>  com.netdesign.codan.webadmin.WicketApplication
> > >> >>
> > >> >>
> > >> >>
> > >> >>configuration
> > >> >>deployment
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >>warpPersistFilter
> > >> >>
> > >>
> >  com.wideplay.warp.persist.PersistenceFilter
> > >> >>
> > >> >>
> > >> >>
> > >> >>warpPersistFilter
> > >> >>/*
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >>wicket.WicketWarp
> > >> >>/*
> > >> >>
> > >> >>
> > >> >>
> > >> >> 
> > >> >>
> > >> >>
> > >> >> 2010/6/2 Igor Vaynberg :
> > >> >>> 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
> > >> >>>  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() {
> > >> Injecto

Re: Guice & Wicket Guice Proxy

2010-06-07 Thread Jorge Rodrigez
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 :
> > 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 :
> >> > 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 :
> >> >> 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 :
> >> >>> 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
> >> >>>  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 :
> >> > 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
> >> >  wrote:
> >> >> yes, i think so:
> >> >>
> >> >> 
> >> >> 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">
> >> >>
> >> >>IVR Web frontend
> >> >>
> >> >>
> >> >>wicket.WicketWarp
> >> >>
> >>
>  org.apache.wicket.protocol.http.WicketFilter
> >> >>
> >> >>
>  applicationClassName
> >> >>
> >>
>  com.netdesign.codan.webadmin.WicketApplication
> >> >>
> >> >>
> >> >>
> >> >>configuration
> >> >>deployment
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>warpPersistFilter
> >> >>
> >>
>  com.wideplay.warp.persist.PersistenceFilter
> >> >>
> >> >>
> >> >>
> >> >>warpPersistFilter
> >> >>/*
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>wicket.WicketWarp
> >> >>/*
> >> >>
> >> >>
> >> >>
> >> >> 
> >> >>
> >> >>
> >> >> 2010/6/2 Igor Vaynberg :
> >> >>> 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
> >> >>>  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);
> >> 

Re: Guice & Wicket Guice Proxy

2010-06-07 Thread nino martinez wael
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 :
> 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 :
>> > 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 :
>> >> 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 :
>> >>> 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
>> >>>  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 :
>> > 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
>> >  wrote:
>> >> yes, i think so:
>> >>
>> >> 
>> >> 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">
>> >>
>> >>        IVR Web frontend
>> >>
>> >>        
>> >>                wicket.WicketWarp
>> >>
>>  org.apache.wicket.protocol.http.WicketFilter
>> >>                
>> >>                        applicationClassName
>> >>
>>  com.netdesign.codan.webadmin.WicketApplication
>> >>                
>> >>
>> >>                
>> >>                        configuration
>> >>                        deployment
>> >>                
>> >>        
>> >>
>> >>        
>> >>                warpPersistFilter
>> >>
>>  com.wideplay.warp.persist.PersistenceFilter
>> >>        
>> >>
>> >>        
>> >>                warpPersistFilter
>> >>                /*
>> >>        
>> >>
>> >>
>> >>
>> >>
>> >>        
>> >>                wicket.WicketWarp
>> >>                /*
>> >>        
>> >>
>> >>
>> >> 
>> >>
>> >>
>> >> 2010/6/2 Igor Vaynberg :
>> >>> 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
>> >>>  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
>> 
>> 
>> -

Re: Guice & Wicket Guice Proxy

2010-06-07 Thread yaniv kessler
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 :
> > 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 :
> >> 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 :
> >>> 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
> >>>  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 :
> > 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
> >  wrote:
> >> yes, i think so:
> >>
> >> 
> >> 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">
> >>
> >>IVR Web frontend
> >>
> >>
> >>wicket.WicketWarp
> >>
>  org.apache.wicket.protocol.http.WicketFilter
> >>
> >>applicationClassName
> >>
>  com.netdesign.codan.webadmin.WicketApplication
> >>
> >>
> >>
> >>configuration
> >>deployment
> >>
> >>
> >>
> >>
> >>warpPersistFilter
> >>
>  com.wideplay.warp.persist.PersistenceFilter
> >>
> >>
> >>
> >>warpPersistFilter
> >>/*
> >>
> >>
> >>
> >>
> >>
> >>
> >>wicket.WicketWarp
> >>/*
> >>
> >>
> >>
> >> 
> >>
> >>
> >> 2010/6/2 Igor Vaynberg :
> >>> 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
> >>>  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.apa

Re: Guice & Wicket Guice Proxy

2010-06-06 Thread nino martinez wael
im still working on the quickstart.. So far I've been unable to
replicate.. I'll continue tomorrow

2010/6/5 nino martinez wael :
> 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 :
>> 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 :
>>> 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
>>>  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 :
> 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
>  wrote:
>> yes, i think so:
>>
>> 
>> 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">
>>
>>        IVR Web frontend
>>
>>        
>>                wicket.WicketWarp
>>                
>> org.apache.wicket.protocol.http.WicketFilter
>>                
>>                        applicationClassName
>>                        
>> com.netdesign.codan.webadmin.WicketApplication
>>                
>>
>>                
>>                        configuration
>>                        deployment
>>                
>>        
>>
>>        
>>                warpPersistFilter
>>                
>> com.wideplay.warp.persist.PersistenceFilter
>>        
>>
>>        
>>                warpPersistFilter
>>                /*
>>        
>>
>>
>>
>>
>>        
>>                wicket.WicketWarp
>>                /*
>>        
>>
>>
>> 
>>
>>
>> 2010/6/2 Igor Vaynberg :
>>> 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
>>>  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
>
>

 -
 T

Re: Guice & Wicket Guice Proxy

2010-06-05 Thread nino martinez wael
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 :
> 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 :
>> 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
>>  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 :
 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
  wrote:
> yes, i think so:
>
> 
> 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">
>
>        IVR Web frontend
>
>        
>                wicket.WicketWarp
>                
> org.apache.wicket.protocol.http.WicketFilter
>                
>                        applicationClassName
>                        
> com.netdesign.codan.webadmin.WicketApplication
>                
>
>                
>                        configuration
>                        deployment
>                
>        
>
>        
>                warpPersistFilter
>                
> com.wideplay.warp.persist.PersistenceFilter
>        
>
>        
>                warpPersistFilter
>                /*
>        
>
>
>
>
>        
>                wicket.WicketWarp
>                /*
>        
>
>
> 
>
>
> 2010/6/2 Igor Vaynberg :
>> 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
>>  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 additio

Re: Guice & Wicket Guice Proxy

2010-06-03 Thread nino martinez wael
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 :
> 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
>  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 :
>>> 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
>>>  wrote:
 yes, i think so:

 
 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">

        IVR Web frontend

        
                wicket.WicketWarp
                
 org.apache.wicket.protocol.http.WicketFilter
                
                        applicationClassName
                        
 com.netdesign.codan.webadmin.WicketApplication
                

                
                        configuration
                        deployment
                
        

        
                warpPersistFilter
                
 com.wideplay.warp.persist.PersistenceFilter
        

        
                warpPersistFilter
                /*
        




        
                wicket.WicketWarp
                /*
        


 


 2010/6/2 Igor Vaynberg :
> 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
>  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



Re: Guice & Wicket Guice Proxy

2010-06-03 Thread James Carman
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
 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 :
>> 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
>>  wrote:
>>> yes, i think so:
>>>
>>> 
>>> 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">
>>>
>>>        IVR Web frontend
>>>
>>>        
>>>                wicket.WicketWarp
>>>                
>>> org.apache.wicket.protocol.http.WicketFilter
>>>                
>>>                        applicationClassName
>>>                        
>>> com.netdesign.codan.webadmin.WicketApplication
>>>                
>>>
>>>                
>>>                        configuration
>>>                        deployment
>>>                
>>>        
>>>
>>>        
>>>                warpPersistFilter
>>>                
>>> com.wideplay.warp.persist.PersistenceFilter
>>>        
>>>
>>>        
>>>                warpPersistFilter
>>>                /*
>>>        
>>>
>>>
>>>
>>>
>>>        
>>>                wicket.WicketWarp
>>>                /*
>>>        
>>>
>>>
>>> 
>>>
>>>
>>> 2010/6/2 Igor Vaynberg :
 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
  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



Re: Guice & Wicket Guice Proxy

2010-06-03 Thread nino martinez wael
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 :
> 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
>  wrote:
>> yes, i think so:
>>
>> 
>> 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">
>>
>>        IVR Web frontend
>>
>>        
>>                wicket.WicketWarp
>>                
>> org.apache.wicket.protocol.http.WicketFilter
>>                
>>                        applicationClassName
>>                        
>> com.netdesign.codan.webadmin.WicketApplication
>>                
>>
>>                
>>                        configuration
>>                        deployment
>>                
>>        
>>
>>        
>>                warpPersistFilter
>>                
>> com.wideplay.warp.persist.PersistenceFilter
>>        
>>
>>        
>>                warpPersistFilter
>>                /*
>>        
>>
>>
>>
>>
>>        
>>                wicket.WicketWarp
>>                /*
>>        
>>
>>
>> 
>>
>>
>> 2010/6/2 Igor Vaynberg :
>>> 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
>>>  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



Re: Guice & Wicket Guice Proxy

2010-06-03 Thread Igor Vaynberg
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
 wrote:
> yes, i think so:
>
> 
> 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">
>
>        IVR Web frontend
>
>        
>                wicket.WicketWarp
>                
> org.apache.wicket.protocol.http.WicketFilter
>                
>                        applicationClassName
>                        
> com.netdesign.codan.webadmin.WicketApplication
>                
>
>                
>                        configuration
>                        deployment
>                
>        
>
>        
>                warpPersistFilter
>                
> com.wideplay.warp.persist.PersistenceFilter
>        
>
>        
>                warpPersistFilter
>                /*
>        
>
>
>
>
>        
>                wicket.WicketWarp
>                /*
>        
>
>
> 
>
>
> 2010/6/2 Igor Vaynberg :
>> 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
>>  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



Re: Guice & Wicket Guice Proxy

2010-06-03 Thread nino martinez wael
yes, i think so:


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">

IVR Web frontend


wicket.WicketWarp

org.apache.wicket.protocol.http.WicketFilter

applicationClassName

com.netdesign.codan.webadmin.WicketApplication



configuration
deployment




warpPersistFilter

com.wideplay.warp.persist.PersistenceFilter



warpPersistFilter
/*






wicket.WicketWarp
/*






2010/6/2 Igor Vaynberg :
> 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
>  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



Re: Guice & Wicket Guice Proxy

2010-06-02 Thread Igor Vaynberg
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
 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



Guice & Wicket Guice Proxy

2010-06-02 Thread nino martinez wael
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