views:

40

answers:

2

I've got an Oracle 10g database, and I have a third-party jar file(MQ jars). I want to be able to run a trigger in my database that ultimately runs code in store procedure to operate MQ series and sending messages. . I can't figure out how to specify a classpath for my jar file that will be recognized when I am executing trigger. How can I do this?

A: 

Your answer is here in stackoverflow which discusses loading jars into the database.

jowierun
A: 

You can use loadjava (or dbms_java.loadjava) to load classes or JARs into the database; but for a third party JAR that seems unwieldy. If it's your database then you may be able to set the CLASSPATH to include the external files before starting the database. I don't think your user session CLASSPATH or any other environment variable (for whoever is taking the action that causes the trigger to fire) will ever have any effect, not least for security reasons - you don't want a user to be able to subvert the expected action by substituting their own Java code.

Alex Poole