cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@apache.org>
Subject Re: IMPORTANT: Major Bug in XMLDBSource
Date Sun, 30 Jun 2002 23:30:50 GMT

On Fri, 28 Jun 2002, Alfredas Chmieliauskas wrote:

>   Hi all,
>
> this bug relates to every cocoon and xindice versions available, thus it
> definately concerns you, if you're using xmldb and accessing it through
> XMLDBSource (xmldb: pseudo-protocol).
>
> Short history:
> We're developing a project that is based on cocoon + xindice and, for a
> while, we were wonering why using cocoon and xindice causes such high
> memory consumption, which on higher loads terminates xindice with an
> OutOfMemoryError. Moreover, similar problems have been reported to both
> lists some time ago.
>
> No doubt about cocoon, I was blaming xindice for the error (that corba
> implementation seemed suspicious from the very begining). However, after
> some memory profiling done for both cocoon and xindice, I got myself to
> check out and revise the XMLDBSource source-code, which turned out to be
> the cause of the problem in the end.
>
> The error is as follows:
> Every new request to the database creates new XMLDBSource, which in turn
> registers a database implementation (driver)
> (DatabaseManager.registerDatabase(...)) *every time* it is created.
>
> Thus after 15 requests to your databse you have 15 database client
> implemetations loaded by your VM.
> You can guess what happens when you have 150 requests, can't you? ;-)
>
> Quick-fix:
> A reasonable and quick fix for the problem would be to move the
> connect() method from the XMLDBSource to the XMLDBSourceFactory.
> Why, on earth, would one bother about the connection in the source
> methods, when it is the major concern for the SourceFactory, i wonder?
>
> Proposal:
> It seems that commonly the rdbms drivers are loaded through the
> cocoon.xconf or web.xml on servlet startup (hsqldb, for example?). Why
> not treat the xmldb drivers the same way?
>
> I hope I saved some time (and memory ;-) for some of you,
>
> Alfredas

Thanks for your comment. I have tried to refactoring the
XMLDBSourceFactory. The new version in the scratchpad.

Can please test it?!

_______________________________________________________________________
         Stephan Michels               EMail: stephan@apache.org
         ICQ: 115535699                Tel: +49-030-314-21583
----+----|----+----|----+----|----+----|----+----|----+----|----+----|-|


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message