I'm working in a J2EE project which all SQL queries are stored in a xml file, then our EJBs can recall those queries at need. Is that a good aproach?
- Posted by: Edson Alves Pereira
- Posted on: July 19 2005 15:41 EDT
- Is a good idea store SQL statements in static xml files? by Sualeh Hasan on July 20 2005 06:01 EDT
yes it is a good approach you can change sql any time without recompiling the code but remember to cache the queries otherwise it will create an overhead of reading an XML and at the same time there will be a provision of refreshing the cache so that it will sense the change in query