Interface PoolDataSourceCustomizer

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PoolDataSourceCustomizer
Customizes a UCP PoolDataSource after it is configured and before the pool starts.

Use it for settings that configuration cannot express because they take objects, such as PoolDataSource.setTokenSupplier(java.util.function.Supplier), PoolDataSource.registerConnectionCreationConsumer(java.util.function.Consumer) and PoolDataSource.registerConnectionLabelingCallback(oracle.ucp.ConnectionLabelingCallback). Every customizer bean is applied to every UCP data source, ordered by Ordered; use the data source name to target one.

Since:
7.3.0
Author:
Graeme Rocher
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    customize(String dataSourceName, oracle.ucp.jdbc.PoolDataSource poolDataSource)
    Customizes the pool data source.
  • Method Details

    • customize

      void customize(String dataSourceName, oracle.ucp.jdbc.PoolDataSource poolDataSource) throws SQLException
      Customizes the pool data source.
      Parameters:
      dataSourceName - The name of the data source, such as default
      poolDataSource - The pool data source, not yet started
      Throws:
      SQLException - If a UCP setter fails