3

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.

4

1 回答 1

4

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

于 2012-06-20T13:17:11.487 回答