• 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

Using props file for Stored functions and procedures

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
- what are the benefits of moving a stored function or procedure to the props file ?

- As we make the WAR file when we deploy, it always compiles anyway.

- When in production, if I change the function/ procedure in the props file, is it necessarry to redeploy the WAR or just deploy only the props file?

- what are the other logical advantages of pulling a stored procedure/ function from a props file?

Thanks in advance.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Puthriah,
Is a props file the same thing as a properties file?

Also, are you comparing it to a stored proc in the database or one defined in the application? The pros/cons would be different in either case.
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne

Props means ...Properties file

I am referring to the Stored function / procedure written in a java app.

what mean to say is that :

Instead of hardcoding in the java source, it would be more flexible to write in a props file as we can modify and the java class files need not be re-compiled.

Thanks in advance
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Puthriah,
Ok. I understand the question now.

Yes, it would be more flexible. In fact, some people externalize all their SQL queries for this reason.

The benefits are flexibility and that a database person can update the stored proc without knowing Java. As long as the stored proc signature doesn't change, this works well. If the signature changes, you have to update the code anyway.

You wouldn't have to redeploy the WAR. You would likely have to restart it though.
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks JB.
As long as the stored proc signature doesn't change :

Can you clarify this a bit?

What I understood is ..

The params we pass. Am i right?
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Puthriah Sarma:
The params we pass. Am i right?


Yes. The parameters and the names of the stored proc.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic