Configure mrc Servlet Reloading

While there are many reasons why having a development instance and a production instance of m-Power is necessary, one of the strongest reasons is the instability of the development environment. With recompiling, constant changes, and Tomcat restarts, development is not designed for end users to access applications. This separation of environments works well for the end users, however in certain situations (i.e. low resources for Tomcat, many developers working concurrently, end users building apps, etc.), this also negatively affects developers as development slows down, Tomcat hangs, developers are constantly asked to sign in, etc.

If this is the case for you, you might want to consider disabling Tomcat reloading and letting m-Power handle this for you. The following are the instructions to enable this mrc servlet class loading in an m-Power development environment running the April 2014 update or later.

Note: This can only be done in development as the following changes will break a production environment.

  1. Located the mrc-runtime.properties file in /m-power/mrcjava/WEB-INF/classes and open it in a text editor. Find the property inside this file called “mrc_servlet_reload” and change its value from “false” to “true” in order to enable this feature.
  2. Find the following code in the web.xml file located in /m-power/mrcjava/WEB-INF. After finding it, simply remove the comment tags that surround it.
    <filter>
        <filter-name>MrcRouter</filter-name>
        <filter-class>mrc.MrcRouter</filter-class>
    </filter>
    <filter-mapping>

        <filter-name>MrcRouter</filter-name>
        <url-pattern>/servlet/*</url-pattern>
    </filter-mapping>
  3. Save this file.
  4. Open m-power/tomcat/conf/server.xml in a text editor and find the mrcjava context towards the bottom of this file.
  5. Set reloadable=”false” and save.
  6. On AS400 Only – In your m-power/mrcjava/WEB-INF/classes/mrc-spring-context.xml file, add ;thread used=false to your AS400 JDBC URL string. Alternatively, in the interface, navigate to Admin Menu -> Edit Dictionary Files -> Datasource Configuration, and add ;thread used=false to the end of your url input for your AS400 Data Source.
  7. Once finished, be sure to restart Tomcat.

Related Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *