Deploy War into Mule Standalone server

强颜欢笑 提交于 2019-12-21 19:43:39

问题


I've got a mule-standalone server with an application I'm working on. Many of the services this application uses will be moved out of the Mule container into a JBoss cluster in the future. Because of this, I'm keeping a strong separation between the mule flows, and the Web Services. However, as of right now, I need to deploy the War file on the same server as my Mule application.

It seems like Mule should be able to run my War within it. Does anyone know if this is possible? I'm OK with adding a War into the Mule deployable zip for the time being, but would also like to deploy the war separately.


回答1:


Mule ESB is not a standard Java EE container so it won't be hable to handle directly WAR files. In fact mule applications have the following structure:

/
 \- classes                 // application-specific resources(e.g. logging config, properties)
 |- lib                     // application-specific jars
 |- mule-config.xml         // Main Mule configuration file, also monitored for changes
 |- mule-deploy.properties  // Application deployment descriptor (optional)
 |- mule-app.properties     // custom properties to be added to the registry instance used by the application (optional)

as better explained here:

http://www.mulesoft.org/documentation/display/MULE3USER/Application+Format

What you can do is leverage the mule jetty connector to expose your web application. Your connector configuration will look like the following:

 <jetty:connector name="jettyConnector">
    <jetty:webapps directory="${app.home}/webapps" port="8083"/>
</jetty:connector>

and you will be putting your war files into the webapps folder. You can use the bookstore example as a reference:

http://www.mulesoft.org/documentation/display/MULE3EXAMPLES/Bookstore+Example



来源:https://stackoverflow.com/questions/11088282/deploy-war-into-mule-standalone-server

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