Is there a way to deploy exploded bundles in Apache Felix?

可紊 提交于 2019-12-13 02:38:32

问题


We are looking at rearchitecting our web application and want to move to a more modular solution, OSGi seems to meet a lot of our needs.

I've come across the Apache Felix project and taken it for a spin. It looks solid yet I find the development cycle a bit slow as it requires a maven build of the bundle(s) to make any code changes effective.

Instead I would like to be able to reload a bundle once classes have been compiled by Eclipse, without any extra building/packaging. Similar to how Tomcat and other servlet containers support deployment of "exploded" war files.

Is this possible to do with Felix or any other OSGi container?


回答1:


In the Gogo shell, you can do:

install reference:file:/path/to/exploded/directory

This will install an exploded bundle. The format of the exploded directory should be exact that of a bundle JAR file.




回答2:


Apache Felix FileInstall supports exploded bundles out of the box. Just install it, and put a directory with your bundle in the load directory (or configure FileInstall to look somewhere else).

Not exactly answering your question, but if you have issues with the build cycle, you should take a look at bndtools, which is a plugin for Eclipse that a.o. automatically builds and deploys your bundles in a running framework when your code changes.



来源:https://stackoverflow.com/questions/5518388/is-there-a-way-to-deploy-exploded-bundles-in-apache-felix

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!