Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Storing Sql queries in Database or Context  RSS feed

 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!