简体   繁体   English

在Mule esb中部署的多个应用程序之间共享库

[英]Share library among multiple application deployed in Mule esb

I have multiple application deployed in mule esb. 我在mule esb中部署了多个应用程序。 All these application have same set of jars so I am trying to create a shared library . 所有这些应用程序具有相同的jars集,因此我试图创建一个共享库。 If I place all the jars in %mule_home%/lib/user then it works fine, but I am trying to put these jars into my custom folders.for example %mule_home%/lib/user/hibernate then I am not able to deploy my applications. 如果我将所有jar放在%mule_home%/ lib / user中,那么它可以正常工作,但是我试图将这些jar放入我的自定义文件夹中,例如%mule_home%/ lib / user / hibernate,那么我将无法部署我的申请。

Ok let's say that if you where using maven you didn't had this issue, as everything was packaged with your deploy without issues. 好的,可以说,如果您在哪里使用maven,就不会遇到此问题,因为所有内容都与部署打包在一起而没有问题。

Anyway if this is still the way you want to go it's normal that he will not pick up on subfloder, they are not on the path. 无论如何,如果这仍然是您要走的路,那是正常的,他不会接在次地面上,他们不在路上。

One way you have is to create an unique jar containing all your jars and that put it in lib/users. 您拥有的一种方法是创建一个包含所有jar的唯一jar,并将其放入lib / users。

There is probally also another way, even if I didn't tested it and I would also not encourage. 可能还有另一种方法,即使我没有测试过,也不会鼓励。 You could go play with the mule wrapper.conf and add folders to the classpath, as you can see around the line 118 of the file : 您可以使用the子wrapper.conf并将文件夹添加到类路径,如您在文件的第118行周围看到的那样:

But again I do recommend you to use maven for painless (more or less) dependency management. 但是我再次建议您使用Maven进行无痛(或多或少)的依赖管理。

Mule allows libraries seperation by using the domains. Mule允许通过使用域来分隔库。 The application domain can be configured in mule-deploy.properties . 可以在mule-deploy.properties配置应用程序域。 For example: 例如:

domain=hibernate-apps

Place all your libs the needed libs into the domain folder. 将所有库和所需的库放入域文件夹。 Has been tested with Mule 3.8.5. 已通过Mule 3.8.5测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM