Saturday, April 4, 2015

ehcache configuration for hibernate

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true"
 monitoring="autodetect" dynamicConfig="true">
 
 <!-- By default, Ehcache stored the cached files in temp folder. -->
 <!-- <diskStore path="java.io.tmpdir" /> -->
 
 <!-- Ask Ehcache to store cache in this path -->
 <diskStore path="c:\\cache" />
 
 <!-- Sample cache named cache1
    This cache contains a maximum in memory of 10000 elements, and will expire
    an element if it is idle for more than 5 minutes and lives for more than
    10 minutes.
 
    If there are more than 10000 elements it will overflow to the
    disk cache, which in this configuration will go to wherever java.io.tmp is
    defined on your system. On a standard Linux system this will be /tmp" -->
 <cache name="cache1" 
  maxEntriesLocalHeap="10000"
  maxEntriesLocalDisk="1000" 
  eternal="false" 
  diskSpoolBufferSizeMB="20"
  timeToIdleSeconds="300" timeToLiveSeconds="600"
  memoryStoreEvictionPolicy="LFU" 
  transactionalMode="off">
  <persistence strategy="localTempSwap" />
 </cache>
 
</ehcache>




For more information http://www.mkyong.com/ehcache/ehcache-hello-world-example/

Friday, April 3, 2015

Object oriented language vs Object based language

Object oriented language

 

Object based language

·         Object-oriented language supports all the features of OOPs.

·         Object-based language doesn't support all the features of OOPs like Polymorphism and Inheritance
·         Object-oriented language doesn't have in-built object.

·         Object-based language has in-built object like javascript has window object.
·         Object-oriented languages are C++, C#, Java etc.

·         Object-based languages are Javascript, VB etc.