idea in the tomcat On Upate Action and configuration On Frame Deactivation

On Upate Action On Frame Deactivation of these two settings options, depending on the project's deployment package is war or exploded, setting in exploded talk mode, because the most use of this development model, developed directly by the maven package command package on the line, so the most used and most flexible development model is exploded. exploded the actual operation mode is the target directory under kao folder.

Note: The setup Deployment To use the package exploded mode of war in tomcat. Only under the exploded mode will have this update classes and resources.

 

redeployed ----- redeployment posted to tomcat, and did not restart tomcat, but delete the original, and then republish;

Server restart ----- restart tomcat

Resources Update ---- update static resources, such as html, js, css and other operating and debugging modes are effective immediately.

classes and Resources Update ---- update java, jsp and static resources the latter case (1. java modifications, will be compiled into .class then cover the next target / kao folder, IDE debug mode, with immediate effect .IDE run mode, does not take effect immediately, need redeployed to become effective.

 

On Upate Action

After jsp modified again when accessed, it will be automatically updated, re-compiled .java ---->. Class saved in the work directory of tomcat. Because it is accessible only to detect whether changes need to be recompiled, so the next operating mode IDE and IDE debug mode, are effective immediately. It can refresh the page.

 

On Frame Deactivation

 

 

Do nothing --------- doing nothing

update resources ---- update static resources, such as html, js, css and other operating and debugging modes are effective immediately.

update classes and resources ---- update java, jsp and static resources above.

 

to sum up:

 

1. Under Run mode, jsp is update classes and resources are effective immediately, but after .java file changes will not take effect immediately.

 Under 2.debug debug mode, jsp and java file changes will take effect immediately:

3. Test on frame deactivation automatically do something when the IDE lose focus, we tested allowed to update classes and resources, in debug mode, for example, in addition to java operating mode changes will not take effect automatically, other agreement;

On Update action ------- update classes and resources ----- Run mode (jsp take effect immediately, java need to redeploy entry into force)

On Update action ------- update classes and resources ----- under debug mode (java, jsp are effective immediately)

 

VM options that we need to fill out, I fill the VM options: -Xms768m -Xmx768m -XX: PermSize  = 64M -XX: MaxPermSize = 512m each separated by a space

参数说明 -Xms768m:设置JVM初始堆内存为768m。此值可以设置与-Xmx相同,以避免每次垃圾回收完成后JVM重新分配内存。 -Xmx768m:设置JVM最大堆内存为768m。 -Xss128k:设置每个线程的栈大小。JDK5.0以后每个线程栈大小为1M,之前每个线程栈大小为256K。应当根据应用的线程所需内存大小进行调整。在相同物理内存下,减小这个值能生成更多的线程。但是操作系统对一个进程内的线程数还是有限制的,不能无限生成,经验值在3000~5000左右。需要注意的是:当这个值被设置的较大(例如>2MB)时将会在很大程度上降低系统的性能。 -Xmn2g:设置年轻代大小为2G。在整个堆内存大小确定的情况下,增大年轻代将会减小年老代,反之亦然。此值关系到JVM垃圾回收,对系统性能影响较大,官方推荐配置为整个堆大小的3/8。 -XX:NewSize=1024m:设置年轻代初始值为1024M。 -XX:MaxNewSize=1024m:设置年轻代最大值为1024M。 -XX:PermSize=256m:设置持久代初始值为256M。 -XX:MaxPermSize=256m:设置持久代最大值为256M。 -XX:NewRatio=4:设置年轻代(包括1个Eden和2个Survivor区)与年老代的比值。表示年轻代比年老代为1:4。 -XX:SurvivorRatio=4:设置年轻代中Eden区与Survivor区的比值。表示2个Survivor区(JVM堆内存年轻代中默认有2个大小相等的Survivor区)与1个Eden区的比值为2:4,即1个Survivor区占整个年轻代大小的1/6。 -XX:MaxTenuringThreshold=7:表示一个对象如果在Survivor区(救助空间)移动了7次还没有被垃圾回收就进入年老代。如果设置为0的话,则年轻代对象不经过Survivor区,直接进入年老代,对于需要大量常驻内存的应用,这样做可以提高效率。如果将此值设置为一个较大值,则年轻代对象会在Survivor区进行多次复制,这样可以增加对象在年轻代存活时间,增加对象在年轻代被垃圾回收的概率,减少Full GC的频率,这样做可以在某种程度上提高服务稳定性。

标准参数,所有JVM都必须支持这些参数的功能,而且向后兼容;例如:

-client——设置JVM使用Client模式,特点是启动速度比较快,但运行时性能和内存管理效率不高,通常用于客户端应用程序或开发调试;在32位环境下直接运行Java程序默认启用该模式。 -server——设置JVM使Server模式,特点是启动速度比较慢,但运行时性能和内存管理效率很高,适用于生产环境。在具有64位能力的JDK环境下默认启用该模式。 非标准参数(-X),默认JVM实现这些参数的功能,但是并不保证所有JVM实现都满足,且不保证向后兼容; 非稳定参数(-XX),此类参数各个JVM实现会有所不同,将来可能会不被支持,需要慎重使用;

原文链接:https://blog.csdn.net/u014756827/article/details/89326961

 

 

Guess you like

Origin www.cnblogs.com/lvhouhou/p/11977996.html