configuration.setProperty(Environment.DIALECT, "org.hibernate.dialect.HSQLDialect");
configuration.setProperty(Environment.AUTOCOMMIT, "false"); //"true");
configuration.setProperty(Environment.CURRENT_SESSION_CONTEXT_CLASS, "thread");
configuration.setProperty(Environment.HBM2DDL_AUTO, "update");
configuration.addAnnotatedClass(Book.class);
configuration.addAnnotatedClass(Genre.class);
configuration.addAnnotatedClass(BookGenre.class);
HibernateUtil.setConfiguration(configuration);
HibernateUtil.getSessionFactory();