Re: WOXMLDecoder not thread safe

2017-09-07 Thread Chuck Hill
Hi Terry,

There is no magic, just don’t share it between threads.  That means no keeping 
it in a static variable for sure.  And don’t keep it in an instance variable in 
an object that can be accessed by multiple threads (e.g on the Application).  
If your requests are session based, then keeping it in the session should be 
OK.  If they are not, then create a new instance in the action where you need 
to use it.

Chuck

From: Webobjects-dev 
 on behalf of 
"Soles, James T" 
Date: Wednesday, September 6, 2017 at 12:19 PM
To: "webobjects-dev@lists.apple.com" 
Cc: eval-dev 
Subject: WOXMLDecoder not thread safe

All,

I've seen some comments when searching that indicate that WOXMLDecoder is not 
thread safe.  However, I've not found anything that indicates how to resolve 
this or any workarounds.

First, is it true that WOXMLDecoder is not thread safe?

If so, are there any options to resolve this or workarounds?  We are using it 
to read and parse a string on an incoming web service call.  Recently we have 
started seeing a lot of parser errors 
(com.webobjects.foundation.NSForwardException for org.xml.sax.SAXException: 
FWK005 parse may not be called while parsing.) when it appears that we receive 
many calls to our web service at about the same time.

Any thoughts or suggestions are welcome.

Thanks,

Terry Soles

214-273-3916
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


WOXMLDecoder not thread safe

2017-09-06 Thread Soles, James T
All,

I've seen some comments when searching that indicate that WOXMLDecoder is
not thread safe.  However, I've not found anything that indicates how to
resolve this or any workarounds.

First, is it true that WOXMLDecoder is not thread safe?

If so, are there any options to resolve this or workarounds?  We are using
it to read and parse a string on an incoming web service call.  Recently we
have started seeing a lot of parser errors
(com.webobjects.foundation.NSForwardException for org.xml.sax.SAXException:
FWK005 parse may not be called while parsing.) when it appears that we
receive many calls to our web service at about the same time.

Any thoughts or suggestions are welcome.

Thanks,

*Terry Soles*

214-273-3916
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com