Hi Heinrich,

very simple:

        public void addDocument(...){
                Database dbxml = new DatabaseImpl();
                try{
                Database[] db = DatabaseManager.getDatabases();
                if(db == null || db.length == 0){
                        DatabaseManager.registerDatabase(dbxml);
                        logDebug("registering Database");
                }
                } catch (XMLDBException ex){...}
                ... add Document ...
        }

The code before just registered the database everytime the method was
called.
Does it help?

Heike

> -----Urspr�ngliche Nachricht-----
> Von:  Heinrich G�tzger [SMTP:[EMAIL PROTECTED]
> Gesendet am:  Donnerstag, 7. Februar 2002 22:09
> An:   [email protected]
> Betreff:      Re: AW: java.lang.OutOfMemory error
> 
> Heike,
> 
> I'm interested in your problem, how did your code look before and how
> does it look now?
> 
> On Fri, 1 Feb 2002, Franosch, Heike wrote:
> 
> >Hi,
> >
> >I had the same problem when registering the database anew everytime I
> >inserted a document.
> >When I moved the code a bit and do a registering only once, everything
> >worked fine.
> >
> >Heike
> >
> >
> >> -----Urspr�ngliche Nachricht-----
> >> Von:       [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
> >> Gesendet am:       Freitag, 1. Februar 2002 04:20
> >> An:        xindice-user
> >> Betreff:   java.lang.OutOfMemory error
> >>
> >>
> >> I am trying to insert about 4000 small XML (each about 1k) documents
> >> into my db. I have a program which generates the XML document, the
> >> generated XML document is then inserted using AddDocument.  After
> >> inserting about 220 XML documents, the Xindice server hangs with
> >> "java.lang.OutOfMemoryError". Has anyone seen this error. Can anyone
> >> help me out.
> >>
> >> I am using the Xindice source from CVS.
> >>
> >> Thanks
> >> Mohan
> >
> 
> regards
> 
> Heinrich
> --
> http://www.xmlBlaster.org

Reply via email to