这几天做个项目有个问题困扰着,上网找答案一直没解决,最后还是自己调试解决了,痛苦啊
环境:
Spring+Struts+Hibernate+XFire
问题表现:
多个项目同时在同个tomcat服务器同时启动,tomcat在启动某个项目时卡死
Initializing WebApplicationContext for Struts ActionServlet 'action', module 这里卡死了
问题初步分析:
两个项目 一个为webservice服务提供者ProviderProject 一个为webservice客户端ClientProject
服务器在加载ClientProject 的spring bean配置文件时遇到通org.codehaus.xfire.spring.remoting.XFireClientFactoryBean生成的bean。而在生成时需要的wsdl在ProviderProject上,但这个时候ProviderProject并未启动,ClientProject没法找到ProviderProject 上的wsdl,导致XFireClientFactoryBean阻塞,从而tomcat加载spring bean配置文件时卡死
CFIS_RemoteServiceContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- PMIS系统的服务 -->
<bean id="PMIS_UserService" class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean">
<property name="serviceClass">
<value>com.cmis.service.PMIS_UserService</value>
</property>
<property name="wsdlDocumentUrl">
<value>http://localhost:8080/CMIS_PMIS/services/PMIS_UserService?wsdl</value>
</property>
</bean>
<!-- 部分省略 -->
</beans>
问题深入分析:
未作深入分析
解决方案:
不想浪费时间,用了最笨的方法,将ProviderProject 和 ClientProject分开两个服务器运行,先运行ProviderProject后运行ClientProject
分享到:
相关推荐
xfire+spring+安全认证,包含服务端和客户端,xfire jar包可以从我的资源下面下或网上很多。
xfire+spring+webservice+client xfire+spring+webservice+client xfire+spring+webservice+client
xfire+spring开发webservice 很不错的文档
xfire+spring+webservice xfire+spring+webservice xfire+spring+webservice xfire+spring+webservice
使用XFire+Spring构建Web Service使用XFire+Spring构建Web Service使用XFire+Spring构建Web Service使用XFire+Spring构建Web Service使用XFire+Spring构建Web Service使用XFire+Spring构建Web Service
webservice教程(xfire+spring)webservice教程(xfire+spring)webservice教程(xfire+spring)webservice教程(xfire+spring)
XFire采用Woodstox 作Stax实现; 3 容易上手,可以方便快速地从pojo发布服务; 4 支持Spring、Pico、Plexus、Loom等容器; 5 灵活的Binding机制,包括默认的Aegis,xmlbeans,jaxb2,castor; 6 高性能的SOAP 栈...
xfire+spring webservice
使用XFire+Spring使用XFire+Spring构建Web Service(二).doc构建使用XFire+Spring构建Web Service(二).docWeb Service(二).doc
使用XFire+Spring构建Web Service步骤以及源代码.rar
xfire+Spring整合发布webservice,详细解释配置过程,及是替代码,帮助一部分需要这方面开发的人员。
本来想把xfire+spring例子也一起传上来,太大不让传,晕...
使用XFire+Spring构建Web Service步骤 java
xFire+spring webService示例 用过的
使用XFire+Spring构建Web Service.doc 该文章讲解了整个的配置流程,按照该流程可以完成框架搭建。该文章是转载其他人的,因为没有积分,所以不得以而为之。惭愧。
关于ssh demo 演示验证码及图片流显示在界面中,XFire+Spring构建WebService整合
用maven管理的,xfire+spring开发的webservice例子