OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Changing the DTD declaration at runtime

[ Lists Home | Date Index | Thread Index ]
  • From: Laura Neitzel <laura.neitzel@moai.com>
  • To: "'xerces-j-dev@xml.apache.org'" <xerces-j-dev@xml.apache.org>, "'xml-dev@xml.org'" <xml-dev@xml.org>
  • Date: Thu, 8 Jun 2000 14:53:22 -0700

Hi again!

I am encountering a diagnosable problem with regards to the DTD declaration
(<!DOCTYPE...>) in an Xml file. 

First, some background:

Our system is set up such that we have a single "receiving" web/app server.
This server processes all sorts of requests, one of which is xml. In other
words, someone can send an xml doc to this web server (call it
www.webserver.com for now) and we will process the document (add, update,
delete from our db, etc) and return a response, via http--and a servlet
(which we call XmlServlet). Our dtd may or may NOT be on this server;
because the server is part of our product, customers may choose to put the
dtd on a separate server. 

The problem: 
The problem is that of a deadlock when servicing too many requests.
Basically, our webserver (Weblogic) has a configurable number of threads
that it can handle at one time. This number is set to 15. If more than 15
requests occur simultaneously (using LoadRunner here), a deadlock occurs. 
We believe this happens because each call to the XmlServlet spawns off a
thread, and then each of these threads calls the web server again to
retrieve the DTD (which is referenced as
http://www.webserver.com/dtd/1.0/mydtd.dtd). Note that the DTD references 4
.mod files. 
So, threads 1-15 are serviced via the servlet and weblogic then says "no
more," but each of them needs to get the dtd to work with. Thread 1 asks the
webserver for the dtd, but the webserver makes it wait until at least one of
the 15 is finished... but none of them will ever finish, because they need
the dtd to finish!!! 

The solutions: 
We think that one of the best ways to deal with this is to refer to the dtd
directly through the filesystem (file:\d:\dtd\1.0\mydtd.dtd). However, for
various reasons, we can't put the filesystem path in the xml document
itself. We'd like to be able to translate
http://www.webserver.com/dtd/1.0/mydtd.dtd to local path
file:\d:\dtd\1.0\mydtd.dtd. 

Any suggestions for where to put the translation? 
We thought of altering the parser code-- where it reads in the dtd. Does
anyone know where to do this? 
Another option would be to have someone else host the dtd. Is this commonly
done? 

Thanks so very much,
Laura



***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS