From user-return-5776-apmail-uima-user-archive=uima.apache.org@uima.apache.org Tue Apr 1 12:05:52 2014 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 1A95E10D9D for ; Tue, 1 Apr 2014 12:05:52 +0000 (UTC) Received: (qmail 1170 invoked by uid 500); 1 Apr 2014 12:05:50 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 946 invoked by uid 500); 1 Apr 2014 12:05:50 -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 938 invoked by uid 99); 1 Apr 2014 12:05:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2014 12:05:49 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msa@schor.com designates 67.18.62.17 as permitted sender) Received: from [67.18.62.17] (HELO gateway08.websitewelcome.com) (67.18.62.17) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2014 12:05:44 +0000 Received: by gateway08.websitewelcome.com (Postfix, from userid 5007) id 9D9D5F838FE63; Tue, 1 Apr 2014 07:05:23 -0500 (CDT) Received: from gator3253.hostgator.com (gator3253.hostgator.com [198.57.247.217]) by gateway08.websitewelcome.com (Postfix) with ESMTP id 856BAF838FE34 for ; Tue, 1 Apr 2014 07:05:23 -0500 (CDT) Received: from [69.120.127.160] (port=50380 helo=[192.168.1.103]) by gator3253.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.80.1) (envelope-from ) id 1WUxRR-0006kD-U8 for user@uima.apache.org; Tue, 01 Apr 2014 07:05:22 -0500 Message-ID: <533AAB7F.7070802@schor.com> Date: Tue, 01 Apr 2014 08:05:19 -0400 From: Marshall Schor User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: user@uima.apache.org Subject: Re: Threadsafe advice for using SharedResourceObject References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3253.hostgator.com X-AntiAbuse: Original Domain - uima.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - schor.com X-BWhitelist: no X-Source-IP: 69.120.127.160 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.1.103]) [69.120.127.160]:50380 X-Source-Auth: msa+schor.com X-Email-Count: 1 X-Source-Cap: bWlzY2hvcjttaXNjaG9yO2dhdG9yMzI1My5ob3N0Z2F0b3IuY29t X-Virus-Checked: Checked by ClamAV on apache.org On 4/1/2014 7:05 AM, Swril wrote: > I have an AE that I am running in a CPE. > The AE has a ExternalResource to a SharedResourceObject. > I set the setMaxProcessingUnitThreadCount to 5. > > When I run the pipeline, I am getting errors like NPE which hinted that > things are out-of-step due to the multiple threads. > > Are there any advice on what to do for using AE with ExternalResource in a > CPE? One thought: it's probably necessary to write the code you supply for the SharedResourceObject to be thread safe. A good source for understanding the complex details around how to do this is http://lmgtfy.com/?q=java+concurrency+in+practice . -Marshall > > >