简体   繁体   中英

Running a java program or service from oracle 11.2

I have to write a java file watcher service that monitors a set of registered files. And the file watcher need to be run as a process or service in oracle. I know there is an Oracle file watcher that can be used, but i want to know if its possible to run a java program as a process from oracle.

I'm quite new to Oracle and pl/sql. I was able to call java methods (stored procedures) from oracle, all the calls are stateless, where as in the file watcher service i need to add register new files and remove files from the service.

is this possible to be executed in oracle? has anyone tried anything like this before.

Many thanks

Use WatchService :

A watch service that watches registered objects for changes and events. For example a file manager may use a watch service to monitor a directory for changes so that it can update its display of the list of files when files are created or deleted.

Theoretically something like this can be possible, but I do not believe that pros will overweight cons. Also it will be quite hard to find any examples. Some specific features of Oracle Database JVM are described here:

Threading in Oracle Database

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM