Tabnine Logo
ExtendedEntityManager.getScopedPuName
Code IndexAdd Tabnine to your IDE (free)

How to use
getScopedPuName
method
in
org.jboss.as.jpa.container.ExtendedEntityManager

Best Java code snippets using org.jboss.as.jpa.container.ExtendedEntityManager.getScopedPuName (Showing top 4 results out of 315)

origin: org.jboss.eap/wildfly-jpa

public synchronized void refCountedClose() {
  referenceCount--;
  if (referenceCount == 0) {
    if (underlyingEntityManager.isOpen()) {
      underlyingEntityManager.close();
      if (isTraceEnabled) {
        ROOT_LOGGER.tracef("closed extended persistence context (%s)", puScopedName);
      }
    }
  }
  else if (isTraceEnabled) {
    ROOT_LOGGER.tracef("decremented extended persistence context (%s) owner count to %d",
        puScopedName, referenceCount);
  }
  // referenceCount should never be negative, if it is we need to fix the bug that caused it to decrement too much
  if (referenceCount < 0) {
    throw JpaLogger.ROOT_LOGGER.referenceCountedEntityManagerNegativeCount(referenceCount, getScopedPuName());
  }
}
origin: org.wildfly/wildfly-jpa

public synchronized void refCountedClose() {
  referenceCount--;
  if (referenceCount == 0) {
    if (underlyingEntityManager.isOpen()) {
      underlyingEntityManager.close();
      if (isTraceEnabled) {
        ROOT_LOGGER.tracef("closed extended persistence context (%s)", puScopedName);
      }
    }
  }
  else if (isTraceEnabled) {
    ROOT_LOGGER.tracef("decremented extended persistence context (%s) owner count to %d",
        puScopedName, referenceCount);
  }
  // referenceCount should never be negative, if it is we need to fix the bug that caused it to decrement too much
  if (referenceCount < 0) {
    throw JpaLogger.ROOT_LOGGER.referenceCountedEntityManagerNegativeCount(referenceCount, getScopedPuName());
  }
}
origin: org.wildfly/wildfly-jpa

  @Override
  public Object processInvocation(InterceptorContext interceptorContext) throws Exception {
    ComponentInstance componentInstance = interceptorContext.getPrivateData(ComponentInstance.class);
    Map<String, ExtendedEntityManager> entityManagers = null;
    if(componentInstance.getInstanceData(SFSBInvocationInterceptor.CONTEXT_KEY) == null) {
      // Get all of the extended persistence contexts in use by the bean (some of which may of been inherited from
      // other beans).
      entityManagers = new HashMap<String, ExtendedEntityManager>();
      componentInstance.setInstanceData(SFSBInvocationInterceptor.CONTEXT_KEY, new ImmediateManagedReference(entityManagers));
    } else {
      ManagedReference entityManagerRef = (ManagedReference) componentInstance.getInstanceData(SFSBInvocationInterceptor.CONTEXT_KEY);
      entityManagers = (Map<String, ExtendedEntityManager>)entityManagerRef.getInstance();
    }
    final ExtendedEntityManager[] ems = CreatedEntityManagers.getDeferredEntityManagers();
    for (ExtendedEntityManager e : ems) {
      entityManagers.put(e.getScopedPuName(), e);
    }
    return interceptorContext.proceed();
  }
}
origin: org.jboss.eap/wildfly-jpa

  @Override
  public Object processInvocation(InterceptorContext interceptorContext) throws Exception {
    ComponentInstance componentInstance = interceptorContext.getPrivateData(ComponentInstance.class);
    Map<String, ExtendedEntityManager> entityManagers = null;
    if(componentInstance.getInstanceData(SFSBInvocationInterceptor.CONTEXT_KEY) == null) {
      // Get all of the extended persistence contexts in use by the bean (some of which may of been inherited from
      // other beans).
      entityManagers = new HashMap<String, ExtendedEntityManager>();
      componentInstance.setInstanceData(SFSBInvocationInterceptor.CONTEXT_KEY, new ImmediateManagedReference(entityManagers));
    } else {
      ManagedReference entityManagerRef = (ManagedReference) componentInstance.getInstanceData(SFSBInvocationInterceptor.CONTEXT_KEY);
      entityManagers = (Map<String, ExtendedEntityManager>)entityManagerRef.getInstance();
    }
    final ExtendedEntityManager[] ems = CreatedEntityManagers.getDeferredEntityManagers();
    for (ExtendedEntityManager e : ems) {
      entityManagers.put(e.getScopedPuName(), e);
    }
    return interceptorContext.proceed();
  }
}
org.jboss.as.jpa.containerExtendedEntityManagergetScopedPuName

Javadoc

Get the fully application scoped persistence unit name Private api

Popular methods of ExtendedEntityManager

  • <init>
  • getReferenceCount
  • increaseReferenceCount
    Start of reference count handling. synchronize on *this* to protect access to the referenceCount (sh
  • internalAssociateWithJtaTx
    Associate the extended persistence context with the current JTA transaction (if one is found) this m
  • refCountedClose

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSupportFragmentManager (FragmentActivity)
  • getSystemService (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • 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