Examples of PersistenceUnitDeployment


Examples of org.jboss.jpa.deployment.PersistenceUnitDeployment

         String name = persistenceUnitDependencyResolver.createBeanName(unit, metaData.getName());
        
         InitialContext initialContext = new InitialContext();
         List<String> explicitEntityClasses = new ArrayList<String>();
         VFSDeploymentUnit deploymentUnit = (VFSDeploymentUnit) unit.getParent();
         PersistenceUnitDeployment pu = new PersistenceUnitDeployment(initialContext, null, explicitEntityClasses, metaData, name, deploymentUnit, defaultPersistenceProperties);
        
         AbstractBeanMetaData beanMetaData = new AbstractBeanMetaData(name, PersistenceUnitDeployment.class.getName());
         BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(beanMetaData);
         builder.setConstructorValue(pu);
         addDependencies(builder, metaData);
View Full Code Here

Examples of org.jboss.jpa.deployment.PersistenceUnitDeployment

*/
public class ManagedEntityManagerFactoryHelper
{
   public static ManagedEntityManagerFactory getManagedEntityManagerFactory(String kernelName)
   {
      PersistenceUnitDeployment pu = (PersistenceUnitDeployment) PersistenceUnitRegistry.getPersistenceUnit(kernelName);
      if(pu != null)
         return pu.getManagedFactory();
      // Legacy
      org.jboss.ejb3.entity.PersistenceUnitDeployment oldPu = org.jboss.ejb3.PersistenceUnitRegistry.getPersistenceUnit(kernelName);
      if(oldPu != null)
         return oldPu.getManagedFactory();
      return null;
View Full Code Here

Examples of org.jboss.jpa.deployment.PersistenceUnitDeployment

      if(!(c instanceof ExtendedInjectionContainer))
         throw new UnsupportedOperationException("RemotePuEncInjector only works for ExtendedInjectionContainer");
      ExtendedInjectionContainer container = (ExtendedInjectionContainer) c;
     
      String name = container.resolvePersistenceUnitSupplier(unitName);
      PersistenceUnitDeployment deployment = ((PersistenceUnitDeployment) PersistenceUnitRegistry.getPersistenceUnit(name));
      RemotelyInjectEntityManagerFactory factory = new RemotelyInjectEntityManagerFactory(deployment.getXml(), "FIXME");
     
      try
      {
         Util.rebind(container.getEnc(), encName, factory);
      }
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.