Maybe it's Hivemind that's doing the enhancing, not Spring?
Alternately it might be the annotation library or some other agency. I've
had a lot of weirdness with CGLIC enhanced classes in the past (like they
screw up potentially simple things like using the == operator to test for
object identity if one side of the identity is "enhanced" into a new proxy
in the meantime).

        Recently, my CGLIB problems seem to have settled down, which leads
me to believe that I've probably just sub-consciously taken the "stop
hitting your head on the wall if it hurts" approach to solving the problem. 

        I suspect it's something subtle, because as I mentioned
theoretically 

        Foo f = (Foo) GCLIB_Enhanced_Foo should work

        Other than pointing at GCLIB as a possible place to look, I can't
offer any more help unfortunately :(.

        In the meantime, I need to get to bed; a day spent watching disaster
video and being utterly unable to do anything is catching up with me.

        --- Pat

> -----Original Message-----
> From: Jun Tsai [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 02, 2005 12:21 AM
> To: Tapestry users
> Subject: Re: @InjectObject spring beans proxyed with Spring-AOP problem.
> 
> Patrick Casey wrote:
> >     CGLIB is an enhancement library that a lot of open source packages
> > use to create dynamic proxies of your classes (usually to bolt on their
> > specific accessors and proxy code to your POJOs). It's used by both
> spring
> > and hibernate pretty extensively, and it looks like you've got spring
> > running. So what's happening is that spring is enhancing your class for
> you.
> >
> >     *However* and this is the part where I get less helpful, an enhanced
> > class *should* be a subclass of the original class, hence it should
> still be
> > assignable. So, *in theory* you shouldn't get the error you're getting.
> In
> > theory, of course, theory and practice are the same.
> >
> >     One (possible serious voodoo) things that often help:
> >
> >     Make all the methods of your testService public (not package scope,
> > *public*).
> >
> >     --- Pat
> >
> 
> Thank your reply.
> If I don't use @InjectObject,I can get the TestService directly by
> Spring and the testService object works fine.
> 
> why?
> 
> Jun Tsai
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to