public class DataSourceBasedMultiTenantConnectionProviderImpl extends AbstractDataSourceBasedMultiTenantConnectionProviderImpl implements ServiceRegistryAwareService, Stoppable
MultiTenantConnectionProvider contract bases on a number of
 reasonable assumptions.  We assume that:DataSource instances are all available from JNDI named by the tenant identifier relative
         to a single base JNDI context
     AvailableSettings.DATASOURCE is a string naming either the any
         data source or the base JNDI context.  If the latter, TENANT_IDENTIFIER_TO_USE_FOR_ANY_KEY must
         also be set.
     | Modifier and Type | Field and Description | 
|---|---|
static String | 
TENANT_IDENTIFIER_TO_USE_FOR_ANY_KEY
Identifies the DataSource name to use for  
selectAnyDataSource() handling | 
| Constructor and Description | 
|---|
DataSourceBasedMultiTenantConnectionProviderImpl()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
injectServices(ServiceRegistryImplementor serviceRegistry)
Callback to inject the registry. 
 | 
protected DataSource | 
selectAnyDataSource()  | 
protected DataSource | 
selectDataSource(String tenantIdentifier)  | 
void | 
stop()
Stop phase notification 
 | 
getAnyConnection, getConnection, isUnwrappableAs, releaseAnyConnection, releaseConnection, supportsAggressiveRelease, unwrappublic static final String TENANT_IDENTIFIER_TO_USE_FOR_ANY_KEY
selectAnyDataSource() handlingpublic DataSourceBasedMultiTenantConnectionProviderImpl()
protected DataSource selectAnyDataSource()
selectAnyDataSource in class AbstractDataSourceBasedMultiTenantConnectionProviderImplprotected DataSource selectDataSource(String tenantIdentifier)
selectDataSource in class AbstractDataSourceBasedMultiTenantConnectionProviderImplpublic void injectServices(ServiceRegistryImplementor serviceRegistry)
ServiceRegistryAwareServiceinjectServices in interface ServiceRegistryAwareServiceserviceRegistry - The registryCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.