-->
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.  [ 6 posts ] 
Author Message
 Post subject: serialize mappings?
PostPosted: Fri Nov 21, 2003 12:13 pm 
Beginner
Beginner

Joined: Sun Sep 21, 2003 12:19 am
Posts: 40
In my case, I have about 200 classes I am going to persist. The problem I am facing is that it takes about 1 minute for hibernate to parse all these .hbm.xml mappings (first phase and second phase) and my CPU pegged at 100%. Since my mappings rarely change, can I persist the mappings so the next time it just simple load the persisted version and bypass the first phase/second phase including xml validation etc? If in a rare chance, I do change my schema after the production I will let it reparse again of course.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 21, 2003 5:38 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The state that gets created at Factory creation time is not persisted so the answer is unfortunately no. I suppose a reature request could be made but ...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 22, 2003 5:21 pm 
Beginner
Beginner

Joined: Sun Sep 21, 2003 12:19 am
Posts: 40
But how can I do that?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 22, 2003 6:18 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Goto the JIRA (look at hibernate.org)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 22, 2003 10:27 pm 
Beginner
Beginner

Joined: Sun Sep 21, 2003 12:19 am
Posts: 40
Thanks, it's done. The number is HB-492.

If you need any help, I am here willing to do anything making this project better.


Top
 Profile  
 
 Post subject: Serializable patch
PostPosted: Mon Apr 26, 2004 12:33 pm 
Newbie

Joined: Wed Mar 03, 2004 7:11 am
Posts: 6
Hi,

I needed to store my configuration object in a JNDI tree in
order to be able to access some meta information found
in the mapping files. Unfortunately, the JBOSS JNDI only
stores serializable object, so it did not work at first.

I have included a patch in the JIRA (HB-492) that makes the
Configuration Object serializable. Please, note that although this
works for me, I have not tested it enough to ensure that it works
in all cases. Specially, it will not work if you use a XML parser
whose Element implementation is not serializable (some classes
store Element objects). But I think some people can find it useful.


It would be nice if this patch would be the base to have a
Serializable Configuration object in Hibernate.

Regards.


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