Hi,
Here's our technical environment: EJB 3, JPA 2, EclipseLink for the JPA provider.
Our web application manages files uploads, the lines of files are read in memory and then inserted in Oracle database.
The code that performs this is the following:
lines contains the whole lines of a file
for (Line l : lines)
{
em.persist(l);
}
In a loop the method em.persist is called on each line of the file. Is there a way to improve this ? In case of big file it can be a performance issue i think. Transactions are managed by the container (Weblogic J2EE server).
Is it possible to force the commit for all 1000 lines for example ?
Thanks a lot.