public interface ConnectionEventListener extends EventListenerSE
ConnectionEventListener
インターフェースは、アプリケーションサーバーが ManagedConnection
インスタンスから通知を受信できるようにするイベントコールバックメカニズムを提供します。アプリケーションサーバーは、これらのイベント通知を使用して、接続プールを管理し、無効または終了した接続をクリーンアップし、ローカルトランザクションを管理します。
アプリケーションサーバーは ConnectionEventListener
インターフェースを実装します。ManagedConnection.addConnectionEventListener
メソッドを使用して、接続リスナーを ManagedConnection
インスタンスに登録します。
ConnectionEvent
修飾子と型 | メソッドと説明 |
---|---|
void | connectionClosed(ConnectionEvent event) アプリケーションコンポーネントが接続を閉じたことを通知します。 |
void | connectionErrorOccurred(ConnectionEvent event) 接続関連のエラーを通知します。 |
void | localTransactionCommitted(ConnectionEvent event) ResourceManager ローカルトランザクションが ManagedConnection インスタンスでコミットされたことを通知します。 |
void | localTransactionRolledback(ConnectionEvent event) ResourceManager ローカルトランザクションが ManagedConnection インスタンスでロールバックされたことを通知します。 |
void | localTransactionStarted(ConnectionEvent event) ResourceManager ローカルトランザクションが ManagedConnection インスタンスで開始されたことを通知します。 |
void connectionClosed(ConnectionEvent event)
ManagedConnection インスタンスは、アプリケーションコンポーネントが接続ハンドルを閉じるときに、ConnectionEventListener.connectionClosed メソッドを呼び出すことにより、登録されているリスナーのセットに通知します。アプリケーションサーバーは、この接続クローズイベントを使用して、ManagedConnection インスタンスを接続プールに戻します。
event
- イベントのソースを説明するイベントオブジェクト void localTransactionStarted(ConnectionEvent event)
event
- イベントのソースを説明するイベントオブジェクト void localTransactionCommitted(ConnectionEvent event)
event
- イベントのソースを説明するイベントオブジェクト void localTransactionRolledback(ConnectionEvent event)
event
- イベントのソースを説明するイベントオブジェクト void connectionErrorOccurred(ConnectionEvent event)
event
- イベントのソースを説明するイベントオブジェクト Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.