Guest User

Untitled

a guest
Nov 2nd, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. public class HibernateUtil {
  2. private static final SessionFactory sessionFactory;
  3. static {
  4. try {
  5. System.out.println("Фабрика создана");
  6. sessionFactory = new Configuration()
  7. .configure("hibernate.cfg.xml")
  8. .addAnnotatedClass(ProfField.class)
  9. .buildSessionFactory();
  10. } catch (HibernateException ex) {
  11. System.err.println("Initial SessionFactory creation failed." + ex);
  12. throw new ExceptionInInitializerError(ex);
  13. }
  14. }
  15.  
  16. public static SessionFactory getSessionFactory() {
  17. return sessionFactory;
  18. }
  19. }
  20.  
  21. Info: Loading application [ChessmanWork] at [/ChessmanWork]
  22. Info: ChessmanWork was successfully deployed in 10 850 milliseconds.
  23. Info: Фабрика создана
  24. Info: HHH000412: Hibernate Core {5.3.7.Final}
  25. Info: HHH000206: hibernate.properties not found
  26. WARN: HHH90000012: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/hibernate-configuration. Use namespace http://www.hibernate.org/dtd/hibernate-configuration instead. Support for obsolete DTD/XSD namespaces may be removed at any time.
  27. Info: HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
  28. WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
  29. Info: HHH10001005: using driver [com.mysql.cj.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/chessman_work?useSSL=FALSE&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=UTC]
  30. Info: HHH10001001: Connection properties: {user=root, password=****}
  31. Info: HHH10001003: Autocommit mode: false
  32. Info: HHH000115: Hibernate connection pool size: 30 (min=1)
  33. Info: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
  34. Info: HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.
  35. Info: HHH000397: Using ASTQueryTranslatorFactory
  36. Info: Hibernate: select proffield0_.id_prof_field as id_prof_1_0_, proffield0_.prof_field as prof_fie2_0_ from prof_fields proffield0_
Add Comment
Please, Sign In to add comment