You being one of the pioneers in Axis2, how can you talk abt some old code ? ;-) Get an svn up and you will see they are no more like that.

Srinath Perera wrote:
On 3/21/06, Eran Chinthaka <[EMAIL PROTECTED]> wrote:
I have not kept this attribute across multiple invocations of the same
handler. Its *within* one invocation of that handler.
Are you keeping an instance var that holds some value across two or more
methods in the same handler? That is, do you use an instance var to pass
some state from the main method to other methods? If so that will lead
to problems and can easily be fixed with params.

If not I'm confused what the offending thing is; can someone point out
the code please.
the class is org.apache.axis2.handlers.addressing.AddressingOutHandler,

offending part is (following is yesterdays code) Handler attributes
addressingNamespaceObject and msgCtxt .. they remember things between
the method invocations (addressingNamespaceObject accsessed by most
method without passing it in .. e.g.
processToEPRReferenceInformation(....)) and run in to trouble

anothor thought .. we should be careful when hanging to the
messagecontext from some instance varaible as that might lead to
memeory leaks if object  (e.g. Handler) is never garbage collected

Thanks
Srinath

public class AddressingOutHandler extends AddressingHandler {
   ..............
    protected OMNamespace addressingNamespaceObject;
    private MessageContext msgCtxt;
    public void invoke(MessageContext msgContext) throws AxisFault {
                        .....................
    }
 }

--
============================
Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani


Reply via email to