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.

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?

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


Reply via email to