2 Replies Latest reply on Jul 1, 2003 6:54 AM by solo

    transient and deserialization

    solo Newbie

      Hi, I'm new to AOP. To try it out I've written a simple VersionableInstance (and it's interface) with a VersionableInterceptor. Basic idea was to test Interceptor, Introductor and metadata. The functionality is to persist the whole instance (stupid I know! :-)) when a configured member field on a particular class where written. So far soo good - it persist correctly and I can cast and check the version etc.

      While deserializing the older versions from disk the transient field of the mixin class is not instantiated (correct behaviour) but since the field is private I canno't initialize it when deserialize it from disk. The hack I've done so far (is ugly!) is to set the field

      "_se$solo$aop$persistor$VersionableInstance$aop$mixin"
      Accessible and instantiated a VersionableInstance and put it there by reflection by later set it Accessible(false).

      This is not a good solution. Is there any other good way of doing this?

      Many Regards
      Mario