Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`InjectedDataSourceConnectionProvider()`

Method Summary
`void` | `configure(Properties props)`
`Connection` | `getConnection()` Obtains a connection for Hibernate use according to the underlying strategy of this provider.
`void` | `setDataSource(DataSource ds)`

Methods inherited from class org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl
`closeConnection, configure, getDataSource, isUnwrappableAs, setJndiService, stop, supportsAggressiveRelease, unwrap`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InjectedDataSourceConnectionProvider

    public InjectedDataSourceConnectionProvider()

Method Detail

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.