Examples of PersistenceUnitDeployment


Examples of org.jboss.ejb3.entity.PersistenceUnitDeployment

            // deployments are segregated
            String jarName = isScoped ? unit.getShortName() : null;
            cache_prefix = SecondLevelCacheUtil.createCacheRegionPrefix(earShortName, jarName, metaData.getName());
            properties.put(SecondLevelCacheUtil.HIBERNATE_CACHE_REGION_PREFIX, cache_prefix);
         }
         PersistenceUnitDeployment deployment = new PersistenceUnitDeployment(initialContext, this, explicitEntityClasses, metaData, earShortName, unit.getShortName(), isScoped);
         PersistenceUnitRegistry.register(deployment);
         persistenceUnitDeployments.add(deployment);
      }
   }
View Full Code Here

Examples of org.jboss.ejb3.entity.PersistenceUnitDeployment

         String dependency = eic.resolvePersistenceUnitSupplier(unitName);
         container.getDependencyPolicy().addDependency(dependency);
         return;
      }
      log.warn("Container " + container + " does not implement ExtendedInjectionContainer, doing old style PersistenceUnit resolving");
      PersistenceUnitDeployment deployment = null;
      // look in EAR first
      deployment = container.getPersistenceUnitDeployment(unitName);
      if (deployment != null)
      {
         container.getDependencyPolicy().addDependency(deployment.getKernelName());
         log.debug("***** adding PU dependency from located persistence unit: " + deployment.getKernelName());
         return;
      }
      // probably not deployed yet.
      // todo not sure if we should do this in JBoss 5
      log.warn("Could not find PU dependency for " + PersistenceUnitDeployment.getDefaultKernelName(unitName) + ". Waiting for dependency to resolve");
View Full Code Here

Examples of org.jboss.ejb3.entity.PersistenceUnitDeployment

         ExtendedInjectionContainer eic = (ExtendedInjectionContainer) container;
         String beanName = eic.resolvePersistenceUnitSupplier(unitName);
         return ((org.jboss.jpa.deployment.PersistenceUnitDeployment) PersistenceUnitRegistry.getPersistenceUnit(beanName)).getManagedFactory();
      }
      log.warn("Container " + container + " does not implement ExtendedInjectionContainer");
      PersistenceUnitDeployment deployment = container.getPersistenceUnitDeployment(unitName);
      if (deployment != null)
      {
         return deployment.getManagedFactory();
      }
      else
      {
         throw new NameNotFoundException("Unable to find persistence unit: " + unitName + " for deployment: " + container.getIdentifier());
      }
View Full Code Here

Examples of org.jboss.ejb3.entity.PersistenceUnitDeployment

         String beanName = eic.resolvePersistenceUnitSupplier(unitName);
         ManagedEntityManagerFactory managedFactory = ((org.jboss.jpa.deployment.PersistenceUnitDeployment) PersistenceUnitRegistry.getPersistenceUnit(beanName)).getManagedFactory();
         return new InjectedEntityManagerFactory(managedFactory);
      }
      log.warn("Container " + container + " does not implement ExtendedInjectionContainer");
      PersistenceUnitDeployment deployment = container.getPersistenceUnitDeployment(unitName);
      if (deployment != null)
      {
         ManagedEntityManagerFactory managedFactory = deployment.getManagedFactory();
         return new InjectedEntityManagerFactory(managedFactory);
      }
      else
      {
         return null;
View Full Code Here

Examples of org.jboss.ejb3.entity.PersistenceUnitDeployment

         String beanName = eic.resolvePersistenceUnitSupplier(ref);
         ManagedEntityManagerFactory managedFactory = ((org.jboss.jpa.deployment.PersistenceUnitDeployment) PersistenceUnitRegistry.getPersistenceUnit(beanName)).getManagedFactory();
         return new InjectedSessionFactory(managedFactory);
      }
      log.warn("Container " + container + " does not implement ExtendedInjectionContainer");
      PersistenceUnitDeployment deployment = container.getPersistenceUnitDeployment(ref);
      if (deployment != null)
      {
         ManagedEntityManagerFactory managedFactory = deployment.getManagedFactory();
         return new InjectedSessionFactory(managedFactory);
      }
      else
      {
         return null;
View Full Code Here

Examples of org.jboss.ejb3.entity.PersistenceUnitDeployment

            // deployments are segregated
            String jarName = isScoped ? unit.getShortName() : null;
            cache_prefix = SecondLevelCacheUtil.createCacheRegionPrefix(earShortName, jarName, metaData.getName());
            properties.put(SecondLevelCacheUtil.HIBERNATE_CACHE_REGION_PREFIX, cache_prefix);
         }
         PersistenceUnitDeployment deployment = new PersistenceUnitDeployment(initialContext, this, explicitEntityClasses, metaData, earShortName, unit.getShortName(), isScoped);
         PersistenceUnitRegistry.register(deployment);
         persistenceUnitDeployments.add(deployment);
      }
   }
View Full Code Here

Examples of org.jboss.ejb3.entity.PersistenceUnitDeployment

            // deployments are segregated
            String jarName = isScoped ? unit.getShortName() : null;
            cache_prefix = SecondLevelCacheUtil.createCacheRegionPrefix(earShortName, jarName, metaData.getName());
            properties.put(SecondLevelCacheUtil.HIBERNATE_CACHE_REGION_PREFIX, cache_prefix);
         }
         PersistenceUnitDeployment deployment = new PersistenceUnitDeployment(initialContext, this, explicitEntityClasses, metaData, earShortName, unit.getShortName(), isScoped);
         PersistenceUnitRegistry.register(deployment);
         persistenceUnitDeployments.add(deployment);
      }
   }
View Full Code Here

Examples of org.jboss.ejb3.entity.PersistenceUnitDeployment

         String dependency = eic.resolvePersistenceUnitSupplier(unitName);
         container.getDependencyPolicy().addDependency(dependency);
         return;
      }
      log.warn("Container " + container + " does not implement ExtendedInjectionContainer, doing old style PersistenceUnit resolving");
      PersistenceUnitDeployment deployment = null;
      // look in EAR first
      deployment = container.getPersistenceUnitDeployment(unitName);
      if (deployment != null)
      {
         container.getDependencyPolicy().addDependency(deployment.getKernelName());
         log.debug("***** adding PU dependency from located persistence unit: " + deployment.getKernelName());
         return;
      }
      // probably not deployed yet.
      // todo not sure if we should do this in JBoss 5
      log.warn("Could not find PU dependency for " + PersistenceUnitDeployment.getDefaultKernelName(unitName) + ". Waiting for dependency to resolve");
View Full Code Here

Examples of org.jboss.ejb3.entity.PersistenceUnitDeployment

         ExtendedInjectionContainer eic = (ExtendedInjectionContainer) container;
         String beanName = eic.resolvePersistenceUnitSupplier(unitName);
         return ((org.jboss.jpa.deployment.PersistenceUnitDeployment) PersistenceUnitRegistry.getPersistenceUnit(beanName)).getManagedFactory();
      }
      log.warn("Container " + container + " does not implement ExtendedInjectionContainer");
      PersistenceUnitDeployment deployment = container.getPersistenceUnitDeployment(unitName);
      if (deployment != null)
      {
         return deployment.getManagedFactory();
      }
      else
      {
         throw new NameNotFoundException("Unable to find persistence unit: " + unitName + " for deployment: " + container.getIdentifier());
      }
View Full Code Here

Examples of org.jboss.ejb3.entity.PersistenceUnitDeployment

         String beanName = eic.resolvePersistenceUnitSupplier(unitName);
         ManagedEntityManagerFactory managedFactory = ((org.jboss.jpa.deployment.PersistenceUnitDeployment) PersistenceUnitRegistry.getPersistenceUnit(beanName)).getManagedFactory();
         return new InjectedEntityManagerFactory(managedFactory);
      }
      log.warn("Container " + container + " does not implement ExtendedInjectionContainer");
      PersistenceUnitDeployment deployment = container.getPersistenceUnitDeployment(unitName);
      if (deployment != null)
      {
         ManagedEntityManagerFactory managedFactory = deployment.getManagedFactory();
         return new InjectedEntityManagerFactory(managedFactory);
      }
      else
      {
         return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.