Bookmark Topic Watch Topic
  • New Topic

Is it possible to have a store procedre that has PL/SQL code and can call a java obje

 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have written a translation object in java that takes a $en_var in and returns its path.

What I need to do is call that object from a PL/SQL store procedure. All the examples I have seen treat the store procedure as a wrapper around the java object.

But in my store procedure calling the object is only one part of the procedures role:

The store procedure code is :

CREATE OR REPLACE PROCEDURE WRITE_TO_FILE(in_file_name IN VARCHAR, in_en_var IN VARCHAR)

file_handleUTL_FILE.FILE_TYPE;
file_location VARCHAR2(50)

BEGIN

<I need to be able to call the javaobject translation here
translation.translatePath(in_en_vay)
file_handle := UTL_FILE.FOPEN(file_location, in_file_name, 'w');
dbms_output.put_line ('input file name opened file name' ||in_file_name ||'-->' ||in_file_location);


UTL_FILE.put_line(file_handle,'Hello Moto 4');
UTL_FILE.FCLOSE(file_handle);

END WRITE_TO_FILE;
/
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36031
432
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Locking the accidental duplicate post. See the other thread
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!