Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F6BB10706 for ; Thu, 20 Jun 2013 07:20:44 +0000 (UTC) Received: (qmail 7134 invoked by uid 500); 20 Jun 2013 07:20:41 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 7024 invoked by uid 500); 20 Jun 2013 07:20:37 -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 Received: (qmail 6942 invoked by uid 99); 20 Jun 2013 07:20:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jun 2013 07:20:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [217.70.183.196] (HELO relay4-d.mail.gandi.net) (217.70.183.196) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jun 2013 07:20:27 +0000 Received: from mfilter25-d.gandi.net (mfilter25-d.gandi.net [217.70.178.153]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id BE227172071 for ; Thu, 20 Jun 2013 09:19:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter25-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter25-d.gandi.net (mfilter25-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 97JCoa-Mtkdn for ; Thu, 20 Jun 2013 09:19:44 +0200 (CEST) X-Originating-IP: 84.99.12.120 Received: from [10.0.0.3] (120.12.99.84.rev.sfr.net [84.99.12.120]) (Authenticated sender: thiebault@artenum.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 43AC6172074 for ; Thu, 20 Jun 2013 09:19:43 +0200 (CEST) From: =?iso-8859-1?Q?Beno=EEt_Thi=E9bault?= Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: multipart/alternative; boundary=Apple-Mail-1-416074369 Subject: Re: Running several instances of Felix Date: Thu, 20 Jun 2013 09:19:41 +0200 In-Reply-To: <62A6B3144CC74F1288BC3FF833DCB491@gmail.com> To: users@felix.apache.org References: <68F91CCA-8845-4C88-94EA-408494FAE6A5@artenum.com> <363BAFB9-BD51-45C7-BEB4-530359BFCFD0@artenum.com> <62A6B3144CC74F1288BC3FF833DCB491@gmail.com> Message-Id: X-Mailer: Apple Mail (2.1085) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-1-416074369 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Agreed. What other options are there to prevent this? Le 19 juin 2013 =E0 10:27, Neil Bartlett a =E9crit : > Well, if you're happy to throw away all your users' persistent data, = and start OSGi from a blank slate every time... =20 >=20 > -- =20 > Neil Bartlett > Sent from a phone >=20 >=20 > On Wednesday, 19 June 2013 at 09:04, Beno=EEt Thi=E9bault wrote: >=20 >> Does Felix automatically interpret system properties in the = config.properties files? >>=20 >> That would indeed be a simple solution. >>=20 >> This would however mean that each execution will create a new cache = folder that will not be deleted. I guess I should create it in the /tmp = folder so they get cleaned. >>=20 >> Beno=EEt >>=20 >> Le 19 juin 2013 =E0 09:54, Chetan Mehrotra a =E9crit : >>=20 >>> If you just want to share the bundles between various Felix = instances >>> you can try specifying a different value for >>> 'org.osgi.framework.storage' [1] for each launch command say by >>> passing in a system property. This would allow Felix to use = different >>> dir for its caches and hence would avoid any potential issue related >>> to concurrent access. >>>=20 >>> [1] = http://felix.apache.org/site/apache-felix-framework-bundle-cache.html >>>=20 >>> Chetan Mehrotra >>>=20 >>>=20 >>> On Wed, Jun 19, 2013 at 1:19 PM, Beno=EEt Thi=E9bault = wrote: >>>> Multiple JVM (and separate processes). >>>>=20 >>>> Le 19 juin 2013 =E0 09:47, Chetan Mehrotra a =E9crit : >>>>=20 >>>>> Do you want to launch multiple jvm (seprate processes) of Felix or >>>>> within same process multiple Felix instances? >>>>>=20 >>>>> Chetan Mehrotra >>>>>=20 >>>>>=20 >>>>> On Wed, Jun 19, 2013 at 1:12 PM, Beno=EEt Thi=E9bault = wrote: >>>>>> Hi everyone, >>>>>>=20 >>>>>> We have developed a simulation software based on OSGi and using = Felix. >>>>>>=20 >>>>>> The execution of the application is done in a script that = executes the following command: >>>>>> java -jar = -Dfelix.config.properties=3Dfile:./resources/felix/config.properties = ./dependencies/thirdparty/felix-4.0.2/felix.jar >>>>>>=20 >>>>>> We then have two folders containing all the OSGi bundles that are = automatically installed and started by felix when it is launched. >>>>>>=20 >>>>>> This works very well. >>>>>>=20 >>>>>> Users have however requested to be able to launch several = instances of our software (to run several simulations in parallel for = instance). This however does not work and I think felix has difficulties = dealing with the cache folder when multiple instances are running in = parallel >>>>>>=20 >>>>>> Our Felix config.properties file is in attachement. >>>>>>=20 >>>>>> Does anyone know how to solve this problem? >>>>>>=20 >>>>>> Kind regards, >>>>>>=20 >>>>>> Ben >>>>>>=20 >>>>>> # Licensed to the Apache Software Foundation (ASF) under one >>>>>> # or more contributor license agreements. See the NOTICE file >>>>>> # distributed with this work for additional information >>>>>> # regarding copyright ownership. The ASF licenses this file >>>>>> # to you under the Apache License, Version 2.0 (the >>>>>> # "License"); you may not use this file except in compliance >>>>>> # with the License. You may obtain a copy of the License at >>>>>> # >>>>>> # http://www.apache.org/licenses/LICENSE-2.0 >>>>>> # >>>>>> # Unless required by applicable law or agreed to in writing, >>>>>> # software distributed under the License is distributed on an >>>>>> # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY >>>>>> # KIND, either express or implied. See the License for the >>>>>> # specific language governing permissions and limitations >>>>>> # under the License. >>>>>>=20 >>>>>> # >>>>>> # Framework config properties. >>>>>> # >>>>>>=20 >>>>>> # To override the packages the framework exports by default from = the >>>>>> # class path, set this variable. >>>>>> #org.osgi.framework.system.packages=3D >>>>>>=20 >>>>>> # To append packages to the default set of exported system = packages, >>>>>> # set this value. >>>>>> #org.osgi.framework.system.packages.extra=3D >>>>>>=20 >>>>>> # The following property makes specified packages from the class = path >>>>>> # available to all bundles. You should avoid using this property. >>>>>> org.osgi.framework.bootdelegation=3Dsun.awt.*, sun.sun.*, = com.sun.org.*, com.sun.*, sun.*, org.w3c.dom.traversal >>>>>> #sun.*, com.sun.* >>>>>>=20 >>>>>> # Felix tries to guess when to implicitly boot delegate in = certain >>>>>> # situations to ease integration without outside code. This = feature >>>>>> # is enabled by default, uncomment the following line to disable = it. >>>>>> #felix.bootdelegation.implicit=3Dfalse >>>>>>=20 >>>>>> # The following property explicitly specifies the location of the = bundle >>>>>> # cache, which defaults to "felix-cache" in the current working = directory. >>>>>> # If this value is not absolute, then the felix.cache.rootdir = controls >>>>>> # how the absolute location is calculated. (See next property) >>>>>> #org.osgi.framework.storage=3D${felix.cache.rootdir}/felix-cache >>>>>>=20 >>>>>> # The following property is used to convert a relative bundle = cache >>>>>> # location into an absolute one by specifying the root to prepend = to >>>>>> # the relative cache path. The default for this property is the >>>>>> # current working directory. >>>>>> felix.cache.rootdir=3D${user.dir} >>>>>>=20 >>>>>> # The following property controls whether the bundle cache is = flushed >>>>>> # the first time the framework is initialized. Possible values = are >>>>>> # "none" and "onFirstInit"; the default is "none". >>>>>> org.osgi.framework.storage.clean=3DonFirstInit >>>>>>=20 >>>>>> # The following property determines which actions are performed = when >>>>>> # processing the auto-deploy directory. It is a comma-delimited = list of >>>>>> # the following values: 'install', 'start', 'update', and = 'uninstall'. >>>>>> # An undefined or blank value is equivalent to disabling = auto-deploy >>>>>> # processing. >>>>>> felix.auto.deploy.action=3Dinstall,start >>>>>>=20 >>>>>> # The following property specifies the directory to use as the = bundle >>>>>> # auto-deploy directory; the default is 'bundle' in the working = directory. >>>>>> felix.auto.deploy.dir=3D./dependencies/main >>>>>>=20 >>>>>> # The following property is a space-delimited list of bundle URLs >>>>>> # to install when the framework starts. The ending numerical = component >>>>>> # is the target start level. Any number of these properties may = be >>>>>> # specified for different start levels. >>>>>> #felix.auto.install.1=3D >>>>>>=20 >>>>>> # The following property is a space-delimited list of bundle URLs >>>>>> # to install and start when the framework starts. The ending = numerical >>>>>> # component is the target start level. Any number of these = properties >>>>>> # may be specified for different start levels. >>>>>> #felix.auto.start.1=3D >>>>>>=20 >>>>>> felix.log.level=3D1 >>>>>>=20 >>>>>> # Sets the initial start level of the framework upon startup. >>>>>> #org.osgi.framework.startlevel.beginning=3D1 >>>>>>=20 >>>>>> # Sets the start level of newly installed bundles. >>>>>> #felix.startlevel.bundle=3D1 >>>>>>=20 >>>>>> # Felix installs a stream and content handler factories by = default, >>>>>> # uncomment the following line to not install them. >>>>>> #felix.service.urlhandlers=3Dfalse >>>>>>=20 >>>>>> # The launcher registers a shutdown hook to cleanly stop the = framework >>>>>> # by default, uncomment the following line to disable it. >>>>>> #felix.shutdown.hook=3Dfalse >>>>>>=20 >>>>>> # >>>>>> # Bundle config properties. >>>>>> # >>>>>> org.osgi.service.http.port=3D8080 >>>>>> obr.repository.url=3Dhttp://felix.apache.org/obr/releases.xml >>>>>>=20 >>>>>> # File install configuration >>>>>> felix.fileinstall.dir=3D./lib >>>>>> felix.fileinstall.log.level=3D1 >>>>>> felix.fileinstall.noInitialDelay=3Dtrue >>>>>> felix.fileinstall.poll=3D10000 >>>>>>=20 >>>>>>=20 >>>>>> -- >>>>>> Dr Beno=EEt Thi=E9bault >>>>>> Project Manager >>>>>>=20 >>>>>> Artenum Toulouse - Science & Groupware >>>>>> http://www.artenum.com >>>>>>=20 >>>>>> B=E2timent Calfocenter >>>>>> 10, rue Marguerite-Long >>>>>> 31320 Castanet-Tolosan >>>>>> France >>>>>> Phone: +33 (0)5 82 95 19 00 >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> = --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org >>>>>> For additional commands, e-mail: users-help@felix.apache.org >>>>>>=20 >>>>>=20 >>>>>=20 >>>>> = --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org >>>>> For additional commands, e-mail: users-help@felix.apache.org >>>>>=20 >>>>=20 >>>>=20 >>>> -- >>>> Dr Beno=EEt Thi=E9bault >>>> Project Manager >>>>=20 >>>> Artenum Toulouse - Science & Groupware >>>> http://www.artenum.com >>>>=20 >>>> B=E2timent Calfocenter >>>> 10, rue Marguerite-Long >>>> 31320 Castanet-Tolosan >>>> France >>>> Phone: +33 (0)5 82 95 19 00 >>>>=20 >>>=20 >>>=20 >>> = --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org >>> For additional commands, e-mail: users-help@felix.apache.org >>>=20 >>=20 >>=20 >> -- =20 >> Dr Beno=EEt Thi=E9bault >> Project Manager >>=20 >> Artenum Toulouse - Science & Groupware >> http://www.artenum.com >>=20 >> B=E2timent Calfocenter >> 10, rue Marguerite-Long >> 31320 Castanet-Tolosan >> France >> Phone: +33 (0)5 82 95 19 00 >>=20 >>=20 >=20 >=20 --=20 Dr Beno=EEt Thi=E9bault Project Manager Artenum Toulouse - Science & Groupware http://www.artenum.com B=E2timent Calfocenter 10, rue Marguerite-Long 31320 Castanet-Tolosan France Phone: +33 (0)5 82 95 19 00 --Apple-Mail-1-416074369--