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!