This is the java program I have tried and shows the memory leak. The problem is with the DatabaseManeger.getCollection() method.
---------------------------------- import org.xmldb.api.base.*; import org.xmldb.api.modules.*; import org.xmldb.api.DatabaseManager; // For the dbXML specific CollectionManager service import org.dbxml.client.xmldb.services.*; public class test { public static void main( String[] args ) throws Exception { String vendor = "dbxml"; String drv = "org.dbxml.client.xmldb.DatabaseImpl"; String baseCol = "/db/"; String id= "test2"; String result; String collectionName="docbase/xml"; Class c = Class.forName(drv); Database db = (Database) c.newInstance(); DatabaseManager.registerDatabase(db); for (int i=0;;i++) { // if I put the next line (and the col.close() statement) outside the for loop there is no memory leak Collection col = DatabaseManager.getCollection("xmldb:"+vendor+"://"+baseCol+collectionName); System.out.println( "*** loop "+i+" ***"); Resource resource = col.getResource(id); if (resource != null) { result = (String) resource.getContent(); System.out.println(result); } else { System.out.println("ID: '"+id+"' does not exist."); } col.close(); }//for } //main } //class --------------------------------- Hope anyone can help. Gr Robert ----- Original Message ----- From: "Kimbro Staken" <[EMAIL PROTECTED]> To: <xindice-users@xml.apache.org> Sent: Monday, December 17, 2001 9:13 PM Subject: Re: memory leak > > On Monday, December 17, 2001, at 03:09 AM, Robert Spee wrote: > > > I'm using dbXML-Core-1.04b with the Java XML:DB API and I have the > > following > > problem: > > > > When I do getCollection() and collection.close() not all the memory is > > released and the databasse server runs out of memory. > > > > Does anyone knows the reason for this memory leak? > > > > I am not aware of any memory leaks in the beta 4 release. Can you describe > more about what you're doing and where the error is occurring? > > > Gr > > > > Robert > > > > > > > > > Kimbro Staken > XML Database Software, Consulting and Writing > http://www.xmldatabases.org/ > >