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: RMI from Java stored procedures

Re: RMI from Java stored procedures

From: Rolf Garske <garske_at_ibm.net>
Date: Sun, 05 Sep 1999 22:34:55 +0200 (ECS )
Message-ID: <tnefxrvozarg.fhm9u73.pminews@news3.ibm.net>


Been there, done that.

ON DB2, I simply create a trigger, which calls a Java written UDF (User Defined Function). It's similar to a stored Procedure, but the difference is that it can't do any SQL. If you wish to send any database contents, you would have to pass it as parameters to the UDF.

You would put your remote object stubs in a subdirectory of x:\sqllib\function, which is where you put the UDF class too.

I could give you a working code sample, but I have the code at work. Reply by mail if you are interested.

On Sat, 4 Sep 1999 00:30:01 -0400, Sanjay Garg wrote:

:>Is their a similar solution for JDBC application to receive message from
:>DB2 database too.
:>Appreciate any input. Thanks.
:>Sanjay
:>
:>doeni_at_evhr.net wrote in message ...
:>>
:>>This way is a bit trick.
:>>Don't forget that RMI is 100% pure java. Unless your C program calls
:>another
:>>Java program that in turn makes the RMI call.
:>>
:>>The simplest solution would probably be to use JDBC with the DBMS_PIPE
:>>package. The JDBC application receives the message through the pipe, and
:>> makes the RMI call.
:>>
:>>"C. Ferguson" <c_ferguson_at_rationalconcepts.com> writes:
:>>
:>>> Hi Joe,
:>>> maybe database trigger to external procedure to c routine that makes
:>the
:>>> socket connection to remote method? In 8.0.4 you can use pipes to get to
:>a c
:>>> method, or use the external procedure mechanism to make the c call which
:>can
:>>> then talk to the java process. I haven't done c to java, so you'll have
:>to do
:>>> some digging...
:>>> just some ideas.
:>>>
:>>> regards,
:>>> Cindy
:>>>
:>>> Joe Varghese wrote:
:>>>
:>>> > >
:>>> > >From 8.1.5 on, you can write stored procedures in Java.
:>>> > >You can also use the database as an EJB Server where you deploy your
:>>> > >Enterprise JavaBeans, or use the ORB inside of the DB to call CORBA
:>>> > >server objects.
:>>> > >
:>>> >
:>>> > thanks for the pointers. Unfortunately, I release I cannot use Java
:>stored
:>>> > procedures, as our database is 8.0.4 :(
:>>> >
:>>> > Do you (or anyone else) have other ideas? Again, the basic idea is to
:>call a
:>>> > Java RMI whenever the database has been updated ....
:>>> >
:>>> > Thanks
:>>> >
:>>> > joe
:>>>
:>>>
:>>
:>>--
:>>The fundamental aim of King Crimson is to organize anarchy, to utilize
:>> the latent power of chaos and to allow the varying influences to
:>> interact and find their own equilibrium.
:>> -Robert Fripp
:>
:>



Phone: +49 211 6914777 Mobile Phone: +49 172 2117822 Fax: +49 211 6914778 Email: garske_at_ibm.net CompuServe: 100023,3324 PGP Key on Request Received on Sun Sep 05 1999 - 15:34:55 CDT

Original text of this message

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