Hello,
I developpe an application which create several derby databases. It may
be 2 ddatabase or 100. In my application, I have a class which create
those databases and connexions.
Here the constructor method :
-----------------------------------------------------------------------
DBGenConnection(String purl, String pdbname, boolean cancreatedb,
boolean autocommit, String alterTableCreateIndex){
this.alterTableCreateIndex = alterTableCreateIndex;
String url = "jdbc:derby:"+purl+pdbname+";create="+cancreatedb;
url = System.getProperty("db_url", url);
try{
String driver = "org.apache.derby.jdbc.EmbeddedDriver";
String passwd = System.getProperty("db_passwd", "");
String user = "";
user = System.getProperty("db_user", user);
Class.forName(driver);
// create the conenxion
con = DriverManager.getConnection(url, user, passwd);
con.setAutoCommit(false);
}
catch(Exception e){
System.err.println("erreur : "+e);
}
}
----------------------------------------------------------------------
When I finish to deal with one database, I close it before create the
next one. when I close a database I only do 'myConnection.commit()' and
'myConnection.close()' and that's all.
I run a java memerory profiler and it seems that when I close a databse,
memory is not completly free.
Is there something to do closing a database to free all memory use by
this database ?
thanks
--
yves piel