|
SAP J2EE Engine Version 6.40 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interfase is used by CMP entity beans, which require explicit managing of the Enqueue locking, instead of using the implicit locking mechanisms of the EJB Container. Uses the TableLocking API.
| Field Summary | |
static java.lang.String |
JNDI_NAME
|
| Method Summary | |
void |
lock(byte lifetime,
java.sql.Connection connection,
javax.ejb.EntityBean lockingArgument,
char mode)
Creates a lock for a row in a table, accessible through the specified SQL connection. |
void |
unlock(byte lifetime,
java.sql.Connection connection,
javax.ejb.EntityBean lockingArgument,
char mode)
Releases a lock for a row in a table, accessible through the specified SQL connection. |
void |
unlock(byte lifetime,
java.sql.Connection connection,
javax.ejb.EntityBean lockingArgument,
char mode,
boolean asynchronous)
Releases a lock for a row in a table, accessible through the specified SQL connection. |
void |
unlockAll(byte lifetime)
Releases all locks. |
void |
unlockAll(byte lifetime,
boolean asynchronous)
Releases all locks. |
| Field Detail |
public static final java.lang.String JNDI_NAME
| Method Detail |
public void lock(byte lifetime,
java.sql.Connection connection,
javax.ejb.EntityBean lockingArgument,
char mode)
throws EJBLockException
lifetime - The lifetime can be either LIFETIME_TRANSACTION or LIFETIME_USERSESSION.connection - The SQL connection instance created by a data source instance,
which has a corresponding entry in the deployment descriptor of the DB pool.lockingArgument - The CMP entity bean, whose corresponding row in the database must be locked.mode - The mode can be MODE_SHARED, MODE_EXCLUSIVE_CUMULATIVE, or MODE_EXCLUSIVE_NONCUMULATIVE.EJBLockException - if the lock is not allowed.
public void unlock(byte lifetime,
java.sql.Connection connection,
javax.ejb.EntityBean lockingArgument,
char mode)
lifetime - The lifetime can be either LIFETIME_TRANSACTION or LIFETIME_USERSESSION.connection - The SQL connection instance created by a data source instance,
which has a corresponding entry in the deployment descriptor of the DB pool.lockingArgument - The CMP entity bean whose corresponding row in the database must be locked.mode - The mode can be MODE_SHARED, MODE_EXCLUSIVE_CUMULATIVE, or MODE_EXCLUSIVE_NONCUMULATIVE.
public void unlock(byte lifetime,
java.sql.Connection connection,
javax.ejb.EntityBean lockingArgument,
char mode,
boolean asynchronous)
lifetime - The lifetime can be either LIFETIME_TRANSACTION or LIFETIME_USERSESSION.connection - The SQL connection instance created by a data source instance,
which has a corresponding entry in the deployment descriptor of the DB pool.lockingArgument - The CMP entity bean whose corresponding row in the database must be locked.mode - The mode can be MODE_SHARED, MODE_EXCLUSIVE_CUMULATIVE, or MODE_EXCLUSIVE_NONCUMULATIVE.asynchronous - If false, the unlock is done synchronously.public void unlockAll(byte lifetime)
lifetime - The lifetime can be either LIFETIME_TRANSACTION or LIFETIME_USERSESSION.
public void unlockAll(byte lifetime,
boolean asynchronous)
lifetime - The lifetime can be either LIFETIME_TRANSACTION or LIFETIME_USERSESSION.asynchronous - If false, the unlock is done synchronously.
|
SAP J2EE Engine Version 6.40 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||