Search This Blog

Thursday, June 19, 2008

Java stored procedure in Oracle

I found out a very nice way to write your own Java code and run it as a stored procedure in oracle database, I play with it, and I understand how strong this way to find out a simple solution to a complex problem, for example my issue was to find a way to call to a COBOL program that runs on SUN box, via C++ on windows.
So I ask the COBOL developer to create a shell script in SUN to activate his COBOL program, and I created a JAVA class that runs as a Stored procedure and activate this script , and get the result from the stdoutput .
The C++ developers only needs to call to the stored procedure, and we are there.
BTW - the Oracle and my scripts file are on the same server.

A very good example how to do it , you can find here
An Introduction to Java Stored Modules in Oracle
and here
Shell Commands From PL/SQL
Last one - > another Step by step article and Demo
Java Stored Procedure in Oracle, Database Interaction
Enjoy

No comments: