Package org.jboss.as.jpa.container

Examples of org.jboss.as.jpa.container.TransactionScopedEntityManager


            EntityManagerFactory emf = service.getEntityManagerFactory();
            EntityManager entityManager;
            boolean isExtended;
            if (type.equals(PersistenceContextType.TRANSACTION)) {
                isExtended = false;
                entityManager = new TransactionScopedEntityManager(unitName, properties, emf, sfsbxpcMap);
                if (log.isDebugEnabled())
                    log.debug("created new TransactionScopedEntityManager for unit name=" + unitName);
            } else {
                // handle PersistenceContextType.EXTENDED
                isExtended = true;
View Full Code Here


        final ServiceController<?> serviceController = serviceRegistry.getRequiredService(persistenceUnitServiceName);
        //now we have the service controller, as this method is only called at runtime the service should
        //always be up
        PersistenceUnitService persistenceUnitService = (PersistenceUnitService)serviceController.getValue();
        return new TransactionScopedEntityManager(scopedPuName,new HashMap<Object,Object>(), persistenceUnitService.getEntityManagerFactory(), sfsbxpcMap);
    }
View Full Code Here

        final ServiceController<?> serviceController = serviceRegistry.getRequiredService(persistenceUnitServiceName);
        //now we have the service controller, as this method is only called at runtime the service should
        //always be up
        PersistenceUnitService persistenceUnitService = (PersistenceUnitService)serviceController.getValue();
        return new TransactionScopedEntityManager(scopedPuName,new HashMap<Object,Object>(), persistenceUnitService.getEntityManagerFactory());
    }
View Full Code Here

        @Override
        public ManagedReference getReference() {
            PersistenceUnitService service = (PersistenceUnitService)deploymentUnit.getServiceRegistry().getRequiredService(puServiceName).getValue();
            EntityManagerFactory emf = service.getEntityManagerFactory();
            if (type.equals(PersistenceContextType.TRANSACTION)) {
                return new ValueManagedReference(new ImmediateValue<Object>(new TransactionScopedEntityManager(unitName, properties, emf)));
            }
            else {
                // TODO: handle XPC search/inherit/create
                return new ValueManagedReference(new ImmediateValue<Object>(new ExtendedEntityManager(null)));
            }
View Full Code Here

            EntityManagerFactory emf = service.getEntityManagerFactory();
            EntityManager entityManager;
            boolean isExtended;
            if (type.equals(PersistenceContextType.TRANSACTION)) {
                isExtended = false;
                entityManager = new TransactionScopedEntityManager(unitName, properties, emf);
                if (log.isDebugEnabled())
                    log.debug("created new TransactionScopedEntityManager for unit name=" + unitName);
            }
            else {
                // handle PersistenceContextType.EXTENDED
View Full Code Here

            PersistenceUnitService service = (PersistenceUnitService)deploymentUnit.getServiceRegistry().getRequiredService(puServiceName).getValue();
            EntityManagerFactory emf = service.getEntityManagerFactory();
            EntityManager entityManager;

            if (type.equals(PersistenceContextType.TRANSACTION)) {
                entityManager = new TransactionScopedEntityManager(unitName, properties, emf);
                if (log.isDebugEnabled())
                    log.debug("created new TransactionScopedEntityManager for unit name=" + unitName);
            }
            else {
                // handle PersistenceContextType.EXTENDED
View Full Code Here

        final ServiceController<?> serviceController = serviceRegistry.getRequiredService(persistenceUnitServiceName);
        //now we have the service controller, as this method is only called at runtime the service should
        //always be up
        PersistenceUnitServiceImpl persistenceUnitService = (PersistenceUnitServiceImpl) serviceController.getValue();
        return new TransactionScopedEntityManager(scopedPuName, new HashMap<Object, Object>(), persistenceUnitService.getEntityManagerFactory());
    }
View Full Code Here

            EntityManagerFactory emf = service.getEntityManagerFactory();
            EntityManager entityManager;
            boolean isExtended;
            if (type.equals(PersistenceContextType.TRANSACTION)) {
                isExtended = false;
                entityManager = new TransactionScopedEntityManager(unitName, properties, emf, sfsbxpcMap);
                if (log.isDebugEnabled())
                    log.debug("created new TransactionScopedEntityManager for unit name=" + unitName);
            } else {
                // handle PersistenceContextType.EXTENDED
                isExtended = true;
View Full Code Here

TOP

Related Classes of org.jboss.as.jpa.container.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.