I am a beginner and I must say you guys are doing a great job here in javaranch.
I have a question regarding how to upload a java application which transfers data from oracle to another system in Oracle DB.
How could I accomplish this task? I mean how to upload a java application into oracle DB.
How can I call the java application from sqlplus after uploading it in Oracle DB? Are there any examples some where to demonstrate this?
Thank you all for helping out.
What I mean is this: I have a java application I have developed. This application runs independently. I want to send this application to the Oracle DB so that the application should be triggered any time an update is done on a particular table in the DB. Now, to my understanding, any java application that is sent to the DB is called a java stored procedure. Is this right?
My problem now is that; how can I send (upload) this application to the Oracle DB? Is there any utility out there that I can use to accomplish my task?
Also after uploading the java application in the DB, how can I invoke it? I mean calling it to carry it function--> Which is to transfer data to another system. Is there any tutorial or an example which shows how to invoke or call a java stored procedure in the DB? I hope I am more clear now. Thanks!
You can use SQL statements to upload/delete the procedure using "CREATE PROC"/"DROP PROC" as well as executing it often just using its name or with "USE" command as you would a SQL statement. But even these can vary from database to database in precise synatax.
It also depends what you want to do, since stored procedures are somewhat limited in functionality and ease of use.
[ November 21, 2005: Message edited by: Scott Selikoff ]
OracleJVM and Java Stored Procedures
Since Oracle8i, the Oracle database embeds a Java VM, which lets you run Java directly in the database. Java in the database is a response to customers in quest for portability, reuse and the ability to do things that cannot be done in PL/SQL (a lot of things!). Java can be migrated to/from middle-tier (J2EE, POJOS, JDBC) to the database (Java stored procedures) and vice versa. Other important benefits Java brings are the ability to just reuse, the huge Java class libraries produced over years by millions of developers; and also the pervasive Java skills.