首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

resin器皿配置影响listener加载时机

2012-10-28 
resin容器配置影响listener加载时机项目使用resin容器,发现resin容器启动时不加载listener,而需要在应用被

resin容器配置影响listener加载时机
项目使用resin容器,发现resin容器启动时不加载listener,而需要在应用被首次访问时才会加载listener,完成bean的实例化,这样会导致服务重启后第一次的请求需要更长的时间来完成。

为什么?找啊找。网上的资料都说这个加载的顺序是。。。??

我们的resin.conf的虚拟主机配置

<host id='*.*.com' root-directory="/data/resin/">       <character-encoding>utf-8</character-encoding>       <web-app id='/' document-directory='*'>       </web-app></host>

发现这样的配置下resin容器启动时会加载listener了,当然启动的时间也相应的长了些!

关于host的配置:

Defines a virtual host. If no hosts are specified, or if a request doesn't match a host, configuration in http-server will be used instead.
The id may contain a list of hosts. Any host in the list will match.
See application configuration for servlet configuration.
Hosts can use regexp instead of id to dynamically create new hosts.

不确定原因?难道是动态主机的设置下resin不会加载listener,不能一对一的确定相应工程的配置文件?

有知道的牛们解释下哈^_^

热点排行