Class DataSourceResource

java.lang.Object
io.micronaut.crac.resources.DataSourceResource
All Implemented Interfaces:
io.micronaut.core.order.Ordered, OrderedResource, org.crac.Resource

@EachBean(javax.sql.DataSource.class) @Requires(classes=javax.sql.DataSource.class) @Requires(bean=CracResourceRegistrar.class) public class DataSourceResource extends Object implements OrderedResource
Register DataSources as CRaC resources on startup if CRaC is enabled.
Since:
1.1.0
Author:
Tim Yates
  • Constructor Details

  • Method Details

    • beforeCheckpoint

      public void beforeCheckpoint(org.crac.Context<? extends org.crac.Resource> context) throws Exception
      Specified by:
      beforeCheckpoint in interface org.crac.Resource
      Throws:
      Exception
    • afterRestore

      public void afterRestore(org.crac.Context<? extends org.crac.Resource> context) throws Exception
      Specified by:
      afterRestore in interface org.crac.Resource
      Throws:
      Exception