Thursday 13 December 2012

Textual description of firstImageUrl

Steps to deploy Mule ESB Application on Jboss 7.1.1


first create WAR application structure of mule application

structure of war file is like this

application root
  WEB-INF
    classes
    lib
    web.xml
  META-INF

put all your java classes and along with configuration files like mule-config.xml in WEB-INF/classes folder .
put all mule specific and application jars in WEB-INF/lib folder.
modify web.xml and add following configuration in it.

<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>




to configure jboss to deploy mule application , we have to remove jaxr and jaxrs modules from jboss

go to standalone/configuration/standalone.xml

remove jaxr and jaxrs modules from file

remove extensions tag as well as subsystmes tag of jaxr ,jaxrs

if jboss is not able to find jdk specific classes and if you are getting classnotfoundexception then you have to add that path in


$JBOSS_HOME/modules/sun/jdk/main/module.xml .

for example getting ClassNotFoundException for com.sun.net.ssl.internal.ssl.Provider class , (Mule uses this class internally )

then we have to add the path <path name="com/sun/net/ssl/internal/ssl"/>  to $JBOSS_HOME/modules/sun/jdk/main/module.xml .


Configure Servlet Endpoint in mule-config.xml

for example

 <flow name="servletTestFlow2" doc:name="servletTestFlow2">
        <servlet:inbound-endpoint path="addtweet" responseTimeout="10000" doc:name="Servlet"/>
        <echo-component doc:name="Echo"/>
   </flow>

in this Path is the servlet request url path where this flow will be mapped

add servlet mapping in your web.xml like this


<servlet>
    <servlet-name>muleReceiverServlet</servlet-name>
    <servlet-class>org.mule.transport.servlet.MuleReceiverServlet</servlet-class>
    <load-on-startup />
  </servlet>

  <servlet-mapping>
    <servlet-name>muleReceiverServlet</servlet-name>
    <url-pattern>/mule/*</url-pattern>
  </servlet-mapping>


now all the requests like /${context}/mule/addtweet will go to this servletTestFlow2 .