-->
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.  [ 5 posts ] 
Author Message
 Post subject: Stupid Question
PostPosted: Fri Nov 25, 2005 1:08 pm 
Beginner
Beginner

Joined: Wed Aug 31, 2005 3:54 am
Posts: 45
Is there a way in batch traitement to :
completly disabled first and second cache level for some classes (large number of item)
and able cache for some other classes (few referencial datas) ?
Thanks a lot.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 25, 2005 2:56 pm 
Newbie

Joined: Tue Nov 15, 2005 2:16 pm
Posts: 10
For second level cache you have to activate it on the config file to be available and then activate it class by class in the map document.

can you be mor specific on what are you trying to do?

Emilio


Top
 Profile  
 
 Post subject: Session Stateless
PostPosted: Sat Nov 26, 2005 3:51 am 
Beginner
Beginner

Joined: Wed Aug 31, 2005 3:54 am
Posts: 45
I have to do a batch traitement other > 300000 records one after one.
On theses datas, i don't want (and i can't) use first and second cache (out of memory)
and prefer use Session Stateless of 3.1 rc3.
But, for this traitement and for each record, i have to get few referentials datas on which it could be better to have cache.
So, in the same session, how can i have no cache (session level nor sessionfactory level) for some datas and cache for other ...

Thanks a lot.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 27, 2005 11:46 am 
Beginner
Beginner

Joined: Wed Aug 31, 2005 3:54 am
Posts: 45
Anything else ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 30, 2005 8:36 am 
Newbie

Joined: Tue Nov 15, 2005 2:16 pm
Posts: 10
Well I still don't get a clear idea of what you are trying to do but, let see...

To work on masive updates/insertions/ect. older hibernate version sugest to use plain odbc. I think this the sugestion still holds for newer versions.

Any way, from your explanation, I can not see how session cache may harm you. You could clear the session cache at the end of every transaction but I don't think your situation needs it. (take a look on session.evict(object) and CacheMode)

More over, if you are retrieving record one by one, you should activate the batch-size setings to let hiberntate manage that, and you should try to work on subsets, 20, 50, 100 or more records at time to let hibernate optimize querying.
Here you have an example of batch-size use:
http://blogs.warwick.ac.uk/kieranshaw/entry/garbage_collection_and/
You should look at the doc for other tags related to batch[ing]

If you are worried of filling your cache with every one of the 300.000 records you are gonna work on, you can evict them from the session cache and let the GC do it's work or fix the cache size to let the olders instances fell out.

I hope this helps.

Emilio


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