V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
guyeuro
V2EX  ›  问与答

log4j 的日志显示[http-apr-8080-exec-5],这说明 tomcat 是以 apr 模式运行吗?

  •  
  •   guyeuro · 2017-08-21 11:10:22 +08:00 · 6220 次点击
    这是一个创建于 2456 天前的主题,其中的信息可能已经有所发展或是发生改变。

    可是好像 tomcat 并没配置 apr 模式 log4j 的日志显示[http-apr-8080-exec-5]表示什么意思?

    7 条回复    2017-08-22 19:57:10 +08:00
    azygote
        1
    azygote  
       2017-08-21 11:23:07 +08:00
    tomcat 内部有一个处理请求的线程池,[http-apr-8080-exec-5]是 tomcat 处理当前请求的线程名字。
    ixiaohei
        2
    ixiaohei  
       2017-08-21 11:29:29 +08:00
    是 apr 运行的。这个是 apr 的线程池。一般 jio 和 nio 都是带这些字样的。另外为什么不用 nio。
    guyeuro
        3
    guyeuro  
    OP
       2017-08-22 14:02:21 +08:00
    @ixiaohei
    intellij 下 tomcat 自动 apr 运行?
    另外我看远程的 tomcat 的 context.xml 好像没有配置 apr 啊
    guyeuro
        4
    guyeuro  
    OP
       2017-08-22 14:02:40 +08:00
    @azygote 那这个线程为何有 apr 字样?
    ixiaohei
        5
    ixiaohei  
       2017-08-22 18:36:01 +08:00
    @guyeuro tomcat 是检测到 apr 就会用 apr 模式运行。你是 win 下? linux 下一般要装 apr 相关包才会用 apr 运行。
    guyeuro
        6
    guyeuro  
    OP
       2017-08-22 18:55:23 +08:00
    @ixiaohei 我开发在 win 下,所以 win 的开发 tomcat 下自动是 apr 模式?

    另外 linux apr 模式不是需要 context.xml 配置吗?
    ixiaohei
        7
    ixiaohei  
       2017-08-22 19:57:10 +08:00
    @guyeuro Linux 要安装额外的包,具体百度。win 下是因为 tomcat 带了那个 dll 文件。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   6242 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 01:50 · PVG 09:50 · LAX 18:50 · JFK 21:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.