• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to load a Java application to Oracle DB

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
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.
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure what you mean by 'upload a java application to oracle'. Applications use databases, but databases don't often invoke applications directly. Sqlplus allows you to run command line utilities, so you could (although I haven't tried) invoke a java application in a sqlplus script.
 
Rudy Sam
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Scott,

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!
 
Scott Selikoff
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's no such thing as a java stored procedure, but there are such things as database stored procedures. They are written in a derivation of SQL called PLSQL/TSQL and supposed to be somewhat standard accross all database, although in general they have to be customized per database.

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 ]
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Um, there might be such a thing. Never tried it, just googled it:

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.


From: http://www.oracle.com/technology/tech/java/jsp/index.html
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you might have more luck getting an answer to your question at an Oracle site.
I remember Oracle once had a drive to be "300%" Java. That's not new math!
Just 100% Java on every tier...
 
I didn't like the taste of tongue and it didn't like the taste of me. I will now try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic