如何在 Glassfish 上禁用 Metro?
无论如何,我可以告诉 glassfish 3 禁用地铁吗? 我目前正在使用 CXF 作为我的库。 CXF 正在运行,但它也发布了自己的 Web 服务。
无论如何,我可以告诉 glassfish 不要发布这些额外的 Web 服务吗? 这些是 @WebService 注释的 benans
我尝试声明包含此内容的 sun-web.xml 但它仍然不起作用
Glassfish 3 我自动发布它,并且它创建了 Web 服务的两个实例,而不是一个。
多谢
is there anyway that I could tell glassfish 3 to disable metro?
i'm currently using CXF as my library. CXF is working but it is also publishing its own web services.
Is there anyway that I could tell glassfish not to publish these additional web services?
These are the benans that were annotated by @WebService
I tried declaring a sun-web.xml that contains this but it's still not working
Glassfish 3 i automatically publishing it and it's creating two instances of the web service instead of one.
thanks a lot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果没有这个 sun-web.xml 文件来配置类加载器,CXF 拦截器将无法在 Glassfish 中工作。默认情况下,Glassfish 将使用 Metro 来提供 JAX-WS 服务,因此需要配置类加载器以允许 CXF 库提供 JAX-WS 服务。将以下 sun-web.xml xml 源添加到 /WEB-INF 来解决此问题:
CXF 网站的解释:
http://cxf.apache.org/docs /application-server-specific-configuration-guide.html#ApplicationServerSpecificConfigurationGuide-Glassfish
CXF Interceptors will not work in Glassfish without this sun-web.xml file to configure the classloader. By default, Glassfish will use Metro for JAX-WS services so the classloader needs to be configured to allow CXF libraries to provide JAX-WS services. The following sun-web.xml xml source was added to /WEB-INF to resolve this issue:
The explaination from CXF website :
http://cxf.apache.org/docs/application-server-specific-configuration-guide.html#ApplicationServerSpecificConfigurationGuide-Glassfish
要禁用 Metro 监控,请转到管理控制台,配置 -> server-config,并添加以下 JVM 选项:
-Dcom.sun.xml.ws.monitoring.endpoint=false
重新启动服务器以应用此设置。
To disable Metro monitoring, go to admin console, Configurations -> server-config, and add the following JVM option:
-Dcom.sun.xml.ws.monitoring.endpoint=false
Restart the server to apply this setting.