Earn Money
Trading Forex Online
Paramount Airways
Free Data Recovery
Cargo
Job Portal
HSBC Investment
Management
Cheap Web Hosting
Make Trip
Cheap Air Travel
Leisure Hotel
Free Air Travel
Mutual Fund Informations
Cheapest Cellular Plan
Free Sexy Indians
Call Center Software
Hot Indian
|
Programming Help |
Homework Help |
Counseling
Astrology Advice |
Tarot Advice |
Parenting
Dating Advice |
Love Advice |
Divorce Advice
Legal Advice |
Debt Advice |
Career Advice
Enterprise Beans Tutorial
19
RequiresNew
If the client is running within a transaction and it invokes the enterprise bean's method, the container takes
the following steps:
suspends the client's transaction starts a new transaction delegates the call to the method resumes the client's transaction after the method completes
If the client is not associated with a transaction, the container starts a new transaction before running the
method.
You should use the RequiresNew attribute when you want to ensure that the method always runs within a
new transaction.
Mandatory
If the client is running within a transaction and it invokes the enterprise bean's method, the method executes
within the client's transaction.
If the client is not associated with a transaction, the container throws the TransactionRequiredException. Use the Mandatory attribute if the enterprise bean's method must use the transaction of the client.
NotSupported
If the client is running within a transaction and it invokes the enterprise bean's method, the container
suspends the client's transaction before invoking the method. After the method has completed, the container resumes the client's transaction.
If the client is not associated with a transaction, the container does not start a new transaction before running
the method.
Use the NotSupported attribute when you want to ensure that the method will never run within a transaction
generated by the container.
Supports
If the client is running within a transaction and it invokes the enterprise bean's method, the method executes
within the client's transaction.
If the client is not associated with a transaction, the container does not start a new transaction before running
the method.
Because the transactional behavior of the method may vary, you should use the Supports attribute with
caution.
Never
If the client is running within a transaction and it invokes the enterprise bean's method, the container throws
a RemoteException.
If the client is not associated with a transaction, the container does not start a new transaction before
running the method.
Summary of Transaction Attributes
Table 6-1 summarizes the effects of the transaction attributes. Both the T1 and T2 transactions are controlled by the container. A T1 transaction is associated with the client that calls a method in the enterprise bean. In most cases, the client is another enterprise bean. A T2 transaction is started by the container just before the method executes.
In the last column, the word "none" means that the business method does not execute within a transaction controlled by the container. However, the database calls in such a business method might be controlled by the transaction manager of the DBMS.
|
|
|
Earn Money
Trading Forex Online
Paramount Airways
Free Data Recovery
Cargo
Job Portal
HSBC Investment
Management
Cheap Web Hosting
Make Trip
Cheap Air Travel
Leisure Hotel
Free Air Travel
Mutual Fund Informations
Cheapest Cellular Plan
Free Sexy Indians
Call Center Software
Hot Indian
|