org.hibernate.ejb.connection
Class InjectedDataSourceConnectionProvider
java.lang.Object
org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
- All Implemented Interfaces:
- Serializable, ConnectionProvider, Service, Configurable, Stoppable, Wrapped
public class InjectedDataSourceConnectionProvider
- extends DatasourceConnectionProviderImpl
A specialization of DatasourceConnectionProviderImpl
which uses the DataSource
specified vi
setDataSource(javax.sql.DataSource)
rather than locating it from JNDI.
NOTE : setDataSource(javax.sql.DataSource)
must be called prior to configure(java.util.Properties)
.
TODO : could not find where #setDataSource is actually called. Can't this just be passed in to #configure???
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InjectedDataSourceConnectionProvider
public InjectedDataSourceConnectionProvider()
setDataSource
public void setDataSource(DataSource ds)
- Overrides:
setDataSource
in class DatasourceConnectionProviderImpl
configure
public void configure(Properties props)
throws HibernateException
- Throws:
HibernateException
getConnection
public Connection getConnection()
throws SQLException
- Description copied from class:
DatasourceConnectionProviderImpl
- Obtains a connection for Hibernate use according to the underlying strategy of this provider.
- Specified by:
getConnection
in interface ConnectionProvider
- Overrides:
getConnection
in class DatasourceConnectionProviderImpl
- Returns:
- The obtained JDBC connection
- Throws:
SQLException
- Indicates a problem opening a connection
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.