在开发系统里面,代码更新快。每次更新class都要重启会很麻烦,特别是像websphere was 这样庞大的应用服务器。重启一次的时间真是…… =.=!所以好多开发人员都喜欢在tomcat上开发,搞好了再放上去was上面测试。

作为商业软件websphere was有免重启重新加载class的设置,他原理也是定时扫描应用的class文件有没有更新,如果有的就重新加载。当然会对应用服务器带来一定的开销,所以只建议对开发服务器和UAT测试服务器设置,不建议对生产系统和压力测试系统设置。
菜单名字:类装入和更新检测(Class loading and update detection settings)
菜单路径:Applications > Application Types > WebSphere enterprise applications > application_name > Class loading and update detection.
然后选上类重新装入选项的复选框: 覆盖 Web 和 EJB 模块的类重新装入设置(Override class reloading settings for Web and EJB modules)
启用定时重新加载类:设置对已更新文件进行轮询的时间间隔(Polling interval for updated files)为非0的值。默认值为3秒,取值范围为1 to 2147483647。