You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Takashi Okamoto <to...@rd.nttdata.co.jp> on 2002/06/17 14:28:47 UTC
[PATCH] multithread problem (Re: Thread safe clients)
Hi, axis developers.
Following code is thread unsafe by Ramon
reporting(ramon.turnes-perez@hermes.si) in axis-user ml. Please fix it.
regards,
Takashi Okamoto
--- Message.java.orig 2002-06-17 21:21:42.000000000 +0900
+++ Message.java 2002-06-17 21:21:22.000000000 +0900
@@ -195,9 +195,9 @@
private static Class attachImpl = null;
//aviod testing and possibly failing everytime.
- private static boolean checkForAttchmentSupport = true;
+ private boolean checkForAttchmentSupport = true;
- private static boolean attachmentSupportEnabled = false;
+ private boolean attachmentSupportEnabled = false;
public boolean isAttachmentSupportEnabled() {
if (checkForAttchmentSupport) {
----- Original Message -----
From: "Ramon Turnes" <ra...@hermes.si>
To: <ax...@xml.apache.org>
Sent: Monday, June 17, 2002 7:36 PM
Subject: RE: Thread safe clients
>
> I am using Xerces 2.0.1 but I don't think that this is the only problem,
> first, Message class is not thread safe (isAttachmentSupportEnabled
> method which uses static variables is not thread safe). I cannot send
> two requests from different threads and locking the whole Message
> class is not an acceptable solution.
>
> Thanks for your answer.
>
> > -----Original Message-----
> > From: Takashi Okamoto [mailto:tokamoto@rd.nttdata.co.jp]
> > Sent: Monday, June 17, 2002 12:28 PM
> > To: axis-user@xml.apache.org
> > Subject: Re: Thread safe clients
> >
> >
> > > I have problems when sending two simulaneous requests
> > > (from different threads) to the same URL. I have been playing
> > > a little bit with axis source code and everything seems to work
> > > if I synchronize the invoke(SOAPEnvelope) method in
> > > Call.java
> >
> > Which version of xerces did you use?
> >
> > Here is a my opinions:
> >
> > + I had problem with Xerces 2.0.x while call
> > Call.invoke(Object []) in
> > multithread. But it perhaps work good with xerces1.4.4.
> >
> > + The SOAPEnvelop was broken when share one element for
> > some SOAPEnvelope instance in each threads.
> > (SOAPEnvelope just refer element which is specified constructor)
> >
> > + At least axis beta2 have multithread problem at XMLUtils.java
> > around DOM. (It was fixed in CVS by my patch:))
> >
> > Does anybody have other opinionsabout multithread?
> >
> > reagrds,
> >
> > Takashi Okamoto
> >
>