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: java stored procedures fast, but slow when called as SQL function

Re: java stored procedures fast, but slow when called as SQL function

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Wed, 9 Apr 2003 14:47:56 -0700
Message-ID: <dE0la.17$PD5.131@news.oracle.com>


"Richard Kuhler" <noone_at_nowhere.com> wrote in message news:me_ka.34082$Hx.26505659_at_twister.socal.rr.com...
> > The writing is on the wall: beans and all the other
> > J2EE stuff have been removed from the db JVM. Only basic
> > Java functionality is still there.
> > Largely for the benefit of those who have written a lot
> > with it. And of those things that just cannot possibly
> > be done with PL/SQL. Like sending e-mails from the db! ;)
>
> I'm wondering if that winking emoticon is because you know this isn't
> true. You can send emails with UTL_SMTP including attachments using
> UTL_ENCODE. The number of things you can't do directly from PL/SQL
> seems to dwindle every day. That's a sure sign Oracle is going to get
> rid of it. ;)

Java is simply not a language that has been designed with RDBMS integration in mind. When I want to write a simple function that is called from SQL, why I do I have to wrap it into a stupid class? What the scope of all those java references are? Why connection object is necessary -- java in DBMS is supposed to have implicit connection?

Next, the impedance mismatch between java primitive types and SQL datatypes is just ridiculous. If they want to integrate java and RDBMS, then RDBMS must be able storing int, double and String datatypes natively. No more stupid 4000 bytes restriction. No more CLOB vs VARCHAR2. Then, complex java object must map automatically into oracle object. Until this mapping implemented it is fair to say that using java within dbms is more pain then gain.

RDBMS is a SQL execution engine, nothing more or less. It is OK to make this engine more sophisticated by adding SQL features and improving PL/SQL procedural language that directly supports SQL. It is not OK to add a foreign junk -- like XML, Java, Java Beans or other spaghetti -- into the engine, especially on low C level, because it's jeopardizing vital RDBMS functions. How many people are fed up with nuisances like corrupted DBMS_JAVA package causing oracle to fail on startup already? Received on Wed Apr 09 2003 - 16:47:56 CDT

Original text of this message

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