如何在Glassfish上选择CXF [英] How to pick CXF over Metro on Glassfish

查看:163
本文介绍了如何在Glassfish上选择CXF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下问题(由其他人报告) )在Glassfish下运行我的企业应用程序时。在Jetty下工作正常。



javax / xml / ws / spi / Provider 提到创建META-INF / services / javax.xml.ws.spi.Provider资源,但这已经是与CXF一起提供并创建额外的资源文件并不能解决Glassfish下的这个问题。



有人知道如何确保CXF在GlassFish中被拾取吗?

(我正在使用Maven Multi-modules项目,CXF依赖项2.2.5)

谢谢!

Tim






编辑#1

跳过问题现在只是与Metro一起工作,但我真的很想知道如何使用CXF,如果任何人有任何指针。如果没有任何工作,我可能不得不切换Web应用程序容器(或看看地铁满足我的要求)






编辑#2

一些解决方案通过向sun-web.xml文件添加< class-loader委托=false/> 来详细说明war的修复。然而,这不适用于非战争ee应用程序。

解决方案

添加sun-web.xml并设置委托= false到类加载器:

 <?xml version =1.0encoding =UTF-8?> 
<!DOCTYPE sun-web-app PUBLIC' - // Sun Microsystems,Inc. // DDTD
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>


I'm having the following problem (reported there by someone else) when running my enterprise application under Glassfish. Under Jetty it works fine.

javax/xml/ws/spi/Provider mentions creating a META-INF/services/javax.xml.ws.spi.Provider resource, but this is already supplied with CXF and creating an additional resource file does not solve this problem under Glassfish.

Does anyone know how to ensure that CXF is picked up under GlassFish?
(I'm using a Maven Multi-modules project with CXF dependency 2.2.5)

Thanks!
Tim


EDIT #1

Skipping the problem for now and just working with Metro, but I'd really like to know how to use CXF instead if anyone has any pointers.. If nothing works I might have to switch web application container (or look into Metro to fill my requirements)


EDIT #2

Some of the solutions detail the fix for war's by adding <class-loader delegate="false"/> to the sun-web.xml file. However, this does not work for non-war ee apps.

解决方案

Add a sun-web.xml and set delegate=false to the class-loader:

<?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> 

这篇关于如何在Glassfish上选择CXF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆