Re: Java Stored Procedure extraction from Oracle database.
Date: Sun, 01 Aug 2004 13:21:34 GMT
Message-ID: <y76Pc.4356$T_6.3741_at_edtnps89>
Suresh Tri wrote:
> Hi all,
>
> I am interested in extracting the class or jar files which are stored
> as java stored procedures in Oracle. But I want to know if these are
> stored as references to external files in Oracle database or directly
> inside the database. In case if it is directly stored inside the
> database is there any way to extract it?. If I can extract these java
> files, can these be used in non Oracle applications?
The source code for Java Stored Procedures, _when made available_, is stored
in the dictionary. The dictionary views are discussed in detail in the
Oracle Reference manual at http://docs.oracle.com (for Oracle9i R2 the html
version is
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/toc.htm)
and you would want to look at
ALL_JAVA_ARGUMENTS ALL_JAVA_CLASSES ALL_JAVA_DERIVATIONS ALL_JAVA_FIELDS ALL_JAVA_IMPLEMENTS ALL_JAVA_INNERS ALL_JAVA_LAYOUTS ALL_JAVA_METHODS ALL_JAVA_NCOMPS ALL_JAVA_RESOLVERS ALL_JAVA_THROWS ALL_SOURCE (contains the actual source code)
It's much easier to see the source when using the Oracle Enterprise Manager console.
All of this is discussed in the Java Developer's Guide at http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96656/toc.htm in CHapters 2 and 7.
If you extract the java 'files' you can use them anywhere assuming you have all the appropriate class libraries available to the target JVM. Note that anything other than trivial code will likely call Oracle-supplied (or proprietary) classes, and those might only be available as compiled java, compiled to 'C', or wrapped PL/SQL.
/Hans Received on Sun Aug 01 2004 - 15:21:34 CEST