简体   繁体   中英

Need connection pool for Spring-boot jca cci

I am undergoing migration of ejb3.1 to Spring-boot. There is a jca component used to do make call to legacy system.

I have migrated this to spring using non managed mode with below api. org.springframework.jca.support.LocalConnectionFactoryBean Ref: https://docs.spring.io/spring/docs/2.5.x/reference/cci.html

Question : is there any way I can add / implement connection pool here.

Note : gone through iornjacamar, but seems to be another container.

There is no direct support from Spring for JCA with connection pooling.

But, we can accomplish this feature with " Apache Commons Pool "

This is a generic pooling framework, you have to write the code to establish connection and validation before adding into the Commons pool.

Please make sure you are managing required configurationproperties with the right values like below,

  • read_timeout
  • connection_timeout
  • max_connection_per_key
  • eviction_policy
  • idle_connection_per_key

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM