Package org.jboss.shrinkwrap.descriptor.api.spec.jpa.persistence

Examples of org.jboss.shrinkwrap.descriptor.api.spec.jpa.persistence.PersistenceUnitDef


   {
      installPersistence();
      PersistenceFacet jpa = project.getFacet(PersistenceFacet.class);
      PersistenceDescriptor config = jpa.getConfig();

      PersistenceUnitDef unit = config.persistenceUnit(unitName);

      unit.name(unitName).description(DEFAULT_UNIT_DESC);

      PersistenceContainer container = jpac.getContainer(manager);
      PersistenceProvider provider = jpap.getProvider(manager);

      JPADataSource ds = new JPADataSource()
               .setJndiDataSource(jtaDataSource)
               .setDatabaseType(databaseType)
               .setJdbcDriver(jdbcDriver)
               .setDatabaseURL(jdbcURL)
               .setUsername(jdbcUsername)
               .setPassword(jdbcPassword)
               .setContainer(container)
               .setProvider(provider);

      unit.transactionType(container.getTransactionType());
      unit.provider(provider.getProvider());
      container.setupConnection(unit, ds);
      provider.configure(unit, ds);

      jpa.saveConfig(config);
View Full Code Here


   {
      installPersistence();
      PersistenceFacet jpa = project.getFacet(PersistenceFacet.class);
      PersistenceDescriptor config = jpa.getConfig();

      PersistenceUnitDef unit = config.persistenceUnit(unitName);

      unit.name(unitName).description(DEFAULT_UNIT_DESC);

      PersistenceContainer container = jpac.getContainer(manager);
      PersistenceProvider provider = jpap.getProvider(manager);

      JPADataSource ds = new JPADataSource()
               .setJndiDataSource(jtaDataSource)
               .setDatabaseType(databaseType)
               .setJdbcDriver(jdbcDriver)
               .setDatabaseURL(jdbcURL)
               .setUsername(jdbcUsername)
               .setPassword(jdbcPassword)
               .setContainer(container)
               .setProvider(provider);

      unit.transactionType(container.getTransactionType());
      unit.provider(provider.getProvider());
      container.setupConnection(unit, ds);
      provider.configure(unit, ds);

      jpa.saveConfig(config);
View Full Code Here

   {
      installPersistence();
      PersistenceFacet jpa = project.getFacet(PersistenceFacet.class);
      PersistenceDescriptor config = jpa.getConfig();

      PersistenceUnitDef unit = config.persistenceUnit(unitName);

      unit.name(unitName).description(DEFAULT_UNIT_DESC);

      PersistenceContainer container = jpac.getContainer(manager);
      PersistenceProvider provider = jpap.getProvider(manager);

      JPADataSource ds = new JPADataSource()
               .setJndiDataSource(jtaDataSource)
               .setDatabaseType(databaseType)
               .setJdbcDriver(jdbcDriver)
               .setDatabaseURL(jdbcURL)
               .setUsername(jdbcUsername)
               .setPassword(jdbcPassword)
               .setContainer(container)
               .setProvider(provider);

      unit.transactionType(container.getTransactionType());
      unit.provider(provider.getProvider());
      container.setupConnection(unit, ds);
      provider.configure(unit, ds);

      jpa.saveConfig(config);
View Full Code Here

   {
      installPersistence();
      PersistenceFacet jpa = project.getFacet(PersistenceFacet.class);
      PersistenceDescriptor config = jpa.getConfig();

      PersistenceUnitDef unit = config.persistenceUnit(unitName);

      unit.name(unitName).description(DEFAULT_UNIT_DESC);

      PersistenceContainer container = jpac.getContainer(manager);
      PersistenceProvider provider = jpap.getProvider(manager);

      JPADataSource ds = new JPADataSource()
               .setJndiDataSource(jtaDataSource)
               .setDatabaseType(databaseType)
               .setJdbcDriver(jdbcDriver)
               .setDatabaseURL(jdbcURL)
               .setUsername(jdbcUsername)
               .setPassword(jdbcPassword)
               .setContainer(container)
               .setProvider(provider);

      unit.transactionType(container.getTransactionType());
      unit.provider(provider.getProvider());
      container.setupConnection(unit, ds);
      provider.configure(unit, ds);

      jpa.saveConfig(config);
View Full Code Here

   {
      installPersistence();
      PersistenceFacet jpa = project.getFacet(PersistenceFacet.class);
      PersistenceDescriptor config = jpa.getConfig();

      PersistenceUnitDef unit = config.persistenceUnit(unitName);

      unit.name(unitName).description(DEFAULT_UNIT_DESC);

      PersistenceContainer container = jpac.getContainer(manager);
      PersistenceProvider provider = jpap.getProvider(manager);

      JPADataSource ds = new JPADataSource()
               .setJndiDataSource(jtaDataSource)
               .setDatabaseType(databaseType)
               .setJdbcDriver(jdbcDriver)
               .setDatabaseURL(jdbcURL)
               .setUsername(jdbcUsername)
               .setPassword(jdbcPassword)
               .setContainer(container)
               .setProvider(provider);

      unit.transactionType(container.getTransactionType());
      unit.provider(provider.getProvider());
      container.setupConnection(unit, ds);
      provider.configure(unit, ds);

      jpa.saveConfig(config);
View Full Code Here

   {
      installPersistence();
      PersistenceFacet jpa = project.getFacet(PersistenceFacet.class);
      PersistenceDescriptor config = jpa.getConfig();

      PersistenceUnitDef unit = config.persistenceUnit(unitName);

      unit.name(unitName).description(DEFAULT_UNIT_DESC);

      JPADataSource ds = new JPADataSource()
               .setJndiDataSource(jtaDataSource)
               .setDatabaseType(databaseType)
               .setJdbcDriver(jdbcDriver)
               .setDatabaseURL(jdbcURL)
               .setUsername(jdbcUsername)
               .setPassword(jdbcPassword);

      PersistenceContainer container = jpac.getContainer(manager);
      PersistenceProvider provider = jpap.getProvider(manager);

      unit.provider(provider.getProvider());
      container.setupConnection(unit, ds);
      provider.configure(unit, ds);

      jpa.saveConfig(config);
View Full Code Here

   {
      installPersistence();
      PersistenceFacet jpa = project.getFacet(PersistenceFacet.class);
      PersistenceDescriptor config = jpa.getConfig();

      PersistenceUnitDef unit = config.persistenceUnit(unitName);

      unit.name(unitName).description(DEFAULT_UNIT_DESC);

      PersistenceContainer container = jpac.getContainer(manager);
      PersistenceProvider provider = jpap.getProvider(manager);

      JPADataSource ds = new JPADataSource()
               .setJndiDataSource(jtaDataSource)
               .setDatabaseType(databaseType)
               .setJdbcDriver(jdbcDriver)
               .setDatabaseURL(jdbcURL)
               .setUsername(jdbcUsername)
               .setPassword(jdbcPassword)
               .setContainer(container)
               .setProvider(provider);

      unit.transactionType(container.getTransactionType());
      unit.provider(provider.getProvider());
      container.setupConnection(unit, ds);
      provider.configure(unit, ds);

      jpa.saveConfig(config);
View Full Code Here

   {
      installPersistence();
      PersistenceFacet jpa = project.getFacet(PersistenceFacet.class);
      PersistenceDescriptor config = jpa.getConfig();

      PersistenceUnitDef unit = config.persistenceUnit(unitName);

      unit.name(unitName).description(DEFAULT_UNIT_DESC);

      PersistenceContainer container = jpac.getContainer(manager);
      PersistenceProvider provider = jpap.getProvider(manager);

      JPADataSource ds = new JPADataSource()
               .setJndiDataSource(jtaDataSource)
               .setDatabaseType(databaseType)
               .setJdbcDriver(jdbcDriver)
               .setDatabaseURL(jdbcURL)
               .setUsername(jdbcUsername)
               .setPassword(jdbcPassword)
               .setContainer(container)
               .setProvider(provider);

      unit.transactionType(container.getTransactionType());
      unit.provider(provider.getProvider());
      container.setupConnection(unit, ds);
      provider.configure(unit, ds);

      jpa.saveConfig(config);
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.descriptor.api.spec.jpa.persistence.PersistenceUnitDef

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.