| Author |
Using props file for Stored functions and procedures
|
Srinivasa Kadiyala
Ranch Hand
Joined: Jun 10, 2004
Posts: 237
|
|
- 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.
|
Srini
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
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.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Srinivasa Kadiyala
Ranch Hand
Joined: Jun 10, 2004
Posts: 237
|
|
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
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
Joined: Jun 10, 2004
Posts: 237
|
|
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
Originally posted by Puthriah Sarma: The params we pass. Am i right?
Yes. The parameters and the names of the stored proc.
|
 |
 |
|
|
subject: Using props file for Stored functions and procedures
|
|
|