1600 PMP mock questions 1400 CAPM mock questions 800 SCJP 6 mock questions 600 OCAJP 7 mock questions 590 OCPJP 7 mock questions 556 SCWCD 5 mock questions 500 OCEJWCD 6 mock questions pdfDownload (java,struts, hibernet etc)
 

Recent Questions

!!! Hibernate Frequently Asked Questions !!!

How to set 2nd level cache in hibernate with EHCache?

!!!Answer!!!- From Technical Expert

When you are creating SessionFactory just add the below steps

String ecache = appHome+File.separatorChar+"ehcache.xml";
try {
CacheManager.create(ecache);
} catch (CacheException e) {
// logger.logError(e);
}*/

Then
sessionFactory = configuration.buildSessionFactory();

ECache.xml is like
<ehcache>
<diskStore path="java.io.tmpdir"/>
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
/>

<cache name="bean.ApplicationBean"
maxElementsInMemory="300"
eternal="false"
overflowToDisk="false"
/>
</ehcache>

ApplicationBean will be avilable in 2nd level cache


Answered By : null Replied Date : Dec 21 2013
Answer :


Answered By : null Replied Date : Oct 22 2013
Answer :


Answered By : null Replied Date : Oct 10 2013
Answer :


Answered By : null Replied Date : Mar 21 2014
Answer :


Answered By : null Replied Date : Apr 29 2014
Answer :


Answered By : null Replied Date : Jul 30 2014
Answer :


Answered By : null Replied Date : Sep 5 2014
Answer :


Answered By : null Replied Date : Nov 4 2014
Answer :


Answered By : null Replied Date : Nov 13 2014
Answer :


Answered By : null Replied Date : Jun 19 2015
Answer :


Answered By : null Replied Date : Oct 16 2015
Answer :


Answered By : null Replied Date : Apr 18 2016
Answer :


Answered By : null Replied Date : Oct 25 2016
Answer :


Answered By : null Replied Date : Jul 16 2017
Answer :


 

You can also contribute to this answer:

Your Name:
Answer:

 
Ask Question and get answer from Expert.
View Answers List from Expert.

Reviews and Comments


PMP, CAPM, PMI is a registered certification mark of the Project Management Institute, Inc

Copyright © www.techfaq360.com 2016


About US | Contact US | Privacy Policy | Terms and Conditions  | Website disclaimer  | Cancellation and Refund Policy  | Shipping & Delivery Policy