当前位置:网站首页>[turn]: Apache Felix framework configuration properties

[turn]: Apache Felix framework configuration properties

2022-07-05 05:14:00 morpheusWB

Apache Felix Framework Configuration properties

Framework configuration properties

The following configuration properties apply to the framework ( With “ felix” The properties at the beginning are specific to Felix, And then “ org.osgi” The attribute at the beginning is standard OSGi attribute ):

  • org.osgi.framework.executionenvironment- Set the of the frame OSGi execution environment . The framework tries to set it to a reasonable default . If you specify a value , It will override the frame defaults . About the appropriate execution environment values , Please refer to OSGi standard .
  • org.osgi.framework.storage- Set the directory used as the bundle cache ; By default , Bundle cache directory felix-cache Located in the current working directory . The value should be a valid directory name . The directory name can be an absolute name , It can also be a relative name . The relative directory name is relative to the current working directory . If the specified directory does not exist , The directory will be created .
  • felix.cache.rootdir- Set the root directory of the package cache directory used to calculate the relative directory name . If org.osgi.framework.storage take if Set to relative name , By default , It is relative to the current working directory . If this property is set , Then it is calculated as relative to the specified root directory .
  • org.osgi.framework.storage.clean- Determine whether to refresh the distribution package cache . Values can be “ none” or “ onFirstInit”, among “ none” Do not refresh the bundle cache , and “ onFirstInit” Refresh the bundle cache when initializing the framework instance for the first time . The default value is “ none”.
  • felix.cache.filelimit- The integer value of this string sets the upper limit of the number of files that will open the cache . The default value is zero , There is no limit .( from 4.0 version )
  • felix.cache.locking- Enable or disable bundle cache locking , This lock is used to prevent concurrent access to the bundle cache . This feature is enabled by default , But in older / smaller JVMs On , File channel locking is not available ; Please refer to No 11 page “ Lock channel ”. Set this property to false To disable it .
  • felix.cache.bufsize- Set the buffer size to be used by the cache ; The default value is 4096. For performance reasons , The integer value of this string controls the size of the internal buffer of the disk cache .
  • org.osgi.framework.system.packages- Specify a comma separated list of packages , These software packages should be exported from the framework class loader through the system bundle . The frame will set it to a reasonable default value . If this value is specified , It will replace any default values .
  • org.osgi.framework.system.packages.extra- Specify a comma separated list of packages , In addition to the software package in , It should also pass System Bundle Export these packages from the framework class loader org.osgi.framework.system.packages. The default value is empty . If a value is specified , Then attach it to the default or specified package list in org.osgi.framework.system.packages.
  • org.osgi.framework.bootdelegation- Specify a comma separated list of packages , These lists should be implicitly provided to all packages in the parent loader . This property is not recommended , Because it destroys modularity . The default value is empty .
  • org.osgi.framework.bundle.parent- Specify the classloader to use for bootstrap delegation . The possible value is :boot For the boot class loader ,app For application class loaders ,ext For extension class loaders and framework For the class loader of the framework . The default value is boot.
  • felix.bootdelegation.implicit- Specify whether the framework should try to guess when to implicitly start delegates to simplify integration with external code . The default value is true.
  • felix.systembundle.activators- start-up / Start when the system bundle is stopped / stop it List Of BundleActivator example . The specified instance BundleContext You will receive the system bundle when calling .( Because you need instances , Therefore, this property cannot be set in the configuration file ; It can only be passed directly to Felix Constructor for .)
  • felix.log.logger- org.apache.felix.framework.Logger The framework is used as an instance of its default logger .( Because you need instances , Therefore, this property cannot be set in the configuration file ; It can only be passed directly to Felix Constructor for .)
  • felix.log.level- An integer value , Indicates the logging level of the Framework Report ; The higher the value , The more logs reported . If zero is specified ('0'), Logging will be completely turned off . The log level is the same as OSGi The level specified in the log service is consistent ( namely 1 = error ,2 = Warning ,3 = Information and 4 = debugging ). The default is 1.
  • org.osgi.framework.startlevel.beginning- Once the execution starts , The initial startup level of the framework ; The default value is 1.
  • felix.startlevel.bundle- Default startup level for newly installed bundles ; The default value is 1.
  • felix.service.urlhandlers- Indicates whether the framework instance is activated URL Flag of handler service ; The default value is true. Activate URL The handler service will result in URL.setURLStreamHandlerFactory() and URLConnection.setContentHandlerFactory() Called .
  • felix.native.processor.alias.<procName>- solve R6 The alias required by the new native processor . This can be used to add new processors or overwrite existing processors . Represents the processor architecture ( for example x86-64) The key of ( May not contain spaces ), Then the attribute value is a comma separated alias list , for example x86_64,amd64.EX felix.native.processor.alias.x86-64 = x86_64,amd64
  • felix.native.osname.alias.<osName>- solve R6 The alias required by the new native operating system . This can be used to add new operating systems or overwrite existing operating systems ​​ system . The key representing the operating system , for example Windows7( May not contain spaces ), Then the attribute value is a comma separated alias list , for example Windows 7,win32.EX felix.native.osname.alias.windows7 = Windows 7,win32

 

Initiator configuration properties

The following configuration properties apply to the initiator :

  • felix.auto.deploy.dir- Specify the auto deployment directory from which to automatically deploy bundles when the framework starts . The default value is bundle/ The directory of the current directory .
  • felix.auto.deploy.action- Specify the bundle to be found in the auto deployment directory JAR Comma separated list of actions performed on the file . Possible operations are install,update,start, and uninstall. Undefined or blank values are equivalent to disabling automatic deployment processing . No default , Therefore, this value must be defined to enable it .
  • felix.auto.install.<n>- stay Felix Bundles to be automatically installed at startup URL Space delimited list , among <n> Is the starting level of bundle installation ( for example felix.auto.install.2).
  • felix.auto.start.<n>- When Felix Startup time , Bundles to be automatically installed and started URL Space delimited list , Installation of this bundle <n> Where is the starting level ( for example felix.auto.start.2).
  • felix.shutdown.hook- Specifies whether the launcher should install a close hook to completely close the framework when the process exits . The default value is true.

 

原网站

版权声明
本文为[morpheusWB]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050509477810.html