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

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

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

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

public EntityManager resolvePersistenceContext(InjectionPoint injectionPoint)
{
 if (!injectionPoint.getAnnotated().isAnnotationPresent(PersistenceContext.class))
 {
   throw new IllegalArgumentException("No @PersistenceContext annotation found on injection point " + injectionPoint);
 }
 if (injectionPoint.getMember() instanceof Method && ((Method) injectionPoint.getMember()).getParameterTypes().length != 1)
 {
   throw new IllegalArgumentException("Injection point represents a method which doesn't follow JavaBean conventions (must have exactly one parameter) " + injectionPoint);
 }
 try
 {
   return resolvePersistenceUnit((injectionPoint.getAnnotated().getAnnotation(PersistenceContext.class).unitName())).createEntityManager();
 }
 catch (IllegalStateException e)
 {
   throw new IllegalStateException("Unable to resolve persistence context for " + injectionPoint);
 }
}
origin: org.jboss.jbossas/weld-int-ejb

public EntityManagerFactory resolvePersistenceUnit(InjectionPoint injectionPoint)
{
 if (!injectionPoint.getAnnotated().isAnnotationPresent(PersistenceUnit.class))
 {
   throw new IllegalArgumentException("No @PersistenceUnit annotation found on injection point " + injectionPoint);
 }
 if (injectionPoint.getMember() instanceof Method && ((Method) injectionPoint.getMember()).getParameterTypes().length != 1)
 {
   throw new IllegalArgumentException("Injection point represents a method which doesn't follow JavaBean conventions (must have exactly one parameter) " + injectionPoint);
 }
 try
 {
   return resolvePersistenceUnit((injectionPoint.getAnnotated().getAnnotation(PersistenceUnit.class).unitName()));
 }
 catch (IllegalStateException e)
 {
   throw new IllegalStateException("Unable to resolve persistence context for " + injectionPoint);
 }
}
origin: org.jboss.weld.integration/weld-jboss-int-jboss-ejb

public EntityManagerFactory resolvePersistenceUnit(InjectionPoint injectionPoint)
{
 if (!injectionPoint.getAnnotated().isAnnotationPresent(PersistenceUnit.class))
 {
   throw new IllegalArgumentException("No @PersistenceUnit annotation found on injection point " + injectionPoint);
 }
 if (injectionPoint.getMember() instanceof Method && ((Method) injectionPoint.getMember()).getParameterTypes().length != 1)
 {
   throw new IllegalArgumentException("Injection point represents a method which doesn't follow JavaBean conventions (must have exactly one parameter) " + injectionPoint);
 }
 try
 {
   return resolvePersistenceUnit((injectionPoint.getAnnotated().getAnnotation(PersistenceUnit.class).unitName()));
 }
 catch (IllegalStateException e)
 {
   throw new IllegalStateException("Unable to resolve persistence context for " + injectionPoint);
 }
}
org.jboss.weld.integration.persistenceJBossJpaServicesresolvePersistenceUnit

Popular methods of JBossJpaServices

  • getPersistenceUnitSupplier
  • lookupPersistenceUnitDeployment

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best plugins for Eclipse
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