我想弄清楚 org.osgi.framework.storage.clean=onFirstInit
真正意味着在 Felix 框架的上下文中。
根据 OSGi 规范:
org.osgi.framework.storage: A valid file path in the file system to a directory... The framework is free to use this directory as it sees fit, for example, completely erase all files and directories in it...
org.osgi.framework.storage.clean: Specifies if and when the storage area for the framework should be cleaned. If no value is specified, the framework storage area will not be cleaned.
由于根据规范,框架可以自由使用它认为合适的目录,因此不清楚 OSGi 规范规定应清理存储区域的含义。对于每个 OSGi 实现来说,清理可能意味着不同的东西。
Apache Felix documentation状态:
onFirstInit flushes the bundle cache when the framework instance is first initialized.
特定于 Felix 文档:
rm -rf felix-cache
相同当 Felix 容器关闭时,它会在启动时重建缓存,就好像这是第一次启动容器一样? 最佳答案
What does it mean to "flush the bundle cache"?
意思是删除org.osgi.framework.storage指定的目录
Is flushing the same as deleting the storage directory and then rebuilding it from scratch?
是的
So it would be the same as rm -rf felix-cache while the Felix container is shut down so that when it starts up it rebuilds the cache as if this was the first time the container was started?
是的
What does it mean when it says "when the framework instance is first initialized"?
捆绑包可以被初始化多次。此语句表示仅应在 JVM 启动后第一次删除该目录,而不应在系统捆绑包初始化后的后续时间删除该目录。
Does this mean the first time the framework is initialized only on the first time the container is started? Or does it mean the first time the framework is initialized every time the container is restarted?
表示每次容器重启时框架第一次初始化
关于osgi - org.osgi.framework.storage.clean=onFirstInit 在 Apache Felix OSGi 实现的上下文中是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26304588/