Tabnine Logo
IllegalLoopbackException.<init>
Code IndexAdd Tabnine 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)

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
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • Path (java.nio.file)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now