Well, that's what I was expecting, but the object is never added to the cache again...
Here is the code for save...:
Code:
getHibernateTemplate().saveOrUpdate(obj);
getHibernateTemplate().flush();
getHibernateTemplate().refresh(obj);
and here is how I load the object..:
Code:
public Object retrieve(Class entityClass, Serializable id) throws ObjectNotFoundException
{
Object obj = getHibernateTemplate().get(entityClass, id);
if (obj == null)
{
throw new ObjectNotFoundException("Object does not exist: class=" + entityClass.getName() + ", id=" + id);
}
return obj;
}
BTJ