On Tue, 8 Nov 2005 11:59:22 -0800, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:
Im still getting a class cast exception using cglib directly. im probably
doing something dumb, you want to take a look? SpringInitializer line 61
is
commented out, thats where proxies are created for concrete objects.
I think the problem is in the SpringLazyLookupInterceptor.intercept()
method you should at the
end call proxy.invoke(target, args) instead of proxy.invokeSuper().
invokeSuper expects that the given argument is the enhanced instance. You
need it to call methods on the super (original) class.
By the way, the spring one works fine IF the dependency implements
Serializable, because then the proxy itself becomes serializable since
its a
subclass. so im wondering if we can just weave in that interface into the
created subclass and that will solve our problem. what do you think?
That seems reasonable. I'll post a question on the spring list and see
what they say.
Christian
-Igor
On 11/8/05, Christian Essl <[EMAIL PROTECTED]> wrote:
I do not know wheter read/writeObject is called on objects referenced
from
session attributes ("full serialization closure"). However the spec does
not speak about writeReplace()
and readResolve() so 'legaly' you should be on the right side if you
rely
on these.
Enclosed is some code which I guess does what is described on the cglib
howto page. I have not tested the code yet. I'll try to do so until
tomorrow.
Anyway is it so important to inject objects without interfaces?
Christian
On Tue, 8 Nov 2005 09:07:24 -0800, Igor Vaynberg
<[EMAIL PROTECTED]>
wrote:
> got the proxies for concrete objects working, but another dead end
> unfortunately. seems cglib proxies are not serializable objects. in
their
> howto they recommend overriding read/write resolve and reconstructing
the
> proxy, but those are not guaranteed to be called when nonstandard
> serialization is used. not sure where to go from here
>
> -Igor
>
>
--
Christian Essl
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user