Package org.jboss.jpa.tx

Examples of org.jboss.jpa.tx.TransactionScopedEntityManager


         throw new IllegalArgumentException("Injection point represents a method which doesn't follow JavaBean conventions (must have exactly one parameter) " + injectionPoint);
      }
      try
      {
         String persistenceUnitName = injectionPoint.getAnnotated().getAnnotation(PersistenceContext.class).unitName();
         return new TransactionScopedEntityManager(lookupPersistenceUnitDeployment(persistenceUnitName).getManagedFactory());
      }
      catch (IllegalStateException e)
      {
         throw new IllegalStateException("Unable to resolve persistence context for " + injectionPoint);
      }
View Full Code Here


      managedFactory = new ManagedEntityManagerFactory(actualFactory, kernelName);

      String entityManagerJndiName = (String) props.get("jboss.entity.manager.jndi.name");
      if (entityManagerJndiName != null)
      {
         EntityManager injectedManager = new TransactionScopedEntityManager(managedFactory);
         NonSerializableFactory.rebind(initialContext, entityManagerJndiName, injectedManager, true);
      }
      String entityManagerFactoryJndiName = (String) props.get("jboss.entity.manager.factory.jndi.name");
      if (entityManagerFactoryJndiName != null)
      {
View Full Code Here

   }


   public EntityManager getEntityManager()
   {
      return new TransactionScopedEntityManager(managedFactory);
   }
View Full Code Here

      {
         Object entityManager;
         if (injectionType == null
                 || injectionType.getName().equals(EntityManager.class.getName()))
         {
            entityManager = new TransactionScopedEntityManager(factory);
         }
         else
         {
            TransactionScopedSessionInvocationHandler handler = new TransactionScopedSessionInvocationHandler(factory);
            entityManager = Proxy.newProxyInstance(
View Full Code Here

TOP

Related Classes of org.jboss.jpa.tx.TransactionScopedEntityManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.