سؤال

Our application needs to accept client requests on a socket (TCP). I have two options

Use spring integration TCP support

Pros: 1. We already use spring heavily so there will be less learning curve here. 2. Simplified end-to-end testing without a container

Concerns: My concerns are w.r.t handling of concurrent requests and scaling. Can it use managed thread pools? Are there any other things I need to worry about?

Use JCA TCP Inbound adapter

Pros: 1. Plays well with a Java EE container as it is the suggested way of implementing this.

Concerns: 1. Hard to find well tested TCP adapter (open source) 2. Requires container

Would appreciate your thoughts on this. Also, any gothcas I should be knowing about?

هل كانت مفيدة؟

المحلول

Spring provides WorkManagerTaskExecutor and TimerManagerTaskScheduler to use managed thread pools. Any place in Spring Integration that needs a scheduler (e.g. pollers) or task executor can use these abstractions. See the Spring Integration and Spring reference docs for more information.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top