title: Setting HikariCP connection pool properties programmatically in case of multiple datasource with spring data jpa and oracle
body: <p>I am creating <code>javax.sql.DataSource</code> as below:</p>
  
  <pre><code>@Primary
      @Bean
      @ConfigurationProperties("spring.datasource")
      public DataSource commonDataSource() {
          String url = &lt;url&gt;;
          String user = &lt;user&gt;;
          String driverClass = "oracle.jdbc.driver.OracleDriver";
          return DataSourceBuilder.create().url(url).username(user).password(&lt;pwd&gt;).driverClassName(driverClass).build();
          //return DataSourceBuilder.create().build();
      }
  
      @Primary
      @Bean(name = "commonEntityManagerFactory")
      public LocalContainerEntityManagerFactoryBean commonEntityManagerFactory(EntityManagerFactoryBuilder builder) {
          Properties jpaProperties = new Properties();
          jpaProperties.put("hibernate.dialect", "org.hibernate.dialect.Oracle10gDialect");
          jpaProperties.put("hibernate.connection.autocommit", false);
          LocalContainerEntityManagerFactoryBean entityManagerFactory = builder.dataSource(commonDataSource())
                  .packages("com.data.model.common").build();
          entityManagerFactory.setJpaProperties(jpaProperties);
          entityManagerFactory.afterPropertiesSet();
          return entityManagerFactory;
      }
      @Primary
      @Bean
      public PlatformTransactionManager commonTransactionManager(final @Qualifier("commonEntityManagerFactory") LocalContainerEntityManagerFactoryBean commonEntityManagerFactory) {
          return new JpaTransactionManager(commonEntityManagerFactory.getObject());
      }
  </code></pre>
  
  <p>Could someone please suggest how to set connection pool properties here. I want to use HikariCP.
  I am not using following properties in <strong>application.propertires</strong> </p>
  
  <pre><code>#HikariCP settings
  spring.datasource.hikari.connection-timeout=60000
  spring.datasource.hikari.maximum-pool-size=15
  spring.datasource.hikari.minimum-idle=1
  </code></pre>
  
  <p>as I am creating multiple data sources. So, I want to set the connection pool related properties programmatically while instantiating the DataSource.</p>