Openfire on linux: database connection problem

i am using openifre 3.7.1 on linux ( 4 GB RAM , 2.27 GHz) with sql server 2008 (on windows)

i am doing a test where more than 150,000 users login and start to chat (everything works fine)

but when i upload a custom plugin to intercept packets, only 84 users can connect to the server

the connection to the database are not closing properly

5

25

is there any way to make it work without changing the number of maxconnections???

on windows it works fine with only 25,

the problem is that the database connections are not closing properly when i use this code:

DbConnectionManager.closeConnection(proc_stmt, con);