insert large blob through hibernate:outofmemory problem

Commonly used J2EE server side frameworks.

insert large blob through hibernate:outofmemory problem

Postby haretu » Thu Mar 17, 2011 3:51 pm

insert large blob through hibernate.

First I use
Code: Select all
byte[] fileBArray = new byte[(int)upload.length()];
fis = new FileInputStream(upload);
         blob = Hibernate.createBlob(fis);


even though I set JVM to Xmx1024M, it still complain outofmemory :heap size space.

Then I change to

Code: Select all
setFileblob(Hibernate.createBlob(new FileInputStream(upFile[0])));


that solve the problem.
haretu
 
Posts: 132
Joined: Sat Jan 08, 2011 9:56 pm

Return to struts,spring,hibernate

Who is online

Users browsing this forum: No registered users and 1 guest

cron