Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9EB6C10EA1 for ; Thu, 3 Apr 2014 13:08:16 +0000 (UTC) Received: (qmail 13340 invoked by uid 500); 3 Apr 2014 13:08:15 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 13039 invoked by uid 500); 3 Apr 2014 13:08:13 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 13025 invoked by uid 99); 3 Apr 2014 13:08:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2014 13:08:11 +0000 X-ASF-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_IN_PAST_24_48,FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gcaug-uima-user@m.gmane.org designates 80.91.229.3 as permitted sender) Received: from [80.91.229.3] (HELO plane.gmane.org) (80.91.229.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2014 13:08:04 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WVgLt-0007rs-P1 for user@uima.apache.org; Thu, 03 Apr 2014 14:02:41 +0200 Received: from 192.122.131.38 ([192.122.131.38]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Apr 2014 14:02:37 +0200 Received: from lriwswirl by 192.122.131.38 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Apr 2014 14:02:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: user@uima.apache.org From: Swril Subject: Re: Threadsafe advice for using SharedResourceObject Date: Wed, 2 Apr 2014 00:49:30 +0000 (UTC) Lines: 19 Message-ID: References: <533AAB7F.7070802@schor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 192.122.131.38 (Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36) X-Virus-Checked: Checked by ClamAV on apache.org Richard Eckart de Castilho writes: > > I assume you are talking about runtime, not initialization time. > > At runtime, it is convenient if the shared object has no mutable > state. If it has, you might want to wrap that in as ThreadLocal > variable. > > If there is a problem during initialization, that would be a bug > I suppose. > Thanks for your answers. Yes I was talking about runtime. We found that the sharedresource was using instance variable and have changed it to local variable. It runs ok now.