We have a functionality where in users save file attachments, and it gets saved to database as Blob objects. But intermittently we are facing a database session lock issue ..the sql which tries to insert the file into blob gets hung and the wait event is "
SQL*Net more data from client."
here is how blob is handled in dao:
Code:
InputStream is = file.getInputStream();
Blob blob = Hibernate.createBlob(is);
object.setAttachmentBlob(blob);
this.getHibernateTemplate().save(object);
Env details:
Database - Oracle Database 11g
App Server - IBM WAS 6.1.0.19
Hibernate - Version: 3.2.6.ga
Oracle JDBC Driver version - 10.1.0.2.0 (ojdbc14.jar)
Any thoughts on what could be the issue?
Thanks in advance,
Binil