Examples of buildSessionFactory()


Examples of cirrus.hibernate.Datastore.buildSessionFactory()

            props.load( in );

            /* Session Factory */
            __logger.info( "...initializing the Hibernate SessionFactory" );

            SessionFactory sessionFactory = ds.buildSessionFactory( props );
            config.getServletContext(  ).setAttribute( SESSION_FACTORY_KEY, sessionFactory );

            __logger.info( "Initialized" );
        }
        catch ( HibernateException h )
View Full Code Here

Examples of com.dotcms.repackage.net.sf.hibernate.cfg.Configuration.buildSessionFactory()

      }

      cfg.setInterceptor(new NoDirtyFlushInterceptor());

      mappings = cfg.createMappings();
      sessionFactory = cfg.buildSessionFactory();
      dialect = cfg.getProperty("hibernate.dialect");

    }catch (Exception e) {
      throw new DotHibernateException("Unable to build Session Factory ", e);
    }
View Full Code Here

Examples of net.sf.hibernate.cfg.Configuration.buildSessionFactory()

        return _myInstance;
    }

    private WorklistDBConnector() throws HibernateException {
        Configuration cfg = new Configuration();
        _factory = cfg.buildSessionFactory();
    }


    /**
     * Executes a query over the organisation model of the YAWL system.
View Full Code Here

Examples of net.sf.hibernate.cfg.Configuration.buildSessionFactory()

                cfg.addClass(au.edu.qut.yawl.admintool.model.OrgGroup.class);
                cfg.addClass(au.edu.qut.yawl.admintool.model.Position.class);
                cfg.addClass(au.edu.qut.yawl.admintool.model.HResOccupiesPosition.class);
                cfg.addClass(au.edu.qut.yawl.exceptions.Problem.class);

                factory = cfg.buildSessionFactory();

                Logger.getLogger(loggerName).debug("Validating existance of database for persistence");

                boolean createtables = false;
View Full Code Here

Examples of org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory()

                    cfg.addAnnotatedClass(clazz);
                }
            }
        });

        final SessionFactory sessionFactory = cfg.buildSessionFactory();

        Provider<Session> sessionProvider = new Provider<Session>() {
            public Session get() {
                return sessionFactory.openSession();
            }
View Full Code Here

Examples of org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory()

            }
        }

        long configurationComplete = System.currentTimeMillis();

        _sessionFactory = configuration.buildSessionFactory();

        long factoryCreated = System.currentTimeMillis();

        log.info(HibernateMessages.startupTiming(configurationComplete - startTime, factoryCreated
                - startTime));
View Full Code Here

Examples of org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory()

  public void testTypeDefWithoutNameAndDefaultForTypeAttributes() {
   
    try {
      AnnotationConfiguration config = new AnnotationConfiguration();
      config.addAnnotatedClass(LocalContactDetails.class);
      config.buildSessionFactory();
      fail("Did not throw expected exception");
    }
    catch( AnnotationException ex ) {
      assertEquals(
          "Either name or defaultForType (or both) attribute should be set in TypeDef having typeClass org.hibernate.test.annotations.entity.PhoneNumberType",
View Full Code Here

Examples of org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory()

    try {
      AnnotationConfiguration config = new AnnotationConfiguration();
      config.addAnnotatedClass(Bunny.class);
      config.addAnnotatedClass(PointyTooth.class);
      config.addAnnotatedClass(TwinkleToes.class);
      config.buildSessionFactory();
      String[] schema = config
          .generateSchemaCreationScript(new SQLServerDialect());
      for (String s : schema) {
        log.debug(s);
      }
View Full Code Here

Examples of org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory()

    }
    for ( String configFile : configFiles ) {
      InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( configFile );
      cfg.addInputStream( is );
    }
    return ( SessionFactoryImplementor ) cfg.buildSessionFactory();
  }

  // uses the first getter of the tupelizer for the assertions

  private void assertAccessType(SessionFactoryImplementor factory, Class<?> classUnderTest, AccessType accessType) {
View Full Code Here

Examples of org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory()

    try {
      AnnotationConfiguration config = new AnnotationConfiguration();
      config.addAnnotatedClass(Bunny.class);
      config.addAnnotatedClass(PointyTooth.class);
      config.addAnnotatedClass(TwinkleToes.class);
      config.buildSessionFactory();
      String[] schema = config
          .generateSchemaCreationScript(new SQLServerDialect());
      for (String s : schema) {
        log.debug(s);
      }
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.