Question

I am not allowed to compile the java class into the instance of Oracle we're running on, per architects request, so I am looking for alternatives. The requirement is to utilize a java library located on an application server on the network. Is it possible to call a java method located on another machine from PL/SQL? I found this article talking about external procedures in Oracle, but I'm not sure that it allows for this. As a side not, the performance would also have to be fast enough to be used in batch processing of thousands or millions of calls.

Was it helpful?

Solution

I suspect the best you can do is add entries to another table which your Java process polls to get each or batches of messages. Oracle is not really designed for message processing.

In any case, I would discuss this with your Architect what to do as he is the expert. ;)

If your Oracle system can't do the job, you may need to have a solution which doesn't use Oracle.

OTHER TIPS

You have three options:

1.) We solved a similar problem by making PL/SQL call HTTP using UTL_HTTP and then let the app-server call the java procedure. We did this to interface our Oracle Database with Oracle Reports. The PL/SQL fired an HTTP Request which was received by the app-server which called Java. The Java can call back PL/SQL via normal JDBC.

2.) You might not be able to load that java proc, but maybe you can create some other java stored procedure that can invoke it using RMI.

3.) AQ is another method. Basically you can Queue a message using AQ and use JMS on the App Server to Dequeue it and use it.

Option 3 would be the fastest, though we have tried option 1 and the latency for this is not as much as you might it. It also offers a way to do some parallel processing by running multiple requests in parallel.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top