We are working with jboss 2.4 and tomcat 4.0. Our problem is:
We must copy the information of a text file in a database table.
We follow two steps in this process: first we put the information of the file in a Vector of objects and second we put the information of the Vector in the table.
But when this file has a lot of rows we have an OutOfMemoryError in the second step during the Inserts, (sometimes in the first).
If we make the same process without jboss the process work faster and without problems.
Could someone help us?
Thanks in advance.
My guess is when you are not running in JBoss you are not using a transaction. If you have a transaction arround this code the server and the database must keep the uncomitted info in memeory incase it need to rollback. Try using smaller transactions. Also importing lots of data via an appserver will almost always be slower (shouldn't be too much slower).