i am using hibernate 2.1.7 with EJB CMT in WLS811.
database: oracle9i
using CMT transaction,
DAOUtil code here:
Code:
Session session = null;
try {
session = HibernateUtil.openSession();
infoattachHBM infoattachHBM = new infoattachHBM(
infoattach.getAttach_id(),
infoattach.getInfo_id(),
infoattach.getAttach_type(),
infoattach.getAttach_name(),
infoattach.getAttach_desc(),
infoattach.getAttach_size(),
infoattach.getAttach_body());
session.save(infoattachHBM);
session.flush();
}
catch (Exception e) {
...
}
finally {
HibernateUtil.closeSession(session);
}
while the application run, i found a very strang problem
there are some memeory leak when i save my object, and i do more, i found whenever i call Code:
session.save(infoattachHBM)
there do is some memory leak, but if i remove this code line Code:
session.save(infoattachHBM)
there is none memoery leak, it's puzzled me!!
who can tell me why this happen? thanks !