Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How can I access java procedures from PL/SQL (sqlplus) in 9i

Re: How can I access java procedures from PL/SQL (sqlplus) in 9i

From: <kennethkoenraadt_at_no-spam.hotmail.com>
Date: Tue, 08 Oct 2002 08:08:20 GMT
Message-ID: <3da29269.948273@news.mobilixnet.dk>


Sure it is possible.

Say you have loaded a Java Class into your database :

public class foo {
  public static void dosomething (float a, float b)    {
     / * Your code here */
    }
}

Then you wrap it's method(s) in a "call spec" to access it from PL/SQL :

CREATE OR REPLACE PROCEDURE foo_dosomething(a number,b number) AS LANGUAGE JAVA
NAME 'foo.do_something(float, float)';

You can now call it's methods from PL/SQL:    

BEGIN
  foo_dosomething(1,2);
 END;
/

And that's about it.

It's fully covered in the on-line doc under "Oracle9i Java Stored Procedures Developer's Guide".

On 7 Oct 2002 00:00:22 -0700, tloim_at_yahoo.com (E. Taner Tumer) wrote:

>Hi,
>
>I want to use some of the builtin java classes in my PL/SQL functions.
>Can it be possible? If so would you please send me some sample code
>written in PL/SQL.
>
>Thanks,
Received on Tue Oct 08 2002 - 03:08:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US