Win a copy of Svelte and Sapper in Action this week in the JavaScript 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Using props file for Stored functions and procedures

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • 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: 40200
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • 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
  • 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: 40200
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • 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
  • 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: 40200
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • 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.
 
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic