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: [EMAIL PROTECTED] ICQ: 115535699 Tel: +49-030-314-21583 ----+----|----+----|----+----|----+----|----+----|----+----|----+----|-| --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]