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 Tue, 21 Mar 2006 22:55:31 GMT
One of the basic assumptions of Axis2 handler architecture is that
handlers are stateless .. so there should not be attributes in the
class (expect for HandlerMedatadata).  Just notice
AddressingOutHandler has a attribute that leads to this unpleasant
surprise

We should be writing a Handler developer guide :) .. for the time
being lets follow the stateless principal in the future (if there is a
state to be stored .. it should be at appropriate context )

Srinath

On 3/21/06, Davanum Srinivas <davanum@gmail.com> wrote:
> Jaliya,
>
> +1 to #1. Please commit the fix.
>
> -- dims
>
> On 3/21/06, Jaliya Ekanayake <jnekanayake@gmail.com> wrote:
> > Hi Devs,
> >
> > I was trying to use several axis2 clients in multiple threads and found
> > these problems.
> >
> > 1:
> >
> > When clients are configured to use a separate transport listener the status
> > of the listener (whether started or not) is kept in the ListenerManager and
> > is checked by the static methods of the ClientUtils class. So this leads to
> > synchronization problems and gives java.net.BindException.
> > Solution is to synchronize the methods in the ListenerManger and the
> > ClientUtils classes. I can commit the fix for this.
> >
> > 2: NullpointerException at the AddressingOutHandler
> >
> > java.lang.NullPointerException
> >     at
> > org.apache.axis2.handlers.addressing.AddressingOutHandler.isAddressingHeaderAlreadyAvailable(AddressingOutHandler.java:407)
> >     at
> > org.apache.axis2.handlers.addressing.AddressingOutHandler.invoke(AddressingOutHandler.java
> > :130)
> >     at org.apache.axis2.engine.Phase.invoke(Phase.java:378)
> >     at
> > org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:418)
> >     at
> > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:518)
> >     at
> > org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:263)
> >     at
> > org.apache.axis2.client.ServiceClient.sendReceiveNonBlocking(ServiceClient.java:481)
> >     at org.apache.axis2.client.ServiceClient.sendReceive
> > (ServiceClient.java:425)
> >     at
> > userguide.clients.EBLoadClient.run(EBLoadClient.java:130)
> > java.lang.NullPointerException
> >
> > The reason for this is we keep addressingNamespaceObject in the handler
> > itself. So with multiple threads it produces undefined behavior.
> > I think we should give a better fix for this rather than synchronization.
> >
> > So please have a look.
> >
> > Thanks,
> >
> > Jaliya
> >
> >
> >
>
>
> --
> Davanum Srinivas : http://wso2.com/blogs/
>


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

Mime
View raw message