resin jsp auto-compile

作者: 2hei 发表于2008年8月 5日 00:35
版权声明: 可以转载, 转载时务必以超链形式标明文章原始出处和作者信息及版权声明
http://www.2hei.net/mt/2008/08/resin-jsp-autocompile.html
因为resin的自动编译及热部署的特性颇受大家的欢喜,这里总结一下resin2.x下关于自动编译的问题


Resin中 “resin.conf” 自动编译的设置:

1.class-update-interval
  检测servlet更新的时间间隔,默认值2秒
  使用:在  <http-server>标签下:
  <class-update-interval>2s</class-update-interval>
 
2.config-update-interval
  检测配置文件configuration更新的时间间隔,默认值为class-update-interval指定的值 
  使用:在  <http-server>标签下:
  <config-update-interval>2s</config-update-interval> 
 
3.jsp-update-interval
  检测jsp文件的更新时间:默认值为class-update-interval指定的值 
  使用:
  <jsp jsp-update-interval='300s' precompile='true' static-encoding='true' recompile-on-error='true'/>
  其中: precompile 预编译
         static-encoding  允许静态字符编码,默认为true

一般来讲生产环境还是要加大resin对class文件的变化检测的时间间隔,或者干脆不允许扫描。
如果以上方法都无效的话,只能使出俺的必杀技--在jsp标签中添加这句话 auto-compile='false' ,意为不允许编译!

具体请见resin的官网相关介绍!
http://caucho.com/resin-2.1/ref/app-config.xtp#config-update-interval
 
<class-update-interval>s</class-update-interval>

jsp-update-interval
auto-compile

<jsp auto-compile='false' jsp-update-interval='300s' precompile='true' static-encoding='true' recompile-on-error='true'/>

class-update-interval
    Resin 1.1
Interval in seconds between checking for servlet updates. For development, this can be set to 0 or to a small number to pick up new servlet versions quickly. For deployment, class-update-interval can be large to avoid the overhead of checking for updates.
The default value is 2 seconds.

config-update-interval
    Resin 2.0

Interval in seconds between checking for configuration updates. For development, this can be set to 0 or to a small number to pick up new configuration file versions quickly. For deployment, config-update-interval can be large to avoid the overhead of checking for updates.

The default value is the value of class-update-interval.


| | Comments (0) | TrackBacks (0)

发表一个评论

关于这篇文章

这篇文章由2hei2008年8月 5日 00:35发布.

上一篇:压力测试工具--NeoLoad--Web Site Load Testing

下一篇:tar 解压部分文件

回到首页 或者查看归档文章

  • Powered by FeedBurner
  • Add to Google Reader or Homepage
  • Add to My AOL
  • Subscribe in NewsGator Online
  • del.icio.us/2heidel.icio.us/2hei
  • Subscribe to feed feeds