java - Spring和Soap客户端,使用池化吗?

标签 java spring web-services soap spring-integration

我正在创建一个 Spring 后端应用程序,它主要公开其余入口点。

此应用程序连接到各种远程服务,包括多个 SOAP Web 服务。

为了以良好的性能响应请求,为 SOAP 客户端服务创建一个池是一个好主意吗?使用 CommonsPoolTargetSource ?

是否有一些资源可以在 Spring 启动环境中使用基于 Java 的配置来完成这种假脱机?

我还在考虑使用 Spring Integration 实现 EIP 总线; “池部分”可以在其中完成吗?

最佳答案

看来您误解了 AbstractPoolingTargetSource 的目的:

 * Abstract base class for pooling {@link org.springframework.aop.TargetSource}
 * implementations which maintain a pool of target instances, acquiring and
 * releasing a target object from the pool for each method invocation.
 * This abstract base class is independent of concrete pooling technology;
 * see the subclass {@link CommonsPool2TargetSource} for a concrete example.

使用 Spring WS(和 Spring Integration WS 适配器),您不需要任何。客户端基础设施的这些组件是单例的,因此它们是可重用且线程安全的。

我完全不明白你要在那里汇集什么......

以及不确定是否可以汇集在EIP总线中。我还没有说,有了 Spring Integration,它就不再是一种模式了。

关于java - Spring和Soap客户端,使用池化吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37099053/

相关文章:

java - onReceive 永远不会被调用

java - 对类构造函数的 protected 访问

string - 将字符串转换为 Spring 资源的方法

java - 使用 contains() 方法时出现奇怪的异常

ios 应用程序使用 web 服务

java - Spring:如何从单个模板定义动态创建多个bean

java - 获取特定文档而不浏览所有实例

java.awt.AWTError : Can't connect to X11 window server using ':0' as the value of the DISPLAY variable 错误

"Web Framework Benchmarks"网站上的 Spring 性能下降

Python,Flask - 如何构建一个安静的Web服务方法来管理上传的文件?