Class MyBatisJtaModule

java.lang.Object
com.google.inject.AbstractModule
org.mybatis.guice.MyBatisModule
org.mybatis.guice.MyBatisJtaModule
All Implemented Interfaces:
com.google.inject.Module

public abstract class MyBatisJtaModule extends MyBatisModule
  • Field Details

    • DECLARED_BY_OBJECT

      protected static final com.google.inject.matcher.AbstractMatcher<Method> DECLARED_BY_OBJECT
    • SYNTHETIC

      protected static final com.google.inject.matcher.AbstractMatcher<Method> SYNTHETIC
  • Constructor Details

    • MyBatisJtaModule

      public MyBatisJtaModule()
    • MyBatisJtaModule

      public MyBatisJtaModule(jakarta.transaction.TransactionManager transactionManager)
  • Method Details

    • bindTransactionInterceptors

      protected void bindTransactionInterceptors()
      bind transactional interceptors.
    • getTransactionManager

      protected jakarta.transaction.TransactionManager getTransactionManager()
    • setTransactionManager

      protected void setTransactionManager(jakarta.transaction.TransactionManager transactionManager)
    • bindDefaultTransactionProvider

      protected void bindDefaultTransactionProvider()
    • bindXAResourceProvider

      protected void bindXAResourceProvider(Class<? extends jakarta.inject.Provider<? extends XAResource>> xaResourceProvider)
    • getClasses

      protected static Set<Class<?>> getClasses(String packageName)
      Return a set of all classes contained in the given package.
      Parameters:
      packageName - the package has to be analyzed.
      Returns:
      a set of all classes contained in the given package.
    • getClasses

      protected static Set<Class<?>> getClasses(org.apache.ibatis.io.ResolverUtil.Test test, String packageName)
      Return a set of all classes contained in the given package that match with the given test requirement.
      Parameters:
      test - the class filter on the given package.
      packageName - the package has to be analyzed.
      Returns:
      a set of all classes contained in the given package.
    • configure

      protected final void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule
    • useResourceClassLoader

      public void useResourceClassLoader(ClassLoader resourceClassLoader)
      Use resource class loader.
      Parameters:
      resourceClassLoader - the resource class loader
      Since:
      3.3
    • getResourceClassLoader

      protected final ClassLoader getResourceClassLoader()
      Gets the resource class loader.
      Returns:
      the resource class loader
      Since:
      3.3
    • useJdbcDriverClassLoader

      public void useJdbcDriverClassLoader(ClassLoader driverClassLoader)
      Use jdbc driver class loader.
      Parameters:
      driverClassLoader - the driver class loader
      Since:
      3.3
    • initialize

      protected abstract void initialize()
      Initialize.