Class MultiTenantResolver

java.lang.Object
org.fiware.mintaka.persistence.tenancy.MultiTenantResolver
All Implemented Interfaces:
org.hibernate.context.spi.CurrentTenantIdentifierResolver

@Singleton public class MultiTenantResolver extends Object implements org.hibernate.context.spi.CurrentTenantIdentifierResolver
Tenant provider for datasource selection. Returns a default tenant in case none is given.
  • Constructor Details

    • MultiTenantResolver

      public MultiTenantResolver()
  • Method Details

    • resolveCurrentTenantIdentifier

      public String resolveCurrentTenantIdentifier()
      Specified by:
      resolveCurrentTenantIdentifier in interface org.hibernate.context.spi.CurrentTenantIdentifierResolver
    • validateExistingCurrentSessions

      public boolean validateExistingCurrentSessions()
      Specified by:
      validateExistingCurrentSessions in interface org.hibernate.context.spi.CurrentTenantIdentifierResolver