-->
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: Time consumption due to parsing of map. files
PostPosted: Sun Jul 04, 2004 10:24 am 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
hi all,
I recognized that getting the first access (I mean creating the session factory, session and connection )in an application resumes more appreciable time than getting later accesses.
This time difference must be due to the parsing time of the mapping files in the first access.
I have an initialier class in my application, which do initiliazition in the openning of application. Here I want hibernate to parse these mapping files without creating any access.

I mean I want to seperate hibernate works in 2 steps;
In the beginning, hibernate go and parse all mapping files.
In the runtime application, hibernate go and get access.

How can I do this efficiently? Should I create an instance of session factory and call factory."anymethod" (any of the factory methods that calls parser such as buildSessionFactory)?

Can I do this without creating a factory instance?

_________________
-developer


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 04, 2004 10:34 am 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
well yes, I can do it with Configuration class methods,

should I call conf.configure(..) or conf.createMappings() or
(conf.configure(...)).buildSessionFactory()

_________________
-developer


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 04, 2004 10:51 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Just create a SessionFactory instance once in your initializer and reuse it later on.


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.