Package javax.ejb

Examples of javax.ejb.IllegalLoopbackException


        Lock theLock = lockInfo.isReadLockedMethod() ? readLock : writeLock;

        if ( (rwLock.getReadHoldCount() > 0) &&
             (!rwLock.isWriteLockedByCurrentThread()) ) {
            if( lockInfo.isWriteLockedMethod() ) {
                throw new IllegalLoopbackException("Illegal Reentrant Access : Attempt to make " +
                        "a loopback call on a Write Lock method '" + invInfo.targetMethod1 +
                        "' while a Read lock is already held");
            }
        }
View Full Code Here


        if( allowSerializedAccess ) {

            // Check for loopback call to avoid deadlock.
            if( sc.getStatefulWriteLock().getHoldCount() > 1 ) {

                throw new IllegalLoopbackException("Illegal Reentrant Access : Attempt to make " +
                        "a loopback call on method '" + inv.beanMethod + " for stateful session bean " +
                        ejbDescriptor.getName());
            }

        } else {
View Full Code Here

        Lock theLock = lockInfo.isReadLockedMethod() ? readLock : writeLock;

        if ( (rwLock.getReadHoldCount() > 0) &&
             (!rwLock.isWriteLockedByCurrentThread()) ) {
            if( lockInfo.isWriteLockedMethod() ) {
                throw new IllegalLoopbackException("Illegal Reentrant Access : Attempt to make " +
                        "a loopback call on a Write Lock method '" + invInfo.targetMethod1 +
                        "' while a Read lock is already held");
            }
        }
View Full Code Here

 
  public static void lockWrite(ReentrantReadWriteLock lock)
  {
    if (lock.getReadHoldCount() > 0
        && lock.getWriteHoldCount() == 0) {
      throw new IllegalLoopbackException("Cannot attempt a nested write lock without an existing write lock.");
    }
   
    lock.writeLock().lock();
  }
View Full Code Here

  public static void lockWrite(ReentrantReadWriteLock lock,
                               long timeout)
  {
    if (lock.getReadHoldCount() > 0
        && lock.getWriteHoldCount() == 0) {
      throw new IllegalLoopbackException("Cannot attempt a nested write lock without an existing write lock.");
    }
   
    try {
      if (! lock.writeLock().tryLock(timeout, TimeUnit.MILLISECONDS))
        throw new ConcurrentAccessTimeoutException("Timed out acquiring write lock.");
View Full Code Here

 
  public static void lockWrite(ReentrantReadWriteLock lock)
  {
    if (lock.getReadHoldCount() > 0
        && lock.getWriteHoldCount() == 0) {
      throw new IllegalLoopbackException(L.l("Cannot attempt a nested write lock without an existing write lock."));
    }
   
    lock.writeLock().lock();
  }
View Full Code Here

  public static void lockWrite(ReentrantReadWriteLock lock,
                               long timeout)
  {
    if (lock.getReadHoldCount() > 0
        && lock.getWriteHoldCount() == 0) {
      throw new IllegalLoopbackException(L.l("Cannot attempt a nested write lock without an existing write lock."));
    }
   
    try {
      if (! lock.writeLock().tryLock(timeout, TimeUnit.MILLISECONDS))
        throw new ConcurrentAccessTimeoutException(L.l("Timed out acquiring write lock."));
View Full Code Here

TOP

Related Classes of javax.ejb.IllegalLoopbackException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.