开发者

How Do I Disable Metro On Glassfish?

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


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:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD 
Application Server 9.0 Servlet 2.5//EN' 
'http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd'> 
<sun-web-app> 
<class-loader delegate="false"/> 
</sun-web-app>

The explaination from CXF website : http://cxf.apache.org/docs/application-server-specific-configuration-guide.html#ApplicationServerSpecificConfigurationGuide-Glassfish


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜