GeeCON Prague 2014*
The moose likes JDBC and the fly likes Moving From Oracle Stored Procedure to Java Stored Procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Moving From Oracle Stored Procedure to Java Stored Procedure" Watch "Moving From Oracle Stored Procedure to Java Stored Procedure" New topic
Author

Moving From Oracle Stored Procedure to Java Stored Procedure

Raj Venkata
Greenhorn

Joined: Aug 14, 2001
Posts: 4
Hi,
We have been using Oracle Stored Procedures for a while and would like to switch to Java Stored Procedures.
Is there a tool that I can use to port Oracle Stored Procedures to Java Stored Procdures? If I end up in doing the porting manually how much time it takes for the porting ( I would like to know approximately for let us say 1000 lines of code how much time).
thanks in advace,
Raj
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
First of all, I have to ask ... Why? If the procedure can be done in PLSQL, then 90% of the time, that's the most efficient way to perform the function. Writing a Java Stored Procedure is fairly straight forward. There are plenty of examples included those included in the examples for "Expert One on One Oracle" http://www.wrox.com/Books/Book_down.asp?sub_section=1&isbn=1861004826&subject=Oracle&subject_id=48


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Richard Boren
Ranch Hand

Joined: Mar 01, 2001
Posts: 233
Originally posted by Carl Trusiak:
First of all, I have to ask ... Why? If the procedure can be done in PLSQL, then 90% of the time, that's the most efficient way to perform the function.

Carl is the reason why PL/SQL stored procedures more efficient than java stored procedures because they are loaded into memory? The CBT's I am learning Oracle from keep saying the PL/SQL procedures are the most efficient, but they do not explain why.
Sorry for butting in Rajah.
john_guthrie
Greenhorn

Joined: Jun 14, 2001
Posts: 16
Maybe not the most compelling reason, but we migrated our few PL/SQL SPs to java so that we only have a single language at every tier - java on the app server, java in the database, no need to maintain PL/SQL knowledge (which was pretty iffy to begin with)
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
"john_guthrie",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements.
Thanks.
Vishakha Ahuja
Ranch Hand

Joined: Sep 13, 2000
Posts: 191
Hi,
Where can I find info on Java Stored Procedures ?
Raj Venkata
Greenhorn

Joined: Aug 14, 2001
Posts: 4
Carl Trusiak
Right now we are using only oracle as the back end and now for our application we may need to support multiple databases. So we would like to use Java Stored Procedures.
Raj

Originally posted by Carl Trusiak:
First of all, I have to ask ... Why? If the procedure can be done in PLSQL, then 90% of the time, that's the most efficient way to perform the function. Writing a Java Stored Procedure is fairly straight forward. There are plenty of examples included those included in the examples for "Expert One on One Oracle" http://www.wrox.com/Books/Book_down.asp?sub_section=1&isbn=1861004826&subjec t=Oracle&subject_id=48

 
GeeCON Prague 2014
 
subject: Moving From Oracle Stored Procedure to Java Stored Procedure