Atomikos Forum |
|
I have found high memory use (about 94 Megabyte) of Atomikos during a loop with lots of single sql (about 8200) select statements. The code seems to run perfect, however memory usage is getting a bit of a problem with 40 concurrent users.
With Eclipse MAT I have found Atomikos stores every statement on the AtomikosThreadLocalConnection.statements arraylist. I also notice there is only a purge and no remove on this arraylist so it looks like it is suppose to grow like this but 94M for 8200 sql's looks very expensive. Can you please help why Atomikos does what it does? Thanks, Edwin
Why are all my separate statements stored on the atomikosThreadLocalConnection object? Can you point me in a direction why this happesn?
We have an class called SQLExecutor in our application which controls the sql and database connections. It builds a connection using the Springs DataSourceUtil.getConnection with uses the AtomikosNonXADataSourceBean. I fire lots of different sql queries on separate new-ed PreparedStatement objects using 'new' Connection objects, and some how they all are landing on one atomikosThreadLocalConnection object. I close every statement, connection and datasource. |