axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srinath Perera" <hemap...@gmail.com>
Subject Re: [Axis2] Some problems in the client side with multiple threading.
Date Wed, 22 Mar 2006 14:18:13 GMT
> > On 3/21/06, Eran Chinthaka <chinthaka@opensource.lk> 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

Mime
View raw message