1

Topic: Synchronization of calls of exterior java-functions from pl-sql

Good afternoon.
On the Oracle server is  in which java-function which works with a disk is caused - copies a file from the first folder in the second. Then other java-function which copies this file from the second folder in the third is caused. The code about the such:

...
p_res: = fcopyfileto (p_fileNameSrc, p_fileNameDst1);
p_res: = fcopyfileto (p_fileNameDst1, p_fileNameDst2);
...

How to be assured what 2nd function invocation works precisely already then when fulfills 1st and the file  will be in Dst1?

2

Re: Synchronization of calls of exterior java-functions from pl-sql

0 wrote:

verter, what function returns?
If the positive result after copying - check it before the second call

p_res: = fcopyfileto (p_fileNameSrc, p_fileNameDst1);
if p_res = 1 then/*0 - function was fulfilled with an error, 1 - was fulfilled uspeshno*/
p_res: = fcopyfileto (p_fileNameDst1, p_fileNameDst2);
end if;

It is clear, but whether check of 1st p_res will mean, what oracle waits before to try to copy in 2nd time?

3

Re: Synchronization of calls of exterior java-functions from pl-sql

verter;
From repeated recopying the disk will not be wiped.

4

Re: Synchronization of calls of exterior java-functions from pl-sql

0 wrote:

it is passed...
will not wait.
sequentially will cause functions. (Whether though it is not enough that in them is available, the code after all is not presented)

Here in it that and a problem.
causes sequentially functions and if as a result of operation of the first the file had not time to correspond yet in Dst1, and Orakl already caused 2nd time  which tried to copy a file from Dst1, did not find out it there and fell out with an error?

5

Re: Synchronization of calls of exterior java-functions from pl-sql

How to force  to wait?

6

Re: Synchronization of calls of exterior java-functions from pl-sql

wrote:

it is passed...
If copying asynchronous, variants two:
1. To copy in both directories of assignment same initial a file, instead of a copy.
2. Copying can be led in a file with a temporal name, on termination of - to rename in target - this reception on 100 % relieves of attempts to process  a file.

Thanks! I will try.

7

Re: Synchronization of calls of exterior java-functions from pl-sql

verter wrote:

Good afternoon.
On the Oracle server is  in which java-function which works with a disk is caused - copies a file from the first folder in the second. Then other java-function which copies this file from the second folder in the third is caused. The code about the such:

...
p_res: = fcopyfileto (p_fileNameSrc, p_fileNameDst1);
p_res: = fcopyfileto (p_fileNameDst1, p_fileNameDst2);
...

How to be assured what 2nd function invocation works precisely already then when fulfills 1st and the file  will be in Dst1?

AQ
Propagation Features