-->
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.  [ 10 posts ] 
Author Message
 Post subject: Query on performance
PostPosted: Sat Jun 17, 2006 8:35 am 
Newbie

Joined: Thu May 18, 2006 1:54 am
Posts: 5
Hi this mhendra,
i have a question about Hibernate

in my project i am using some hundred of tables but i need to mention in my .cfg file ok
but my question is if i am using one object how the hibernate will know this particular object is belongs to that paticular file and if that checks every time then perfomance is degarding so ia there is any other answer for this


plz let me know

Bye

_________________
hi all i al joined in hibernate forum team


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 17, 2006 6:34 pm 
Senior
Senior

Joined: Sun Jun 04, 2006 1:58 am
Posts: 136
it reads the config files only when hibernate intializes not everytime an object is intialized .
So no performance hits.

_________________
Don't forget to rate


Top
 Profile  
 
 Post subject: Query on performance
PostPosted: Mon Jun 19, 2006 5:50 am 
Newbie

Joined: Thu May 18, 2006 1:54 am
Posts: 5
Hi,
Thanks for giving response,But i am thinking like this in our Application when Configuration Class loades the .cfg file it tells on which package the .hbm file is stored But it will not load all the files in to Configuration object or into cache so in hundreds of .hbm files without checking all the .hbm files how it will identify that particular object is that paticular .hbm file

_________________
hi all i al joined in hibernate forum team


Top
 Profile  
 
 Post subject: Query on performance
PostPosted: Mon Jun 19, 2006 5:50 am 
Newbie

Joined: Thu May 18, 2006 1:54 am
Posts: 5
Hi,
Thanks for giving response,But i am thinking like this in our Application when Configuration Class loades the .cfg file it tells on which package the .hbm file is stored But it will not load all the files in to Configuration object or into cache so in hundreds of .hbm files without checking all the .hbm files how it will identify that particular object is that paticular .hbm file

_________________
hi all i al joined in hibernate forum team


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 19, 2006 5:58 am 
Regular
Regular

Joined: Tue May 16, 2006 3:32 am
Posts: 117
Usually an application has a single SessionFactory. It is here that Hibernate caches all configuration settings & compiled mappings, manages prepared statements, etc.


Top
 Profile  
 
 Post subject: Query on performance
PostPosted: Tue Jun 20, 2006 2:36 am 
Newbie

Joined: Thu May 18, 2006 1:54 am
Posts: 5
I think this is not answer to my question.there is no point of SessionFactory just Configuration [color=red]plz read my Question Once Again[/color]

_________________
hi all i al joined in hibernate forum team


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 20, 2006 2:57 am 
Regular
Regular

Joined: Mon May 08, 2006 6:00 am
Posts: 53
Location: India
if i understood your qn, you are talking of following scenario

you have table1.hbm.xml which is mapped to Table1Bean
you have table2.hbm.xml which is mapped to Table1Bean

now at run time how HIbernate decides which table bean to pick up........

If you are specifying a Java Bean with same name with different package name, its absolutely fine. The differentiation will be done using package time the time of reading .cfg file.

Secondly, mapping same bean within 2 hbm is not a desirable practice.....

correct me if I have u/s your qn wrongly.....

Its good to provide e.g while stating problem

sudhir


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 20, 2006 2:59 am 
Regular
Regular

Joined: Mon May 08, 2006 6:00 am
Posts: 53
Location: India
if i understood your qn, you are talking of following scenario

you have table1.hbm.xml which is mapped to Table1Bean
you have table2.hbm.xml which is mapped to Table1Bean

now at run time how HIbernate decides which table bean to pick up........

If you are specifying a Java Bean with same name with different package name, its absolutely fine. The differentiation will be done using package time the time of reading .cfg file.

Secondly, mapping same bean within 2 hbm is not a desirable practice.....

correct me if I have u/s your qn wrongly.....

Its good to provide e.g while stating problem

sudhir


Top
 Profile  
 
 Post subject: Query on performance
PostPosted: Tue Jun 20, 2006 3:09 am 
Newbie

Joined: Thu May 18, 2006 1:54 am
Posts: 5
yeah ,
sudhir u are correct but if i have 1..100 tables and 1..100 .hbm files in my project so if i am using 98th object in my application,
my question is will Hibernate tool need to search in .cfg from 1..97 files
to select 98th .hbm or Hibernate will recognise to go that particular 98th .hbm file is there is any thing to specify to go directly to 98th file


if Hibernate tool serach from 1..97 files so there is perfomance degrading factor is it correct

plz give me reply

_________________
hi all i al joined in hibernate forum team


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 20, 2006 4:23 am 
Regular
Regular

Joined: Mon May 08, 2006 6:00 am
Posts: 53
Location: India
Ok let me make it very clear, the basis on which you are trying to judge performance of Hibernate is not at all relevant.......

If you want to find out answer to your question , enitre source code of Hibernate is available, just go and look at the Configuration class and how it works......you will definitely get your answer regarding finding of the objects using HBM and so on.

Rather than spending time on this issue, see how you can fit Hibernate in your application , and utilise its maximum feature in order to improve your application design and performance......


Sudhir


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 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.