ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Henricksen" <T...@A-t-g.com>
Subject SQLMAP loading
Date Wed, 31 Jan 2007 15:34:59 GMT
We run our application on Websphere 5.1 and are getting heapdumps.  I
was going through the IBM HeapAnalyzer to pin point possible memory leak
suspects.  One of the suspects is the HashMaps created from
iBatis(2.1.5) when we load up all our sqlMap xml files.  This made me
wonder whether we are doing things correctly.  When we start our
application we load all the iBatis files in:

 

if (singleton == null) {

 

            String resource =
"com/advtechgrp/bop/medical/data/sqlmaps-config.xml";

            Reader reader = Resources.getResourceAsReader(resource);

            singleton = SqlMapClientBuilder.buildSqlMapClient(reader);

 

        }

 

        if (nestedTransactionSingleton == null) {

 

            String resource =
"com/advtechgrp/bop/medical/data/sqlmaps-config.xml";

            Reader reader = Resources.getResourceAsReader(resource);

            nestedTransactionSingleton = SqlMapClientBuilder

                    .buildSqlMapClient(reader);

 

        }

 

        if (reportingClientSingleton == null) {

 

            String resource =
"com/advtechgrp/bop/medical/reports/data/reports-sqlmaps-config.xml";

            Reader reader = Resources.getResourceAsReader(resource);

            reportingClientSingleton = SqlMapClientBuilder

                    .buildSqlMapClient(reader);

 

        }

 

If this seems wrong let me know.  

Thanks,

Tom

 

 


Mime
View raw message