I have a fairly typical JavaEE application, composed using EJB3, seam components, spring beans and JSF, all packaged into several jar and war files inside an ear file. Naturally for JavaEE, we have many XML files as part of the application. Some of these XML files are validated using DTD (seam) and some using schema.
As most files where taken from the examples and from other projects, all DTDs and schemas refer to the project's site, where the default DTD or schema resides. Here comes the problem: For some reason, the JBoss site misses the seam DTDs today (Check http://www.jboss.com/products/seam/components-1.1.dtd, http://www.jboss.com/products/seam/components-1.2.dtd, http://www.jboss.com/products/seam/components-2.0.dtd). Since the JBoss server validates the XML at bootstrap using this location, the application deployment failed.
My question is this: Given this case, where should I put the DTD and definition files? I see three options:
- Use the default location, as I did before. As it means I now add the stability of the JBoss, Sun, Spring and any other vendor into my system in case I need to re-deploy the application, I prefer not to do so.
- Copy all DTD and schema files to my server, having the URLS point to a server under my control.
- Copy all DTD and schema files to my application or app server, and use them locally.
I tend to use option #3, as it provides full control on the files, without network dependencies. In test we've done, it even significantly reduced the bootstrap time of the server - apperently the XML parser does not cache the definitions. Is there anyhing I miss by taking this path?