I am having the same problem. How can this be fixed. It did work in previous versions.
ejb3Configuration in version 4 is not working. Can someone help.
Ejb3Configuration ejb3Configuration = new Ejb3Configuration();
ejb3Configuration.setProperty("hibernate.c3p0.max_size", ("75")); ejb3Configuration.setProperty("hibernate.c3p0.max_statements", ("10")); ejb3Configuration.setProperty("hibernate.c3p0.min_size", ("05")); ejb3Configuration.setProperty("hibernate.c3p0.timeout", ("1800")); ejb3Configuration.setProperty("hibernate.connection.datasource", ("java:comp/env/jdbc/dbThis_rdbms")); ejb3Configuration.setProperty("hibernate.connection.driver_class", ("com.mysql.jdbc.Driver")); ejb3Configuration.setProperty("hibernate.connection.password", ("")); ejb3Configuration.setProperty("hibernate.connection.url", ("jdbc:mysql://Dbthishost/dbThis_rdbms")); ejb3Configuration.setProperty("hibernate.connection.username", ("")); ejb3Configuration.setProperty("hibernate.current_session_context_class", ("thread")); ejb3Configuration.setProperty("hibernate.dialect", ("org.hibernate.dialect.MySQLDialect")); ejb3Configuration.setProperty("hibernate.order_updates", ("true")); ejb3Configuration.setProperty("hibernate.show_sql", ("true")); // ejb3Configuration.setProperty("hibernate.transaction.factory_class", ("org.hibernate.transaction.JDBCTransactionFactory")); ejb3Configuration.setProperty("hibernate.session_factory_name", ("dbThisJPAFactory"));
// <provider>org.hibernate.ejb.HibernatePersistence</provider>
entityManagerFactory = ejb3Configuration.buildEntityManagerFactory(); entityManager = entityManagerFactory.createEntityManager();
|