org.quartz.impl.jdbcjobstore
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field Summary | |
|---|---|
static String |
DEFAULT_TRANSACTION_MANANGER_LOCATION
|
| Constructor Summary | |
|---|---|
JTANonClusteredSemaphore()
|
|
| Method Summary | |
|---|---|
protected org.apache.commons.logging.Log |
getLog()
|
protected Transaction |
getTransaction()
Helper method to get the current
from the in JNDI. |
boolean |
isLockOwner(Connection conn,
String lockName)
Determine whether the calling thread owns a lock on the identified resource. |
boolean |
obtainLock(Connection conn,
String lockName)
Grants a lock on the identified resource to the calling thread (blocking until it is available). |
void |
releaseLock(Connection conn,
String lockName)
Release the lock on the identified resource if it is held by the calling thread, unless currently in a JTA transaction. |
protected void |
releaseLock(String lockName,
boolean fromSynchronization)
Release the lock on the identified resource if it is held by the calling thread, unless currently in a JTA transaction. |
boolean |
requiresConnection()
This Semaphore implementation does not use the database. |
void |
setTransactionManagerJNDIName(String transactionManagerJNDIName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_TRANSACTION_MANANGER_LOCATION
| Constructor Detail |
|---|
public JTANonClusteredSemaphore()
| Method Detail |
|---|
protected org.apache.commons.logging.Log getLog()
public void setTransactionManagerJNDIName(String transactionManagerJNDIName)
public boolean obtainLock(Connection conn, String lockName) throws LockException
obtainLock in interface Semaphoreconn - Database connection used to establish lock. Can be null if
Semaphore.requiresConnection() returns false.
LockExceptionprotected Transaction getTransaction() throws LockException
Transaction
from the TransactionManager in JNDI.
Transaction, null if
not currently in a transaction.
LockExceptionpublic void releaseLock(Connection conn, String lockName) throws LockException
releaseLock in interface Semaphoreconn - Database connection used to establish lock. Can be null if
Semaphore.requiresConnection() returns false.
LockExceptionprotected void releaseLock(String lockName, boolean fromSynchronization) throws LockException
fromSynchronization - True if this method is being invoked from
Synchronization notified of the enclosing
transaction having completed.
LockException - Thrown if there was a problem accessing the JTA
Transaction. Only relevant if fromSynchronization
is false.public boolean isLockOwner(Connection conn, String lockName)
isLockOwner in interface Semaphoreconn - Database connection used to establish lock. Can be null if
Semaphore.requiresConnection() returns false.public boolean requiresConnection()
requiresConnection in interface Semaphore
|
Quartz Enterprise Job Scheduler Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||