Package org.jboss.shrinkwrap.descriptor.api.persistence20

Examples of org.jboss.shrinkwrap.descriptor.api.persistence20.PersistenceDescriptor


      final FileResource<?> configFile = getConfigFile();
      if (!configFile.exists())
      {
         createDefaultConfig(configFile);
      }
      PersistenceDescriptor descriptor = importer.fromStream(configFile.getResourceInputStream());
      return descriptor;
   }
View Full Code Here


   }

   @Override
   protected void createDefaultConfig(FileResource<?> descriptor)
   {
      PersistenceDescriptor descriptorContents = Descriptors.create(PersistenceDescriptor.class)
               .version("2.0");
      descriptor.setContents(descriptorContents.exportAsString());
   }
View Full Code Here

    @ArquillianResource
    private URL url;

    @Deployment(testable = false)
    public static WebArchive getArchive() {
        PersistenceDescriptor persistenceDescriptor = Descriptors.create(PersistenceDescriptor.class)
                .createPersistenceUnit()
                    .name("test-pu")
                    .transactionType("JTA")
                    .clazz(PersistenceDescriptor.class.getName())
                    .jtaDataSource("test-ds")
                .up();


        Asset persistenceAsset = new StringAsset(persistenceDescriptor.exportAsString());
        return base("jsf-jpa-test.war").addAsWebInfResource(persistenceAsset, "persistence.xml")
                .addPackage(JPAInjectionTest.class.getPackage())
                .addAsWebResource(new ClassLoaderAsset(
                        JPAInjectionTest.class.getPackage().getName().replace('.', '/').concat("/").concat("dummy.xhtml")), "dummy.xhtml");
View Full Code Here

      final FileResource<?> configFile = getConfigFile();
      if (!configFile.exists())
      {
         createDefaultConfig(configFile);
      }
      PersistenceDescriptor descriptor = importer.fromStream(configFile.getResourceInputStream());
      return descriptor;
   }
View Full Code Here

   }

   @Override
   protected void createDefaultConfig(FileResource<?> descriptor)
   {
      PersistenceDescriptor descriptorContents = Descriptors.create(PersistenceDescriptor.class)
               .version("2.1");
      descriptor.setContents(descriptorContents.exportAsString());
   }
View Full Code Here

      final FileResource<?> configFile = getConfigFile();
      if (!configFile.exists())
      {
         createDefaultConfig(configFile);
      }
      PersistenceDescriptor descriptor = importer.fromStream(configFile.getResourceInputStream());
      return descriptor;
   }
View Full Code Here

   }

   @Override
   protected void createDefaultConfig(FileResource<?> descriptor)
   {
      PersistenceDescriptor descriptorContents = Descriptors.create(PersistenceDescriptor.class)
               .version("2.1");
      descriptor.setContents(descriptorContents.exportAsString());
   }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.descriptor.api.persistence20.PersistenceDescriptor

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.