I checked on my LocalPersistenceFacade containing most methods I'm calling, by printing a counter, and I get the exact number of closed and opened connexions there: 457. And then my job crashes. Normally, It should go till 601 and not 457.
Does 457 number is the number of open connection?
457 is not necessarily the total number of opened connections, but it's the number of connections opened, then closed effectively in the methods I'm using for my job, that I checked. Before executing those methods, some connections were opened in other classes to initialize the job, but I couldn't check all.
I wanted to check it all by decompiling toplink and adding a counter in EntityManagerImpl and EntityManagerFactoryImpl which I thought wasn't a bad idea, but I didn't manage the decompilation correctly. JAD (that I used for that) removed a lot of things at decompilation, like default values for attributes in classes, and so on... So I decided to just print a counter everytime I'm opening and closing a connection.
have you tried running 'netstat' or similar to see how many connection are either open of waiting?
It's fixed now. The problem was that increased number of managed rows also increased demand for ports. By increasing the number of allowed user ports in the Windows registry, the job executed successfully (see page http://doc.boomi.com/confluence/display/DOC/Address+Already+in+Use+Error).
Another solution is to create a connection pool, that's what I'm about to add on my project.
Edited by: Jean on Apr 13, 2010 2:33 AM