如何制作m子ESB应用程序的可部署War文件 [英] How to make a deployable war file of a mule ESB application

查看:71
本文介绍了如何制作m子ESB应用程序的可部署War文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮我如何打一个简单的m子应用程序吗? 我的Mule应用程序包含一个mule-config.xml文件. 我已经在ecplise中制作了这个Mule项目,可以将其作为Mule服务器运行. 我的要求是发动战争,并将其部署在tomcat或tcat服务器中.

can somebody please help me how to make a war of a simple mule application. My mule application consists of a single mule-config.xml file. I have made this mule project in ecplise and can run it as a mule server. My requirement is to make a war and deploy it in a tomcat or tcat server.

感谢和问候, Arijit

Thanks and Regards, Arijit

推荐答案

要将Mule嵌入Web应用程序中,请提供一个或多个配置文件位置作为上下文参数,并包括一个上下文侦听器以初始化Mule Server.

To embed Mule inside a webapp, you provide one or more configuration file locations as context params and include a context listener to initialize the Mule Server.

因此只需将其添加到您的web.xml中,并将mule-config.xml添加到类路径的根目录(例如src/main/resources中):

So just add this in your web.xml, with mule-config.xml at the root of your classpath (for ex. in src/main/resources):

<context-param>
  <param-name>org.mule.config</param-name>
  <param-value>mule-config.xml</param-value>
</context-param>

<listener>
  <listener-class>org.mule.config.builders.MuleXmlBuilderContextListener</listener-class>
</listener>

编辑:我已经开源了一个正在运行的演示: https: //github.com/ddossot/mule-webapp-example

EDIT I've open-sourced a running demo: https://github.com/ddossot/mule-webapp-example

这篇关于如何制作m子ESB应用程序的可部署War文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆