Thread: - trigger/function & java methods

- trigger/function & java methods

From
""
Date:

Hi All,
         I would like to know how to call a java method from sql trigger code or a function.

Thanks,
Sarathi.





_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!

Re: - trigger/function & java methods

From
Paul Thomas
Date:
On 15/08/2003 16:37 sarathi@excite.com wrote:
>
>
> Hi All,
>          I would like to know how to call a java method from sql trigger
> code or a function.


I'm no expert on this (in fact, I try to avoid using SPs as it embeds
business logic within the database - not nice) but the only way I can that
you could currently do this would be to write a C function which spawns a
JVM and executes your class. I'm confident that you're a sufficiently
experienced developer to instantly realize that this would almost
certainly bring the server to its knees :-(

That said, I'm curious about why you want to call a Java SP (other than
you can't implement some essential function without resorting to SPs and
you don't have time to learn a new language..).
rgds

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+