|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
problem in speed while using ehCacheHello, Newbie
in ehcache! We
have changed the hibernate.cfg.xml like: <property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property> <property name="hibernate.cache.provider_configuration">/ehcache.xml</property> <property name="hibernate.cache.use_minimal_puts">false</property> <property name="hibernate.cache.use_query_cache">true</property> <property name="hibernate.cache.use_second_level_cache">true</property> <property name="hibernate.cache.use_structured_entries">true</property> <mapping resource="customers.hbm.xml"/> HBM
File is like:- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate
Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping default-access="field"> <class name="staticdata.model.Customer" lazy="true" dynamic-update="true" table="Customers"> <cache usage="read-write"/>
<id name="customerID" >
<generator
class="native"/> </id>
<property
name="customerShortName" type="string" /> -------------------------------- ------------------------------- ehCache
file is like: <cache name="staticdata.model.Customer" maxElementsInMemory="2500" eternal="false" overflowToDisk="false" timeToIdleSeconds="300" timeToLiveSeconds="0"/> </ehcache> While retrieving the record as:
tx = session.beginTransaction();
Criteria criteria = session.createCriteria(Customer.class); criteria.add(Expression.ne(key, column.get(key))); criteria.add(Expression.eq(key, column.get(key)));
//criteria.setCacheable(true);
result = criteria.list();
tx.commit(); It takes approx 4516 ms for just 900 Records. It is faster then the
normal retrieval (without ehCache) but still seems to be very slower I am not sure if I am missing some thing Please suggest any possible solutions. Regards, The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you received this email in error, please contact the sender immediately by reply e-mail and destroy all copies of the original message. This email is not intended as an offer or solicitation for the purchase or sale of any financial instruments.
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ ehcache-list mailing list ehcache-list@... https://lists.sourceforge.net/lists/listinfo/ehcache-list |
|
|
|