javax.ejb.SessionSynchronization翻訳



<!-- -->
<!-- -->
Overview
Package
Class
Tree
Deprecated
Index
Help
JavaTM 2 PlatformEnt. Ed. v1.4
PREV CLASS NEXT CLASS
FRAMES NO FRAMES All Classes
SUMMARY:NESTED|FIELD|CONSTR| METHOD
DETAIL:FIELD|CONSTR| METHOD


javax.ejb Interface SessionSynchronization


public interface
SessionSynchronization
The SessionSynchronization interface allows a session Bean instance to be notified by its container of transaction boundaries. SessionSynchronizationインタフェースを使用すると、セッションBeanインスタンスがトランザクション境界に関するコンテナの通知を受信できます.
An session Bean class is not required to implement this interface. A session Bean class should implement this interface only if it wishes to synchronize its state with the transactions. セッションBeanクラスでは、インタフェースを実装する必要はありません.このインタフェースは、セッションBeanクラスがトランザクションと同期した状態を実現したい場合にのみ実現されます.
<!-- -->
Method Summaryvoid afterBegin() The afterBegin method notifies a session Bean instance that a new transaction has started, and that the subsequent business methods on the instance will be invoked in the context of the transaction. afterBeginメソッドは、セッションBeanインスタンスの新しいトランザクションの開始を通知し、その後、インスタンスのビジネスメソッドがトランザクションコンテキストで呼び出されます.void afterCompletion(booleancommitted) The afterCompletion method notifies a session Bean instance that a transaction commit protocol has completed, and tells the instance whether the transaction has been committed or rolled back. afterCompletionメソッドは、セッションBeanインスタンストランザクションコミットプロトコルが完了したことを通知し、インスタンストランザクションがコミットされるかロールバックされるかを通知します.void beforeCompletion() The beforeCompletion method notifies a session Bean instance that a transaction is about to be committed. beforeCompletionメソッドは、セッションBeanインスタンストランザクションがコミットされることを通知します.
<!-- -->
Method Detail
<!-- -->

afterBegin

public void afterBegin()
                throws EJBException,
                       RemoteException

The afterBegin method notifies a session Bean instance that a new transaction has started, and that the subsequent business methods on the instance will be invoked in the context of the transaction. afterBeginメソッドは、セッションBeanインスタンスの新しいトランザクションの開始を通知し、その後、インスタンスのビジネスメソッドがトランザクションコンテキストで呼び出されます.
The instance can use this method, for example, to read data from a database and cache the data in the instance fields. インスタンスは、データベースからデータを読み込み、インスタンスフィールドにデータをキャッシュするなど、この方法を使用します.
This method executes in the proper transaction context. このメソッドは、元のトランザクションコンテキストで実行されます.
Throws: EJBException - Thrown by the method to indicate a failure caused by a system-level error. メソッドは、システムレベルのエラーによる失敗を表す異常を放出します.RemoteException - This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 and higher specifications should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB 2.0 and higher specifications must not throw the java.rmi.RemoteException. メソッド署名でこの例外を定義するのは、EJB 1.0仕様に準拠するエンタープライズbeanに対して下位互換性を提供するためです.EJB 1.1の規範に合致する企業beanはjavaxを投げ出すべきである.ejb.この異常の代わりにEJBExceptionが使用されます.EJB 2.0以降の仕様に合致する企業beanもjavaxを投げ出すべきである.ejb.この異常の代わりにEJBExceptionが使用されます.
<!-- -->

beforeCompletion

public void beforeCompletion()
                      throws EJBException,
                             RemoteException

The beforeCompletion method notifies a session Bean instance that a transaction is about to be committed. The instance can use this method, for example, to write any cached data to a database. beforeCompletionメソッドは、セッションBeanインスタンストランザクションがコミットされることを通知します.インスタンスは、データベースにデータをキャッシュするなど、この方法を使用します.
This method executes in the proper transaction context. このメソッドは、元のトランザクションコンテキストで実行されます.
Note: The instance may still cause the container to rollback the transaction by invoking the setRollbackOnly() method on the instance context, or by throwing an exception. 注:インスタンスは、setRollbackOnly()メソッドをインスタンスコンテキストで呼び出すか、例外を放出してコンテナがトランザクションをロールバックする可能性があります.
Throws: EJBException - Thrown by the method to indicate a failure caused by a system-level error. メソッドは、システムレベルのエラーによる失敗を表す異常を放出します.RemoteException - This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 and higher specification should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB 2.0 and higher specifications must not throw the java.rmi.RemoteException. メソッド署名でこの例外を定義するのは、EJB 1.0仕様に準拠するエンタープライズbeanに対して下位互換性を提供するためです.EJB 1.1の規範に合致する企業beanはjavaxを投げ出すべきである.ejb.この異常の代わりにEJBExceptionが使用されます.EJB 2.0以降の仕様に合致する企業beanもjavaxを投げ出すべきである.ejb.この異常の代わりにEJBExceptionが使用されます.
<!-- -->

afterCompletion

public void afterCompletion(booleancommitted)
                     throws EJBException,
                            RemoteException

The afterCompletion method notifies a session Bean instance that a transaction commit protocol has completed, and tells the instance whether the transaction has been committed or rolled back. afterCompletionメソッドは、セッションBeanインスタンストランザクションコミットプロトコルが完了したことを通知し、インスタンストランザクションがコミットされるかロールバックされるかを通知します.
This method executes with no transaction context. このメソッドはトランザクションコンテキストでは実行されません.
Parameters: committed - True if the transaction has been committed, false if is has been rolled back. トランザクションがコミットされた場合はtrue、ロールバックされた場合はfalseを返します.
Throws: EJBException - Thrown by the method to indicate a failure caused by a system-level error. メソッドは、システムレベルのエラーによる失敗を表す異常を放出します.RemoteException - This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 and higher specification should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB 2.0 and higher specifications must not throw the java.rmi.RemoteException. メソッド署名でこの例外を定義するのは、EJB 1.0仕様に準拠するエンタープライズbeanに対して下位互換性を提供するためです.EJB 1.1の規範に合致する企業beanはjavaxを投げ出すべきである.ejb.この異常の代わりにEJBExceptionが使用されます.EJB 2.0以降の仕様に合致する企業beanもjavaxを投げ出すべきである.ejb.この異常の代わりにEJBExceptionが使用されます.


<!-- -->
<!-- -->
Overview
Package
Class
Tree
Deprecated
Index
Help
JavaTM 2 PlatformEnt. Ed. v1.4
PREV CLASS NEXT CLASS
FRAMES NO FRAMES All Classes
SUMMARY:NESTED|FIELD|CONSTR| METHOD
DETAIL:FIELD|CONSTR| METHOD

Submit a bug or feature
Copyright 2003 Sun Microsystems, Inc. All rights reserved.