| 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) | JobsJobs and Walkins |
Hibernate interview questions
|
!!! Hibernate interview questions !!!How to set 2nd level cache in hibernate with EHCache?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 |
Suggested JobsMore Jobs >> |