-->
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.  [ 4 posts ] 
Author Message
 Post subject: Using the retrived collection for entire web application.
PostPosted: Tue Dec 20, 2005 3:28 pm 
Beginner
Beginner

Joined: Thu Apr 14, 2005 11:39 am
Posts: 31
When user loge in I am making a call to database and retriving a collection of objects(Each object represents a table row). I don't want to keep this collection in the session and I don't want to make another call to the same table for some data as I already have it in collection. Is there any way to reuse the collection for the whole application ?

I am using Struts Hibernate and spring. I want the below list to be used for entire application.

public List searchDocuments() {
List list = new ArrayList();
try {
list =
getHibernateTemplate().find("from Documents");

} catch (DataAccessException e) {
e.printStackTrace();
throw new InfrastructureException(e);
}
return list;
}


Thanks in advance for your suggestions.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 4:25 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
cache

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 6:07 pm 
Beginner
Beginner

Joined: Thu Apr 14, 2005 11:39 am
Posts: 31
I never used cache. Coul you explain how to or give me some documentation url's ? or example ?. Anything you provide will be appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 6:33 pm 
Senior
Senior

Joined: Wed Jul 13, 2005 4:31 pm
Posts: 142
Location: Seattle, WA
http://www.hibernate.org/hib_docs/v3/reference/en/html/performance.html#performance-cache


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