Package org.nuxeo.runtime.datasource
Class PooledDataSourceRegistry
- java.lang.Object
-
- org.nuxeo.runtime.datasource.PooledDataSourceRegistry
-
public class PooledDataSourceRegistry extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PooledDataSourceRegistry.ConfigurableManagedDataSource
ABasicManagedDataSource
that can configure its internalXADataSource
.static class
PooledDataSourceRegistry.TransactionManagerWithoutTransaction
Transaction Manager that is never in a transaction and doesn't allow starting one.
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,DataSource>
dataSources
protected Map<String,DataSource>
dataSourcesNoSharing
-
Constructor Summary
Constructors Constructor Description PooledDataSourceRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears theDataSource
contained in this registry.protected void
closeDataSource(String name, org.apache.commons.dbcp2.managed.BasicManagedDataSource dataSource)
void
createAlias(String name, DataSource ds)
org.apache.commons.dbcp2.managed.BasicManagedDataSource
createPooledDataSource(Map<String,String> properties, boolean noSharing)
<T> T
getDataSource(String name, Class<T> type, boolean noSharing)
void
registerPooledDataSource(String name, Map<String,String> properties)
void
removeAlias(String name)
protected void
unregisterPooledDataSource(String name)
-
-
-
Field Detail
-
dataSources
protected final Map<String,DataSource> dataSources
-
dataSourcesNoSharing
protected final Map<String,DataSource> dataSourcesNoSharing
-
-
Method Detail
-
registerPooledDataSource
public void registerPooledDataSource(String name, Map<String,String> properties)
-
createPooledDataSource
public org.apache.commons.dbcp2.managed.BasicManagedDataSource createPooledDataSource(Map<String,String> properties, boolean noSharing)
-
clear
public void clear()
Clears theDataSource
contained in this registry.This will close the
Connection
contained in theBasicManagedDataSource
pool.
-
unregisterPooledDataSource
protected void unregisterPooledDataSource(String name)
-
closeDataSource
protected void closeDataSource(String name, org.apache.commons.dbcp2.managed.BasicManagedDataSource dataSource)
-
createAlias
public void createAlias(String name, DataSource ds)
-
removeAlias
public void removeAlias(String name)
-
-