In my previous
article
I
described how to send notifications from MS SQL server with the help of
extended stored procedure "xp_event".
However as you can imagine, it is not so
simple to perform this operation on Oracle. I know that Oracle has a
close relationship with Java
language. Thus I implemented my solution
in java source code which is very easy to load into Oracle database.
You can call Java methods
from PL/SQL after publishing them via
PL/SQL wrapper.
Class
OracleAlerter has three methods: send_alert, intToByteArray and
swapInt. The last two methods are needed for compatibility with
applications written in C++ or any other
high level languages. Java virtual machine always uses a
big-endian byte order, but applications with
which you communicate may be not java applications
and use a little-endian byte order. In this case you have to use
these methods for converting
byte order for a record id value.