congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
SFSBCallStack.currentSFSBCallStack
Code IndexAdd Tabnine to your IDE (free)

How to use
currentSFSBCallStack
method
in
org.jboss.as.jpa.container.SFSBCallStack

Best Java code snippets using org.jboss.as.jpa.container.SFSBCallStack.currentSFSBCallStack (Showing top 8 results out of 315)

origin: org.wildfly/wildfly-jpa

/**
 * Pops the current SFSB invocation off the invocation call stack
 *
 * @return the entity manager map
 */
public static Map<String, ExtendedEntityManager> popCall() {
  ArrayList<Map<String, ExtendedEntityManager>> stack = currentSFSBCallStack();
  Map<String, ExtendedEntityManager> result = stack.remove(stack.size() - 1);
  stack.trimToSize();
  return result;
}
origin: org.wildfly/wildfly-jpa

/**
 * gets the current SFSB invocation off the invocation call stack
 *
 * @return the entity manager map
 */
static Map<String, ExtendedEntityManager> getCurrentCall() {
  ArrayList<Map<String, ExtendedEntityManager>> stack = currentSFSBCallStack();
  Map<String, ExtendedEntityManager> result = null;
  if (stack != null) {
    result = stack.get(stack.size() - 1);
  }
  return result;
}
origin: org.jboss.eap/wildfly-jpa

/**
 * gets the current SFSB invocation off the invocation call stack
 *
 * @return the entity manager map
 */
static Map<String, ExtendedEntityManager> getCurrentCall() {
  ArrayList<Map<String, ExtendedEntityManager>> stack = currentSFSBCallStack();
  Map<String, ExtendedEntityManager> result = null;
  if (stack != null) {
    result = stack.get(stack.size() - 1);
  }
  return result;
}
origin: org.jboss.eap/wildfly-jpa

/**
 * Pops the current SFSB invocation off the invocation call stack
 *
 * @return the entity manager map
 */
public static Map<String, ExtendedEntityManager> popCall() {
  ArrayList<Map<String, ExtendedEntityManager>> stack = currentSFSBCallStack();
  Map<String, ExtendedEntityManager> result = stack.remove(stack.size() - 1);
  stack.trimToSize();
  return result;
}
origin: org.wildfly/wildfly-jpa

/**
 * Push the passed SFSB context handle onto the invocation call stack
 *
 * @param entityManagers the entity manager map
 */
public static void pushCall(Map<String, ExtendedEntityManager> entityManagers) {
  currentSFSBCallStack().add(entityManagers);
  if (entityManagers != null) {
    /**
     * JPA 2.0 spec section 7.9.1 Container Responsibilities:
     * "When a business method of the stateful session bean is invoked,
     *  if the stateful session bean uses container managed transaction demarcation,
     *  and the entity manager is not already associated with the current JTA transaction,
     *  the container associates the entity manager with the current JTA transaction and
     *  calls EntityManager.joinTransaction.
     *  "
     */
    for(ExtendedEntityManager extendedEntityManager: entityManagers.values()) {
      extendedEntityManager.internalAssociateWithJtaTx();
    }
  }
}
origin: org.jboss.eap/wildfly-jpa

/**
 * Push the passed SFSB context handle onto the invocation call stack
 *
 * @param entityManagers the entity manager map
 */
public static void pushCall(Map<String, ExtendedEntityManager> entityManagers) {
  currentSFSBCallStack().add(entityManagers);
  if (entityManagers != null) {
    /**
     * JPA 2.0 spec section 7.9.1 Container Responsibilities:
     * "When a business method of the stateful session bean is invoked,
     *  if the stateful session bean uses container managed transaction demarcation,
     *  and the entity manager is not already associated with the current JTA transaction,
     *  the container associates the entity manager with the current JTA transaction and
     *  calls EntityManager.joinTransaction.
     *  "
     */
    for(ExtendedEntityManager extendedEntityManager: entityManagers.values()) {
      extendedEntityManager.internalAssociateWithJtaTx();
    }
  }
}
origin: org.jboss.eap/wildfly-jpa

  @Override
  public ExtendedEntityManager findExtendedPersistenceContext(String puScopedName) {
    ExtendedEntityManager result;
    SFSBInjectedXPCs currentInjectedXPCs = SFSBCallStack.getSFSBCreationTimeInjectedXPCs(puScopedName);
    // will look directly at the top level bean being created (registerExtendedPersistenceContext() registers xpc there).
    result = currentInjectedXPCs.findExtendedPersistenceContextDeepInheritance(puScopedName);

    if (result == null) {
      // walk up the BEAN call stack (this also covers the case of a bean method JNDI searching for another bean)
      for (Map<String, ExtendedEntityManager> handle : SFSBCallStack.currentSFSBCallStack()) {
        result = handle.get(puScopedName);
        if(result != null) {
          return result;
        }
      }
    }

    return result;

  }
}
origin: org.wildfly/wildfly-jpa

  @Override
  public ExtendedEntityManager findExtendedPersistenceContext(String puScopedName) {
    ExtendedEntityManager result;
    SFSBInjectedXPCs currentInjectedXPCs = SFSBCallStack.getSFSBCreationTimeInjectedXPCs(puScopedName);
    // will look directly at the top level bean being created (registerExtendedPersistenceContext() registers xpc there).
    result = currentInjectedXPCs.findExtendedPersistenceContextDeepInheritance(puScopedName);

    if (result == null) {
      // walk up the BEAN call stack (this also covers the case of a bean method JNDI searching for another bean)
      for (Map<String, ExtendedEntityManager> handle : SFSBCallStack.currentSFSBCallStack()) {
        result = handle.get(puScopedName);
        if(result != null) {
          return result;
        }
      }
    }

    return result;

  }
}
org.jboss.as.jpa.containerSFSBCallStackcurrentSFSBCallStack

Javadoc

Return the current entity manager call stack

Popular methods of SFSBCallStack

  • beginSfsbCreation
    called from SFSBPreCreateInterceptor, before bean creation
  • currentSFSBCallStackInvocation
    return for just the current entity manager invocation
  • endSfsbCreation
    called from SFSBPreCreateInterceptor, after bean creation
  • getCurrentCall
    gets the current SFSB invocation off the invocation call stack
  • getSFSBCreationBeanNestingLevel
  • getSFSBCreationTimeInjectedXPCs
  • popCall
    Pops the current SFSB invocation off the invocation call stack
  • pushCall
    Push the passed SFSB context handle onto the invocation call stack

Popular in Java

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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