on 08-10-2023 12:29 AM
Hi Team,
Just wanted to clarify the default settings connection pool for CAP JAVA using SAP Cloud Hana DB.
I understand the following. Please correct me if i am wrong
We would also like to know how you change this default. I found this in a blog. This is implemented in the application.yaml
spring:
config.activate.on-profile: cloud
datasource:
hikari:
maximum-pool-size: 20
But in the CAPIRE documentation the example is this
cds:<br> dataSource:<br> my-service-instance:<br> hikari:<br> maximum-pool-size: 20
Which on is the correct configuration??
Also the dataSource in the documentation has "S" in uppercase, not sure if this has any effect.
what value to we put in the "my-service-instance"???
Also, how do we check the changes have been applied??? is there any way we can see this??
Appreciate your help with this.
Cheers
D
Dear diri,
Yes. CAP for Java uses the Hikari Connection Pool by default and the default maximum pool size is 10.
Both the examples you provided seem to be correct. The first one uses a standard Spring Boot YAML configuration structure, and the second one uses a configuration structure specific to CAP in the CDS section.
Either one can be used based on your preference.
Uppercase "S" in dataSource should not have any effect, as YAML is case-insensitive for key names
The my-service-instance in the configuration corresponds to the name of the database service instance you've defined in your cloud environment. It's typically the name of the bound HANA database service.
--
Regards,
H.V.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please note, that the spring.datasource section must be used only if you explicitly configure your HANA connections in Spring. If you are using CAPs auto-configuration based on service bindings you need to use cds.dataSource.<my-service-binding-name>...
You can check the defaults by increasing the log level for Hikari, which will print the full effective configuration at pool initialization time. Set logger "com.zaxxer.hikari" to "DEBUG"
User | Count |
---|---|
68 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.