了解 Grizzly 1.9.36 内部结构

Understanding Grizzly 1.9.36 internals

我在管理网页上启用了 "SNOOP" 配置(在 Transports -> tcp 下)以查看 grizzly 在幕后做了什么。一旦我应用了更改,下面的内容就打印在 server.log 中。从日志中,我无法理解为什么 Grizzly 在仅更改一个参数(也是 SNOOP)时再次初始化它的配置。我解释 Grizzly 已初始化自身的方式是通过写在 server.log 中的以下行。这只是错误的日志记录还是我解释不正确的东西。为什么框架会在更改一个参数时再次创建 HTTP 侦听器。

WEB0169: Created **HTTP listener** [http-listener-1] on host/port

完整日志如下

  [#|2015-06-09T15:10:01.189+0530|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=62;_ThreadName=pool-78-thread-1;|WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]

    [#|2015-06-09T15:10:01.202+0530|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=63;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.36 started in: 6ms - bound to [0.0.0.0:8080]|#]

    [#|2015-06-09T15:10:01.981+0530|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=62;_ThreadName=pool-78-thread-1;|WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]|#]

    [#|2015-06-09T15:10:02.003+0530|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=64;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.36 started in: 5ms - bound to [0.0.0.0:8181]|#]

    [#|2015-06-09T15:10:02.313+0530|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=62;_ThreadName=pool-78-thread-1;|WEB0169: Created HTTP listener [http-download-listener-1] on host/port [0.0.0.0:8585]|#]

    [#|2015-06-09T15:10:02.329+0530|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=65;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.36 started in: 5ms - bound to [0.0.0.0:8085]|#]

    [#|2015-06-09T15:10:03.250+0530|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=62;_ThreadName=pool-78-thread-1;|WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]

    [#|2015-06-09T15:10:03.259+0530|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=66;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.36 started in: 3ms - bound to [0.0.0.0:8080]|#]

    [#|2015-06-09T15:10:04.018+0530|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=62;_ThreadName=pool-78-thread-1;|WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]|#]

    [#|2015-06-09T15:10:04.035+0530|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=67;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.36 started in: 4ms - bound to [0.0.0.0:8181]|#]

    [#|2015-06-09T15:10:04.342+0530|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=62;_ThreadName=pool-78-thread-1;|WEB0169: Created HTTP listener [http-download-listener-1] on host/port [0.0.0.0:8585]|#]

    [#|2015-06-09T15:10:04.355+0530|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=68;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.36 started in: 2ms - bound to [0.0.0.0:8585]|#]

对传输的潜在更改可能会影响传输之上的所有 http 侦听器 运行。