GlassFish v3 中的应用程序客户端流量开销

发布于 2024-09-14 01:53:30 字数 1935 浏览 5 评论 0原文

我有一个带有应用程序客户端模块的 EAR 应用程序。

当此 EAR 文件部署在 GlassFish v2 上并且应用程序客户端模块存在于缓存中时,应用程序客户端启动期间客户端计算机和服务器之间的流量约为。 0.7KB。

但是,当我在 GlassFish v3 上部署此应用程序并第二次或第三次启动应用程序客户端模块(以便它已存在于缓存中)时,应用程序客户端期间客户端计算机和服务器之间的流量启动是10MB。

有什么问题吗?

UPD 1

即使我使用仅输出“Hello World”的应用程序客户端组件创建一个简单的 EAR 项目并将其部署在 GlassFish v3 上,每次从缓存启动应用程序客户端时它仍然是 5-6MB 。

UPD 2

尝试更深入地研究问题。
当我从 GlassFish v3 中的缓存启动应用程序时,我在应用程序客户端中每个库的 GlassFish v3 日志中收到以下异常:

java.io.IOException: An established connection was aborted by the software in your host machine

例如:

SEVERE: Adapter[/___JWSappclient/___system] s1as/glassfish/modules/webservices-osgi.jar
java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:100)

我有一个假设,流量开销可以是有关的。互联网上有一些关于这个问题的信息。但显然没有官方解释或解决方法。
这是与此问题相关的有趣的线程,它可能会揭示一些点亮它。
以下是 Tim(更多 tjquinn)对这种情况的评论:

“已建立的连接中止”消息是我们见过的消息,但正如您所说,似乎不会影响启动。我认为(但尚未验证)Java Web Start 开始下载 JAR,然后发现缓存的副本是最新的,因此中止传输。这种情况不应该发生,但我还没有确切地发现是什么导致它知道这是 Java Web Start 问题还是 Grizzly 问题(基本上是 GlassFish 中的传输层)还是 GlassFish 问题本身。

UPD 3 关于“Old Nabble”关于类似问题有一个有趣的讨论。启动应用程序客户端后,我们还出现了 Web 服务失败的症状。

UPD 4 Grizzly 论坛(UPD 3 中提到的线程)的 Oleksiy Stashok 建议在 Java Web Start 论坛上发布该问题。 这里是 Java Web Start 论坛上的线程的链接

I have an EAR application with Application Client module.

When this EAR file is deployed on GlassFish v2 and Application Client module is present in the cache, amount of the traffic between the client machine and the server during Application Client launch is approx. 0.7KB.

But when I deploy this application on GlassFish v3 and launch Application Client module second or third time (so that it is already present in the cache), amount of the traffic between client machine and the server during Application Client launch is 10MB.

What can be wrong?

UPD 1

Even if I create a simple EAR project with Application Client component that just outputs "Hello World" and deploy it on GlassFish v3, it is still 5-6MB every time Application Client is launched from the cache.

UPD 2

Trying to dig deeper into the problem.
When I launch the application from cache in the GlassFish v3, I get the following exception in the GlassFish v3 log for each library in my Application Client:

java.io.IOException: An established connection was aborted by the software in your host machine

for example:

SEVERE: Adapter[/___JWSappclient/___system] s1as/glassfish/modules/webservices-osgi.jar
java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:100)

I have an assumption, that traffic overhead can be related. There is some information on the internet about this problem. But apparently there is no official explanation or a way how to fix it.
Here is an interesting thread related to this problem, which may shed some light on it.
Here is how Tim (more tjquinn) commented the situation:

The "established connection aborted" messages are ones we've seen but seem, as you said, not to affect the launch. I think - but have not verified - that Java Web Start starts a download of a JAR and then discovers that the cached copy is up-to-date and so aborts the transfer. This should not happen, but I have not discovered exactly what is causing it to know if it's a Java Web Start problem or a Grizzly problem (that's the transport layer basically in GlassFish) or a GlassFish problem itself.

UPD 3
There is an interesting discussion on "Old Nabble" about similar issue. We also had failing web services symptoms after launching the Application Client.

UPD 4
Oleksiy Stashok from Grizzly forums (the thread mentioned in UPD 3) suggested posting the question on Java Web Start forum. And here is the link to the thread on Java Web Start forums.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文