I am using Apache Felix in embedded manner as explained in http://felix.apache.org/documentation/subprojects/apache-felix-framework/apache-felix-framework-launching-and-embedding.html
As per the discussion in Apache Felix File Install jar from deploy folder
1) Started felix
2) Installed/started felix.fileinstall bundle on it
3) Set the System proper to hotdiploy dir ie
System.setProperty("felix.fileinstall.dir", "file:C:/myrproject/hotdeploy");
I can see bundles in the dir are registered. But is there away that I can get notification when this dir change (adding or deleting new bundles)? So in that case I can check for non started bundles and start them. That will help to work hot deployment feature realtime.
Thanks
You can install org.apache.felix.eventadmin
bundle, and then watch event topic org/osgi/framework/BundleEvent/STARTED
. Have a look at felix eventadmin .
Note that the felix web console is a good tool to watch events, at least for debugging purpose.
鉴于您的问题包括“该目录更改时我可以得到通知的方式(添加或删除新捆绑包”),您可能正在寻找Apache Felix File Install捆绑包 ;另请参阅此问题 。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.