Package org.nuiton.topia.framework
Class TopiaUtil.ConnectionProviderSupplier
java.lang.Object
org.nuiton.topia.framework.TopiaUtil.ConnectionProviderSupplier
- All Implemented Interfaces:
com.google.common.base.Supplier<org.hibernate.engine.jdbc.connections.spi.ConnectionProvider>,Closeable,AutoCloseable,Supplier<org.hibernate.engine.jdbc.connections.spi.ConnectionProvider>
- Enclosing class:
- TopiaUtil
public static class TopiaUtil.ConnectionProviderSupplier
extends Object
implements com.google.common.base.Supplier<org.hibernate.engine.jdbc.connections.spi.ConnectionProvider>, Closeable
Hibernate 4.3.x compatible Supplier<ConnectionProvider>. The provider will choose the best way to find the
ConnectionProvider depending on the way is has been created.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.hibernate.engine.jdbc.connections.spi.ConnectionProviderprotected booleanprotected org.hibernate.boot.registry.StandardServiceRegistryStandardServiceRegistry will be used if no SessionFactory is provided -
Constructor Summary
ConstructorsConstructorDescriptionConnectionProviderSupplier(Properties properties) ConnectionProviderSupplier(TopiaContextImplementor topiaContextImplementor) -
Method Summary
-
Field Details
-
standardServiceRegistry
protected org.hibernate.boot.registry.StandardServiceRegistry standardServiceRegistryStandardServiceRegistry will be used if no SessionFactory is provided -
connectionProvider
protected org.hibernate.engine.jdbc.connections.spi.ConnectionProvider connectionProvider -
embeddedRegistry
protected boolean embeddedRegistry
-
-
Constructor Details
-
ConnectionProviderSupplier
public ConnectionProviderSupplier(TopiaContextImplementor topiaContextImplementor) throws TopiaNotFoundException - Throws:
TopiaNotFoundException
-
ConnectionProviderSupplier
-
-
Method Details
-
get
public org.hibernate.engine.jdbc.connections.spi.ConnectionProvider get() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-