Class DataSources

    • Method Detail

      • fromName

        public static io.agroal.api.AgroalDataSource fromName​(String dataSourceName)
        Meant to be used from recorders that create synthetic beans that need access to Datasource. In such using Arc.container.instance(DataSource.class) is not possible because Datasource is itself a synthetic bean.

        This method relies on the fact that DataSources should - given the same input - always return the same AgroalDataSource no matter how many times it is invoked (which makes sense because DataSource is a Singleton bean).

        This method is thread-safe

      • getDataSource

        public io.agroal.api.AgroalDataSource getDataSource​(String dataSourceName)
      • doCreateDataSource

        public io.agroal.api.AgroalDataSource doCreateDataSource​(String dataSourceName)
      • stop

        @PreDestroy
        public void stop()