-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: org.hibernate.ejb.Ejb3Configuration deprecated in hibernate
PostPosted: Fri Dec 09, 2011 4:15 pm 
Newbie

Joined: Wed Jul 02, 2008 4:56 pm
Posts: 3
We are trying to read the hibernate configuration from org.hibernate.ejb.Ejb3Configuration object by passing persistent unit name in hibernate 3.

However, it is deprecated in hibernate 4. I would like to know what is the right object we should use in hibernate 4 land.

Thanks.


Top
 Profile  
 
 Post subject: Re: org.hibernate.ejb.Ejb3Configuration deprecated in hibernate
PostPosted: Sun Dec 18, 2011 1:38 am 
Newbie

Joined: Sun Dec 18, 2011 12:47 am
Posts: 2
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();


Top
 Profile  
 
 Post subject: Re: org.hibernate.ejb.Ejb3Configuration deprecated in hibernate
PostPosted: Fri Mar 15, 2013 8:41 am 
Newbie

Joined: Fri Mar 15, 2013 8:37 am
Posts: 1
I am facing same issue . did you find any solution ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.