-->
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.  [ 1 post ] 
Author Message
 Post subject: Fill up the Database
PostPosted: Tue Oct 27, 2009 11:27 am 
Newbie

Joined: Tue Oct 27, 2009 11:08 am
Posts: 1
Dear all,
sorry im new to hibernate but i have a big problem. i'm working on an analysis tool which analyse sourcecode. The programm build a complete analysis and then the analysis is writen in the database.
actually the analysis works fine for small projects. but if we have a huge projekt the analysis takse ca.4:30 hours. after a codeinspection i found out that the moste time is used by the HibernateHandler to update the database.
so my problem is to fill up the database.

"public final class HibernateHandler implements PersistenceHandler" is the class used to persists the datamodel.

this is the update function
Code:
public void update(final Object object) {
        final Session s = SESSION_FACTORY.openSession();
        final Transaction transaction = s.beginTransaction();

        s.update(object);

        transaction.commit();
        s.close();
    }



this is the save function
Code:
public void save(final Object object) {
        final Session s = SESSION_FACTORY.openSession();
        final Transaction transaction = s.beginTransaction();

        s.save(object);

        transaction.commit();
        s.close();
    }


the object is a complete analysis. and this object is big.
is there a fast way to fill up the database with a complex object?
i hope someone can help me.


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

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.