I have a question about the JCS, since I haven't used it before, I don't know how it works.
We have a table in our database, and its data rarely changes, so it is good for caching. I tried to put
Thanks a lot!
I have a question about the JCS, since I haven't used it before, I don't know how it works.
We have a table in our database, and its data rarely changes, so it is good for caching. I tried to put
Thanks a lot!
I tried what you said, but it always show me the SQL statements, so that means the data is from database? I did use
P.S, someone told me to turn on log4j.logger.net.sf.hibernate.cache=debug, I also tried this, it showed me something like "Cache new", don't know if the cache has been used.
Here is my .hbm.xml file
***********
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
************
Here is the code I load the object:
************
public void listAlias() throws HibernateException
{
Session session = sessionFactory.openSession();
Iterator iter = session.iterate("from com.hibernate.Alias as alias");
while (iter.hasNext())
{
Alias myAlias = (Alias) iter.next();
System.out.println("-------client is----" + myAlias.getClient());
System.out.println("-------subclient is----" + myAlias.getSub_client());
session.evict(myAlias);
}
session.close();
}
************
Main()
hiberTest.listAlias();
Thanks