You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by Jaliya Ekanayake <jn...@gmail.com> on 2006/07/14 18:16:47 UTC

Re: Thread Safety w/ SandeshaContext

Hi Matt,

Hmm.., I did not get the exception you have mentioned. However I have added a new sample that use several threads. Please take a new checkout. The sample is MutliThreadedEcho.java

Please note that I have fixed a problem with the way we use the UUIDGenerator. So now it should work fine.

Sandesha2 should also be fine with threads however I still did not test it.

Thanks,
Jaliya


  ----- Original Message ----- 
  From: Hill, Matthew (UK) 
  To: jnekanayake@gmail.com 
  Cc: jaliya@opensource.lk 
  Sent: Friday, July 14, 2006 6:51 AM
  Subject: Re: Thread Safety w/ SandeshaContext


  Jaliya

  Sorry for emailing to 2 addresses; I write with respect to the post below:

  http://mail-archives.apache.org/mod_mbox/ws-sandesha-dev/200603.mbox/browser

  Since this is a relatively old post I thought I'd email you direct to be more sure of a response. 

  I am also receiving the IllegalStateException when trying to run sandesha 1 with multiple threads. I have tried checking out and new copy as advised and building with maven 1 (then bundling up into a jar file) but have found it made no difference and I still receive the IllegalStateException error.

  My questions are: 
  1) Whether this is still a known issue with sandesha1 or if I have somehow gotten my compile wrong
  2) If sandesha2 is designed to be thread safe; I am considering porting over to sandesha2 but thought it may be quicker for me to ask before finding the latest version isn't thread safe either

  Regards
  Matt

  ps. The post referred to in the email:
Hi Alex,

Thanks for pointing this out. Now it is fixed. Please take a new checkout

from
http://svn.apache.org/repos/asf/webservices/sandesha/branches/sandesha_1_0/

and build using maven.

Thanks,

Jaliya


----- Original Message -----

From: "Alex Horwitz" <AH...@midwestiso.org>
To: <sa...@ws.apache.org>
Sent: Monday, March 06, 2006 10:17 AM
Subject: Thread Safety w/ SandeshaContext


Hello All:

My apologies if this has been asked / addressed before (or if my assessment

is incorrect).  I am implementing a simple test where I spin up multiple

client threads, each of which uses Sandesha (1.x) to reliable execute a

service.  This is resulting in an IllegalStateException.  A quick profile

session shows contention in the SandeshaContext.startClientSender method, as

multiple threads enter this static method concurrently and, consequently,

the Sender's startSender method is called multiple times against the same

instance, which has the effect of adding too many SenderWorkers to the

ThreadPool (hence, the Illegal State).

If anyone has experience with this issue, I would greatly appreciate your

assistance.

Thank you.

Alex Horwitz
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  Matthew Hill 
  Research Scientist, Networks Group
  BAE SYSTEMS Advanced Technology Centre 
  BAE SYSTEMS Ltd.
  Great Baddow
  Chelmsford, Essex UK CM2 8HN
  Email: matthew.hill@baesystems.com
  Tel:  +44 (0)1245 242027
  Fax: +44 (0)1245 242124
  VNET: 333 4027
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        ********************************************************************
        This email and any attachments are confidential to the intended
        recipient and may also be privileged. If you are not the intended
        recipient please delete it from your system and notify the sender.
        You should not copy it or use it for any purpose nor disclose or
        distribute its contents to any other person.
        ********************************************************************