Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DAA8E200C61 for ; Tue, 11 Apr 2017 04:03:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D92AE160BA5; Tue, 11 Apr 2017 02:03:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 525E7160B99 for ; Tue, 11 Apr 2017 04:03:02 +0200 (CEST) Received: (qmail 28825 invoked by uid 500); 11 Apr 2017 02:03:01 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Delivered-To: moderator for users@felix.apache.org Received: (qmail 28090 invoked by uid 99); 11 Apr 2017 02:02:10 -0000 X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.173 X-Spam-Level: ** X-Spam-Status: No, score=2.173 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972] autolearn=disabled Date: Mon, 10 Apr 2017 19:02:08 -0700 (MST) From: jsaimani To: users@felix.apache.org Message-ID: <1491876128544-5021145.post@n6.nabble.com> Subject: Suggested solution for multiple java processes accessing felix cache in embedded more MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Tue, 11 Apr 2017 02:03:03 -0000 We have a use case where we trying to use felix in embedded mode. But we have a bunch of background jobs that run in parallel which initiate a new java process ending up accessing the same felix cache. And we are using the storage clean onFirstInit flag while starting the container. So in some scenarios when a race condition happens, on guy ends up deleting the cache, while other one things installation is successful and retrieval fails. What is the recommended pattern to solve this ? where we have 'n' java processes (n could be even 100+) , using embedded felix ? Is using a unique felix-cache directory for each process good solution? do we run any risk. What are do and don't. In some cases some java processes may get killed abruptly. Re-using the same felix-cache without clean flag may get us into some issues as we see that felix stores some state information about bundles in the directory, so re-use may not be a good option. -- View this message in context: http://apache-felix.18485.x6.nabble.com/Suggested-solution-for-multiple-java-processes-accessing-felix-cache-in-embedded-more-tp5021145.html Sent from the Apache Felix - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org