Tabnine Logo
JBossJpaServices.getPersistenceUnitSupplier
Code IndexAdd Tabnine to your IDE (free)

How to use
getPersistenceUnitSupplier
method
in
org.jboss.weld.integration.persistence.JBossJpaServices

Best Java code snippets using org.jboss.weld.integration.persistence.JBossJpaServices.getPersistenceUnitSupplier (Showing top 4 results out of 315)

origin: org.jboss.jbossas/weld-int-ejb

private PersistenceUnitDeployment lookupPersistenceUnitDeployment(String unitName)
{
 if (unitName == null)
 {
   throw new IllegalArgumentException("unitName is null");
 }
 String beanName = getPersistenceUnitSupplier(topLevelDeploymentUnit, persistenceUnitDependencyResolver, unitName);
 if (beanName == null)
 {
   throw new IllegalStateException("No persistence unit available for " + unitName);
 }
 return jbossEjb.lookupPersistenceUnitDeployment(beanName);
}
origin: org.jboss.weld.integration/weld-jboss-int-jboss-ejb

private EntityManagerFactory resolvePersistenceUnit(String unitName)
{
 if (unitName == null)
 {
   throw new IllegalArgumentException("unitName is null");
 }
 String beanName = getPersistenceUnitSupplier(topLevelDeploymentUnit, persistenceUnitDependencyResolver, unitName);
 if (beanName == null)
 {
   throw new IllegalStateException("No persistence unit available for " + unitName);
 }
 PersistenceUnitDeployment deployment = jbossEjb.lookupPersistenceUnitDeployment(beanName);
 ManagedEntityManagerFactory managedFactory = deployment.getManagedFactory();
 return new InjectedEntityManagerFactory(managedFactory);
}
origin: org.jboss.weld.integration/weld-jboss-int-jboss-ejb

private static String getPersistenceUnitSupplier(DeploymentUnit deploymentUnit, PersistenceUnitDependencyResolver persistenceUnitDependencyResolver, String persistenceUnitName)
{
 if ((deploymentUnit.getAttachment(AttachmentNames.PROCESSED_METADATA, JBossMetaData.class) != null && deploymentUnit.getAttachment(JBossMetaData.class).isEJB3x()) || (deploymentUnit.getAttachment(JBossWebMetaData.class) != null))
 {
   try
   {
    return persistenceUnitDependencyResolver.resolvePersistenceUnitSupplier(deploymentUnit, persistenceUnitName);
   }
   catch (IllegalArgumentException e)
   {
    // No-op, means we can't find the PU in this DU
   }
 }
 for (DeploymentUnit child : deploymentUnit.getChildren())
 {
   String beanName = getPersistenceUnitSupplier(child, persistenceUnitDependencyResolver, persistenceUnitName);
   if (beanName != null)
   {
    return beanName;
   }
 }
 return null;
}
origin: org.jboss.jbossas/weld-int-ejb

  private static String getPersistenceUnitSupplier(DeploymentUnit deploymentUnit, PersistenceUnitDependencyResolver persistenceUnitDependencyResolver, String persistenceUnitName)
  {
   if ((deploymentUnit.getAttachment(AttachmentNames.PROCESSED_METADATA, JBossMetaData.class) != null && deploymentUnit.getAttachment(JBossMetaData.class).isEJB3x()) || (deploymentUnit.getAttachment(JBossWebMetaData.class) != null))
   {
     try
     {
      return persistenceUnitDependencyResolver.resolvePersistenceUnitSupplier(deploymentUnit, persistenceUnitName);
     }
     catch (IllegalArgumentException e)
     {
      // No-op, means we can't find the PU in this DU
     }
   }
   for (DeploymentUnit child : deploymentUnit.getChildren())
   {
     String beanName = getPersistenceUnitSupplier(child, persistenceUnitDependencyResolver, persistenceUnitName);
     if (beanName != null)
     {
      return beanName;
     }
   }
   return null;
  }
}
org.jboss.weld.integration.persistenceJBossJpaServicesgetPersistenceUnitSupplier

Popular methods of JBossJpaServices

  • resolvePersistenceUnit
  • lookupPersistenceUnitDeployment

Popular in Java

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Runner (org.openjdk.jmh.runner)
  • 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