LogicalConnection (Hibernate JavaDocs)
Date: 2012-04-05

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.engine.jdbc.spi
Interface LogicalConnection

All Superinterfaces:
  Serializable

All Known Subinterfaces:
  LogicalConnectionImplementor

All Known Implementing Classes:
  LogicalConnectionImpl

    public interface LogicalConnection

extends Serializable

LogicalConnection contract

Method Summary
`void` | `afterTransaction()` Signals the end of current transaction in which this logical connection operated.
`Connection` | `close()` Release the underlying connection and clean up any other resources associated with this logical connection.
`Connection` | `getConnection()` Retrieves the connection currently "logically" managed by this LogicalConnectionImpl.
`Connection` | `getDistinctConnectionProxy()` Retrieves a distinct connection proxy.
`Connection` | `getShareableConnectionProxy()` Retrieves the shareable connection proxy.
`boolean` | `isOpen()` Is this logical connection open? Another phraseology sometimes used is: "are we logically connected"?
`boolean` | `isPhysicallyConnected()` Is this logical connection instance "physically" connected.

Method Detail

### isOpen

    boolean isOpen()

  Is this logical connection open? Another phraseology sometimes used is: "are we logically connected"?

  Returns:
    True if logically connected; false otherwise.

### isPhysicallyConnected

    boolean isPhysicallyConnected()

  Is this logical connection instance "physically" connected. Meaning do we currently internally have a cached connection.

  Returns:
    True if physically connected; false otherwise.

### getConnection

    Connection getConnection()

  Retrieves the connection currently "logically" managed by this LogicalConnectionImpl.

  Note, that we may need to obtain a connection to return here if a connection has either not yet been obtained (non-UserSuppliedConnectionProvider) or has previously been aggressively released.

  Returns:
    The current Connection.

### getShareableConnectionProxy

    Connection getShareableConnectionProxy()

  Retrieves the shareable connection proxy.

  Returns:
    The shareable connection proxy.

### getDistinctConnectionProxy

    Connection getDistinctConnectionProxy()

  Retrieves a distinct connection proxy. It is distinct in that it is not shared with others unless the caller explicitly shares it.

  Returns:
    The distinct connection proxy.

### close

    Connection close()

  Release the underlying connection and clean up any other resources associated with this logical connection.

  This leaves the logical connection in a "no longer usable" state.

  Returns:
    The application-supplied connection, or `null` if Hibernate was managing connection.

### afterTransaction

    void afterTransaction()

  Signals the end of current transaction in which this logical connection operated.

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.