Tool usage in cainiao tutorial (5) -- Tomcat integration of JRebel and Windows Services

Source: Internet
Author: User

Tool usage in cainiao tutorial (5) -- Tomcat integration of JRebel and Windows Services

I have previously written an article about using JRebel to support hot deployment-"using JRebel to support hot deployment of Tomcat". This section describes the configuration in the development and test environments. However, in the formal deployment environment, we do not start Tomcat through the command line. Tomcat is generally used as a system service. The previous configuration does not work for the Tomcat service. So today we will introduce how to configure JRebel for Tomcat that is made into a system service.


There are three configuration methods. The first is before Tomcat is made into a service, and the last two are after Tomcat is made into a service. Next we will introduce them separately:


Method 1:

If you have not yet made Tomcat a system service, you can configure it in the following way: Find the directory where Tomcat is located, go to the bin directory and use notepad or notepad to open the service. bat file, find "-- JvmOptions", add "-javaagent: D: \ jrebel-5.6.3-crack \ jrebel. jar "(without quotation marks, the specific path is configured according to your own situation) is modified as follows:

--JvmOptions "-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties;-javaagent:D:\jrebel-5.6.3-crack\jrebel.jar" ^

Save and close the file, and then install Tomcat as a Windows Service through the command line. If you already have the Tomcat service on your server, the above method will not work. To integrate JRebel, you can only implement it in the following two ways.


Method 2:

If the server already has the Tomcat service, you can configure JRebel in this way. Go to the Tomcat directory to find the Tomcat 7w.exe directory under the bindirectory ",



VcD48cD48YnIgLyZndDs8L3A + PHA + y6u797Tyv6qjrMfQu7u1vaGwSmF2YaGx0aHP7r + incubator + PHAgYWxpZ249 "center">



Click "OK.



Method 3:

Another way is to configure JRebel when the Tomcat service exists, that is, to modify the registry. Open the registry and find the following nodes:

HKEY_LOCAL_MACHINE \ SOFTWARE \ Apache Software Foundation \ Procrun 2.0 \ htfty \ Parameters \ Java.

HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Apache Software Foundation/Procrun 2.0/TomcatX/Parameters/Java

Locate Options and edit, also add "-javaagent: D: \ jrebel-5.6.3-crack \ jrebel. jar" at the end ",


Save it. I personally think it is relatively difficult to modify the registry, so I put it to the end. We recommend that you choose the first two methods. This is today. Goodbye next time!



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.