setting third party jar in classpath while using oracle trigger
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开发者_Python百科 executing trigger. How can I do this?
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.
精彩评论