felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Bartlett <njbartl...@gmail.com>
Subject Re: Running several instances of Felix
Date Thu, 20 Jun 2013 08:02:20 GMT
Write a launcher. Then you can control the storage directory however you like.  

You seem keen to void this, but I believe it's exactly what you need, and it really isn't
a lot of work.  

Neil  

--  
Neil Bartlett
Sent from a phone


On Thursday, 20 June 2013 at 08:19, Benoît Thiébault wrote:

> Agreed.
> What other options are there to prevent this?
>  
> Le 19 juin 2013 à 10:27, Neil Bartlett a écrit :
>  
> > Well, if you're happy to throw away all your users' persistent data, and start OSGi
from a blank slate every time...  
> >  
> > --  
> > Neil Bartlett
> > Sent from a phone
> >  
> >  
> > On Wednesday, 19 June 2013 at 09:04, Benoît Thiébault wrote:
> >  
> > > Does Felix automatically interpret system properties in the config.properties
files?
> > >  
> > > That would indeed be a simple solution.
> > >  
> > > 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.
> > >  
> > > Benoît
> > >  
> > > Le 19 juin 2013 à 09:54, Chetan Mehrotra a écrit :
> > >  
> > > > 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.
> > > >  
> > > > [1] http://felix.apache.org/site/apache-felix-framework-bundle-cache.html
> > > >  
> > > > Chetan Mehrotra
> > > >  
> > > >  
> > > > On Wed, Jun 19, 2013 at 1:19 PM, Benoît Thiébault <thiebault@artenum.com>
wrote:
> > > > > Multiple JVM (and separate processes).
> > > > >  
> > > > > Le 19 juin 2013 à 09:47, Chetan Mehrotra a écrit :
> > > > >  
> > > > > > Do you want to launch multiple jvm (seprate processes) of Felix
or
> > > > > > within same process multiple Felix instances?
> > > > > >  
> > > > > > Chetan Mehrotra
> > > > > >  
> > > > > >  
> > > > > > On Wed, Jun 19, 2013 at 1:12 PM, Benoît Thiébault <thiebault@artenum.com>
wrote:
> > > > > > > Hi everyone,
> > > > > > >  
> > > > > > > We have developed a simulation software based on OSGi and
using Felix.
> > > > > > >  
> > > > > > > The execution of the application is done in a script that
executes the following command:
> > > > > > > java -jar -Dfelix.config.properties=file:./resources/felix/config.properties
./dependencies/thirdparty/felix-4.0.2/felix.jar
> > > > > > >  
> > > > > > > We then have two folders containing all the OSGi bundles
that are automatically installed and started by felix when it is launched.
> > > > > > >  
> > > > > > > This works very well.
> > > > > > >  
> > > > > > > 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
> > > > > > >  
> > > > > > > Our Felix config.properties file is in attachement.
> > > > > > >  
> > > > > > > Does anyone know how to solve this problem?
> > > > > > >  
> > > > > > > Kind regards,
> > > > > > >  
> > > > > > > Ben
> > > > > > >  
> > > > > > > # 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.
> > > > > > >  
> > > > > > > #
> > > > > > > # Framework config properties.
> > > > > > > #
> > > > > > >  
> > > > > > > # To override the packages the framework exports by default
from the
> > > > > > > # class path, set this variable.
> > > > > > > #org.osgi.framework.system.packages=
> > > > > > >  
> > > > > > > # To append packages to the default set of exported system
packages,
> > > > > > > # set this value.
> > > > > > > #org.osgi.framework.system.packages.extra=
> > > > > > >  
> > > > > > > # The following property makes specified packages from
the class path
> > > > > > > # available to all bundles. You should avoid using this
property.
> > > > > > > org.osgi.framework.bootdelegation=sun.awt.*, sun.sun.*,
com.sun.org.*, com.sun.*, sun.*, org.w3c.dom.traversal
> > > > > > > #sun.*, com.sun.*
> > > > > > >  
> > > > > > > # 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=false
> > > > > > >  
> > > > > > > # 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=${felix.cache.rootdir}/felix-cache
> > > > > > >  
> > > > > > > # 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=${user.dir}
> > > > > > >  
> > > > > > > # 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=onFirstInit
> > > > > > >  
> > > > > > > # 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=install,start
> > > > > > >  
> > > > > > > # 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=./dependencies/main
> > > > > > >  
> > > > > > > # 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=
> > > > > > >  
> > > > > > > # 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=
> > > > > > >  
> > > > > > > felix.log.level=1
> > > > > > >  
> > > > > > > # Sets the initial start level of the framework upon startup.
> > > > > > > #org.osgi.framework.startlevel.beginning=1
> > > > > > >  
> > > > > > > # Sets the start level of newly installed bundles.
> > > > > > > #felix.startlevel.bundle=1
> > > > > > >  
> > > > > > > # Felix installs a stream and content handler factories
by default,
> > > > > > > # uncomment the following line to not install them.
> > > > > > > #felix.service.urlhandlers=false
> > > > > > >  
> > > > > > > # The launcher registers a shutdown hook to cleanly stop
the framework
> > > > > > > # by default, uncomment the following line to disable it.
> > > > > > > #felix.shutdown.hook=false
> > > > > > >  
> > > > > > > #
> > > > > > > # Bundle config properties.
> > > > > > > #
> > > > > > > org.osgi.service.http.port=8080
> > > > > > > obr.repository.url=http://felix.apache.org/obr/releases.xml
> > > > > > >  
> > > > > > > # File install configuration
> > > > > > > felix.fileinstall.dir=./lib
> > > > > > > felix.fileinstall.log.level=1
> > > > > > > felix.fileinstall.noInitialDelay=true
> > > > > > > felix.fileinstall.poll=10000
> > > > > > >  
> > > > > > >  
> > > > > > > --
> > > > > > > Dr Benoît Thiébault
> > > > > > > Project Manager
> > > > > > >  
> > > > > > > Artenum Toulouse - Science & Groupware
> > > > > > > http://www.artenum.com
> > > > > > >  
> > > > > > > Bâtiment Calfocenter
> > > > > > > 10, rue Marguerite-Long
> > > > > > > 31320 Castanet-Tolosan
> > > > > > > France
> > > > > > > Phone: +33 (0)5 82 95 19 00
> > > > > > >  
> > > > > > >  
> > > > > > >  
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > > > > > For additional commands, e-mail: users-help@felix.apache.org
> > > > > > >  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > > > > For additional commands, e-mail: users-help@felix.apache.org
> > > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > > --
> > > > > Dr Benoît Thiébault
> > > > > Project Manager
> > > > >  
> > > > > Artenum Toulouse - Science & Groupware
> > > > > http://www.artenum.com
> > > > >  
> > > > > Bâtiment Calfocenter
> > > > > 10, rue Marguerite-Long
> > > > > 31320 Castanet-Tolosan
> > > > > France
> > > > > Phone: +33 (0)5 82 95 19 00
> > > > >  
> > > >  
> > > >  
> > > >  
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > > For additional commands, e-mail: users-help@felix.apache.org
> > > >  
> > >  
> > >  
> > >  
> > > --  
> > > Dr Benoît Thiébault
> > > Project Manager
> > >  
> > > Artenum Toulouse - Science & Groupware
> > > http://www.artenum.com
> > >  
> > > Bâtiment Calfocenter
> > > 10, rue Marguerite-Long
> > > 31320 Castanet-Tolosan
> > > France
> > > Phone: +33 (0)5 82 95 19 00
> > >  
> >  
> >  
>  
>  
> --  
> Dr Benoît Thiébault
> Project Manager
>  
> Artenum Toulouse - Science & Groupware
> http://www.artenum.com
>  
> Bâtiment Calfocenter
> 10, rue Marguerite-Long
> 31320 Castanet-Tolosan
> France
> Phone: +33 (0)5 82 95 19 00
>  
>  



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message