• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Storing Sql queries in Database or Context

 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have heard of an Architecture wherein Sql Queries are stored in Database itself or in Context of application. As and when required these queries are fetched and are executed.
Is there any architecture that mandates or supports this type of logic.
What is the main advantage behind such kind of mechanism..
 
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have never heard of a java architecture which stores database queries in ServletContext, so i will not comment on that. Although the idea looks very strange to me.
Although there are many different patterns, which you can use according to your requirement, Following link will provide you more information about that
http://java.sun.com/developer/technicalArticles/J2EE/patterns/J2EEPatternsRoadmap.html
[ March 03, 2004: Message edited by: Prakash Dwivedi ]
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do u mean that you put the SQL statement in the <init-param> of the Servlet Context inside the web.xml?
If so, the SQL can be stored inside the Context, however, the param is "read-only", you cannot update it, so, if you need to change the SQL, you need to restart the container.
Nick.
 
Today's lesson is that you can't wear a jetpack AND a cape. I should have read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic