Codota Logo
IllegalLoopbackException.<init>
Code IndexAdd Codota to your IDE (free)

How to use
javax.ejb.IllegalLoopbackException
constructor

Best Java code snippets using javax.ejb.IllegalLoopbackException.<init> (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: wildfly/wildfly

@Override
public final IllegalLoopbackException failToUpgradeToWriteLock() {
  final IllegalLoopbackException result = new IllegalLoopbackException(String.format(getLoggingLocale(), failToUpgradeToWriteLock$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String componentIsNull = "WFLYEJB0239: %s cannot be null";
origin: com.caucho/resin

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();
}

origin: com.caucho/resin

 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 {0}ms.",
                            timeout));
  } catch (InterruptedException e) {
   throw new ConcurrentAccessTimeoutException(L.l("Thread interruption acquiring write lock: " + e.getMessage()));
  }
 }
}
origin: org.glassfish.main.ejb/ejb-container

private void handleConcurrentInvocation(boolean allowSerializedAccess,
                    EjbInvocation inv, SessionContextImpl sc, Object sessionKey) {
  if (_logger.isLoggable(TRACE_LEVEL)) {
    logTraceInfo(inv, sessionKey, "Another invocation in progress");
  }
  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 {
    String errMsg = "Concurrent Access attempt on method " +
        inv.beanMethod + " of SessionBean " + ejbDescriptor.getName() +
        " is prohibited.  SFSB instance is executing another request. "
      + "[session-key: " + sessionKey + "]";
    ConcurrentAccessException conEx = new ConcurrentAccessException(errMsg);
    if (inv.isBusinessInterface) {
      throw conEx;
    } else {
      // there is an invocation in progress for this instance
      // throw an exception (EJB2.0 section 7.5.6).
      throw new EJBException(conEx);
    }
  }
}
origin: org.glassfish.ejb/ejb-container

private void handleConcurrentInvocation(boolean allowSerializedAccess,
                    EjbInvocation inv, SessionContextImpl sc, Object sessionKey) {
  if (_logger.isLoggable(TRACE_LEVEL)) {
    logTraceInfo(inv, sessionKey, "Another invocation in progress");
  }
  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 {
    String errMsg = "Concurrent Access attempt on method " +
        inv.beanMethod + " of SessionBean " + ejbDescriptor.getName() +
        " is prohibited.  SFSB instance is executing another request. "
      + "[session-key: " + sessionKey + "]";
    ConcurrentAccessException conEx = new ConcurrentAccessException(errMsg);
    if (inv.isBusinessInterface) {
      throw conEx;
    } else {
      // there is an invocation in progress for this instance
      // throw an exception (EJB2.0 section 7.5.6).
      throw new EJBException(conEx);
    }
  }
}
origin: org.glassfish.ejb/ejb-container

 (!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");
origin: org.glassfish.main.ejb/ejb-container

 (!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");
javax.ejbIllegalLoopbackException<init>

Javadoc

Default constructor : builds an exception with an empty message.

Popular methods of IllegalLoopbackException

  • getStackTrace
  • setStackTrace

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • getApplicationContext (Context)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now