Article:
  Stored Procedures for Java Programmers
Subject:   Java Stored Procedures
Date:   2003-09-03 14:59:02
From:   nferrier
Response to: Java Stored Procedures

Primarily for the reason that I lay out in the article: PL/SQL expresses SQL much better than Java, I'd much rather write this:


open somecusor for select id from sometable;


than:


Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select id from sometable");


Apart from anything it's 55 less keypresses.


To be honest I'm not sure why anyone uses Java inside the database.

Main Topics Oldest First

Showing messages 1 through 2 of 2.

  • Java Stored Procedures
    2004-02-06 11:47:04  javid [View]

    There is a great reason to use Java Stored Procedures (java inside the database). Let's say that you have an application that only knows how to talk to datasources (such as Crystal Reports). Now let's say you want to integrate that application with another software application that only provides you with a Java API to extract data from. There is the perfect union. Call java stored procedures (or views on top of stored procedures) in Oracle, and then the Java code can load the data it needs out of the Java API.

    Java Stored Procedures are used a lot to integrate applications that only have access to datasources (oracle, db2, odbc, etc.).
  • Java Stored Procedures
    2003-10-27 11:56:37  anonymous2 [View]

    I would say the reason to consider using it is because you can write the same code for data access to run in or out of the db.