File permissions Enterprise Integrator

(sorry for the cross-post btw because I also sent this to “Troubleshooting”)

Hello,

Using the Enterprise Integrator (EI) (inplemented by JDEdwards), I run into a problem regarding file permissions.

Let me first describe the situation:

I have a directory in which some data file always exists. However, I may only read from it when a so-called lock file is put into the directory. (Yes, this is a weird way to do locking, but we have to comply to it).

So, I use the File Poll to check the directory. Obviously, it will see the data file each time, so I perform a check on the filename, and, if it’s the lockfile, we read the datafile. Otherwise, we leave the datafile alone.

Now comes the problem: the lockfile must be deleted ater the reading of the data file, so that the other party can write to the datafile again. I want to do that through a Custom Code block.

Now the problem is that the IOadapter throws a Java file permission exception as soon as I touch the directory. I may not even call “if (file.exists ())”. It looks to me that EI is making itself a “sandbox” because by default a Java-application
has access to it’s host filesystem. Modifying the .policy file does not help,
neither does the documentation tell us about it.

So, my first question is: may a Custom Code block access a filesystem (the shipped operations like the File Poll may), and if yes, how can this be accomplished?

Thanks in advance,

Patrick.

Yes, your custom code can access the file system, however you must go to the adapter that the respective integration component belongs to and UN-CHECK the Enable Script Security property on the Java tab.

Hello,

it works now. Thanks alot!

Patrick.