Interface TxConfigFactory<T extends java.lang.annotation.Annotation>

  • Type Parameters:
    T - annotation type
    All Known Implementing Classes:
    InTransactionTxConfigFactory

    public interface TxConfigFactory<T extends java.lang.annotation.Annotation>
    Factory converts transaction parameters from annotation into common tx config object. Declared with TxConfigSupport directly on target annotation class.

    IMPORTANT: Factory is obtained from guice context so prefer annotating it with Singleton to avoid redundant instantiations (if factory is stateless).

    Resolved config is cached for target method to avoid duplicate resolutions.

    Since:
    18.09.2018
    See Also:
    TransactionalInterceptor
    • Method Detail

      • build

        TxConfig build​(T annotation)
        Parameters:
        annotation - annotation to read configuration from
        Returns:
        tx config object (may be null)