我一直在尝试使用ehcache配置JPA但直到现在都没有成功.我正在做的配置是:
> persistence.xml
jdbc/oracleXE_DS
com.td.waw.cse.entities.Product
> ehcache.xml
xsi:noNamespaceSchemaLocation="ehcache.xsd"
updateCheck="true" monitoring="autodetect"
dynamicConfig="true" >
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="300"
timeToLiveSeconds="600"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU"
/>
maxElementsInMemory="5000"
eternal="false"
timeToIdleSeconds="300"
timeToLiveSeconds="600"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU"
/>
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="300"
timeToLiveSeconds="600"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU"
/>
> Product.java
@Entity
@Table(name="PRODUCT")
@NamedQueries({@NamedQuery(name="getAllProducts", query = "select products from Product products")})
public class Product implements Serializable {}
我没有得到任何例外,但我看不到ehcache在日志中打印的ehcache没有特定的功能.
如果有人可以提供帮助,我将非常感激.