On Fri, 2007-01-05 at 11:01 -0800, Bill Nagy wrote:
> I'm not giving up, and I want to argue some more 8-].

:). Sorry for the delay .. was traveling again (yeah getting an early
start this year).

> >From a pure Axis context perspective, I agree (without having looked
> through the code in detail) that your assertion about there not being
> any private state is correct.  From the perspective of the state as a
> whole, I don't agree -- in our use of Axis2, for example, we have
> properties stored in the contexts that have private state information
> that must be serialized.

That's no problem- the entire property bag must be saved anyway and
those properties are fully accessible thru the public API. So there's
nothing that cannot be reached by keeping the code elsewhere.

> I'm not arguing with the fact that we COULD place the serialization code
> outside of the objects that they operate on -- that can always be done
> (although it may require exposing an interface only used by the
> serialization mechanism if there is private info) -- I'm arguing about
> whether or not it SHOULD be done.  By moving it outside of the objects
> themselves, you are duplicating the "metadata" of the object structure
> and hierarchy and therefore any changes to that "metadata" (e.g. adding
> a new field, changing types, moving fields, etc.) need to be made both
> to the class and to logic external to the class.  I believe this to be
> error-prone and a bad design.  Maybe your are correct in believing that
> the serialization code can only be used by RM -- even so, I believe that
> RM is important enough that the core should make allowances for it and
> that this particular allowance makes for a more maintainable system if
> nothing else. 

So first of all, there's no private info at all- so there's no need for
an interface or anything like that.

There's really no "metadata" involved here: we're talking about the
context hierarchy which is a very core and (hopefully) carefully
designed component of Axis2. There are lots of bits of code that
navigate that hierarchy in different parts of Axis2. IMO the right way
to recover the context data is to create a new context and populate it
with the right parent/sibling refs and the right properties table. In
fact, we have to do the same for clustering stuff (more on that later).

Anyway, this is not a case of I'm right and you're wrong or vice versa.
Its a subjective decision of where to put some code- I'm not a fan of
putting this serialization code in the MC class because it doesn't fully
save and restore as "java object serialization" normally does, but I'm
not going to stop it from happening. 

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/


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

Reply via email to