Spring boot and tomcat connection pool: using embedded server, and without embedded server

444 Views Asked by At

I am aware that in Spring boot, we can set properties related to Spring boot and connection pool properties. When we set these properties in a Spring boot application with embedded server, do they take effect?

Also, when we disable embedded tomcat server, and deploy the war file inside a separate tomcat container, do these properties take effect?

For example, I may have following properties:

spring:
datasource:
    jdbc-url: "jdbc:oracle:thin: ...."
    username: "admin"
    password: "admin"
    driver-class-name: "oracle.jdbc.driver.OracleDriver"
    type: "org.apache.tomcat.jdbc.pool.DataSource" 
    tomcat:
        initialSize: 55
        max-wait: 10000
        max-active: 50
        max-idle: 15
        min-idle: 8
        default-autoCommit: false

  1. Do these take effect when I am running the application as a embedded tomcat server (i.e just using jar as packaging format)?
  2. Do these take effect when I am running the application inside Tomcat container and have disabled embedded tomcat container?

Thanks Chetan

0

There are 0 best solutions below