Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » Persisting ecore model in DB takes too long time!!!
Persisting ecore model in DB takes too long time!!! [message #912911] Fri, 14 September 2012 11:41
Harshagiri Kondavagilu is currently offline Harshagiri KondavagiluFriend
Messages: 1
Registered: September 2012
Junior Member
Hi I am using TENEO which in turn uses Hibernate.

TENEO is having an ecore model and it will be loaded with a file of size 60MB.

The ecore will be persisted in database using Hibernate by TENEO. But this process is taking too long time.

My Properties settings are as below

Code:
props.setProperty(Environment.DIALECT, org.hibernate.dialect.Oracle10gDialect.class.getName());
props.setProperty(Environment.DEFAULT_SCHEMA,"MARS_DGS_ADMIN");
props.setProperty("hibernate.temp.use_jdbc_metadata_defaults","false");
props.setProperty(PersistenceOptions.CASCADE_POLICY_ON_NON_CONTAINMENT,"REFRESH,PERSIST,MERGE");
props.setProperty(PersistenceOptions.INHERITANCE_MAPPING,"JOINED");
props.setProperty("teneo.mapping.default_cache_strategy","READ_WRITE");
props.setProperty("hibernate.cache.region.factory_class", "org.hibernate.cache.ehcache.EhCacheRegionFactory");
props.setProperty("hibernate.cache.use_second_level_cache","true");
props.setProperty("teneo.mapping.always_version","false");
props.setProperty("teneo.mapping.disable_econtainer","true");
props.setProperty(Environment.HBM2DDL_AUTO, "create");
props.setProperty("teneo.naming.max_sql_name_length","30");
props.setProperty("hibernate.jdbc.batch_size", "30");


And the code that writes data to DB is below

Code:
final SessionFactory sessionFactory = hbds.getSessionFactory();
{
// Open a new Session and start transaction.
final Session session = sessionFactory.openSession();
session.beginTransaction();

session.save(tempSession); // Taking too long time

// Commit the changes to the database.
session.getTransaction().commit();
}


How to solve this problem?

My ecore is having 25 EClass. Loading the 60Mb file to model takes 6 seconds but insertion of data takes 1 hour!!!

Is it the problem with the way ecore model is made or is it problem of hibernate?
Previous Topic:Validation errors in Ecore metamodel
Next Topic:Ecore editor doesn't find a file
Goto Forum:
  


Current Time: Sat Apr 27 01:22:30 GMT 2024

Powered by FUDForum. Page generated in 0.02957 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top