Servicemix 4.4 和热部署

发布于 2024-11-18 20:35:13 字数 277 浏览 12 评论 0原文

我是 servicemix 4.x 的新手。我尝试过 servicemix 4.4 和 servicemix-fuse 4.4,两者都有同样的问题。我尝试将示例部署到部署目录,但没有任何反应。 Servicemix 运行,我检查日志(tail -f servicemix.log),没有关于部署的消息。我试图找到一些关于 4.4 下热部署的文档,但我找不到任何东西。 我记得 hotdeploy 在 servicemix 3.x 中开箱即用,我只是将 zip 复制到 hotdeploy 目录。

谢谢,

胡比

I'm newbie with servicemix 4.x. I've tried servicemix 4.4 and servicemix-fuse 4.4 with both of them I have the same problem. I've tried to deploy samples to the deploy dir and nothing happens. Servicemix runs, I check the log (tail -f servicemix.log) and there's no message about deploying. I've tried to find some docs about hot deploy under 4.4 but I couldn't find anything.
As I can remember hotdeploy worked out of the box with servicemix 3.x, I just copied zips to hotdeploy dir.

Thanks,

Hubi

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我是有多爱你 2024-11-25 20:35:13

我相信 ServiceMix 4.4 将热部署(/deploy)两种类型的文件:OSGi 捆绑包和 JBI 服务程序集。也就是说,包含额外 OSGi 或 JBI 元信息的 jar 文件(和分解的 jar 文件)、OSGI 蓝图 xml 文件和 Spring xml 文件(假定它们是 OSGi)。 ServiceMix 4.4 不会部署普通 jar 文件,因为不清楚您希望它如何加载它们 - 您是否希望它将它包装为 OSGi 包,猜测导入和导出...

从您的问题中不清楚您的样本是什么有问题。快速浏览一下大多数 ServiceMix 示例,发现其中大多数都是 OSGi 捆绑包(Maven 打包==捆绑包),当复制到部署目录时,它们都应该热部署。

如果您知道您的 jar 文件是 OSGi 捆绑包,那么我会检查 /etc/org.apache.felix.fileinstall-deploy.cfg 文件的 felix。 fileinstall.dir 属性以确保其配置为从您认为的目录中获取。我还要检查文件安装程序和部署程序服务是否已安装并正在运行。这些通常位于安装的前 30 个服务中,并且不会显示在 osgi:list 上,因此您可以尝试

karaf@root> osgi:ls | grep Deployer

如果没有看到它们,请检查对 etc/ 的修改startup.properties 文件 - 有人可能已经删除了这些服务...

希望有所帮助,

Scott

FuseSource

I believe ServiceMix 4.4 will hot deploy (<servicemix home>/deploy) files of two types: OSGi bundles and JBI service assemblies. That is, jar files (and exploded jar files) that contain the extra OSGi or JBI meta-information, OSGI blueprint xml files, and Spring xml files, which it assumes are OSGi. ServiceMix 4.4 will not deploy vanilla jar files as its not clear how you would want it to load them - would you want it to wrap it as an OSGi bundle, guessing at imports and exports...

Its not clear from your question what samples you are having problems with. A quick look at most of the ServiceMix samples seems that most of them are OSGi bundles (Maven packaging == bundle), which all should hot deploy when copied to the deploy directory.

If you know your jar files are, say OSGi bundles, then I'd check the <servicemix home>/etc/org.apache.felix.fileinstall-deploy.cfg file's felix.fileinstall.dir property to ensure that its configured to pick up from the directory you think. I'd also check that the File Installer and Deployer services are installed in running. Those typically are within the first 30 services installed, and don't show up on an osgi:list, so you can try

karaf@root> osgi:ls | grep Deployer

If you do not see them, check for modifications to the etc/startup.properties file - someone may have removed those services...

Hope that helps,

Scott

FuseSource

寻梦旅人 2024-11-25 20:35:13

我正在使用 apache-servicemix-4.4.1-fuse-01-11,hotdeploy 适用于 JBI 以及基于 OSGI 的软件包(JBI 为 zip,OSGI 为 jar)。
尝试通过在 karaf 控制台上运行来查找已安装的软件包:

osgi:list | grep 'YourBundleName'

如果一切正常,您可以使用其他两个命令安装和卸载捆绑包:

osgi:install yourbundlename
osgi:uninstall yourbundlename

安装捆绑包后,您可以通过发出以下命令来查看日志输出(据我所知,仅适用于 Fuse ESB):

log:tail

I'm using apache-servicemix-4.4.1-fuse-01-11 and hotdeploy works for me for JBI as well as OSGI based packages (zip for JBI and jar for OSGI).
Try to find your installed packages by running on the karaf console:

osgi:list | grep 'YourBundleName'

if its there all should be ok, you can install and uninstall bundles using other two commands:

osgi:install yourbundlename
osgi:uninstall yourbundlename

Once you have your bundle installed you can see the log output by issuing the following command (works only on Fuse ESB from what I know):

log:tail
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文