Erm... i was a little bit. However in my defence you would assume that if you are using a multi threaded connection manager it might think about locking the httpclient object while making the calls. Am i expecting too much?
This axis thing is a tough one to work out. Im not sure what it synchornisation policy is since now i have gotten rid of all the multi threaded bit but still get AXIS FAULTS and lots of errors like
Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Premature end of file.
I can only assume that this is because i have multiple threads accessing a single binding object(for place bets, cancel, get prices etc.). Surely there is some sort of locking policy around this? I am thinking maybe not since axis2 makes all that who har about asyncronus web service calls so i can only assume threads using the binding are handing off to some axis thread. Hence how the returns might get screwed up.
Today i am trying two things. Object pooling for bindings, and alternately giving every function call its own binding(Plan B). This is all i can really think of at the moment so if anyone thinks Im completely missing the point then any help is welcome.
If this doesnt work Im going to read the axis2 manual. lets just hope it doent come to that!!!