简体   繁体   English

从Oracle数据库调用批处理脚本/ Java代码

[英]invoking batch script/Java code from Oracle database

I have a requirment, of invoking a Java file from Oracle database. 我有一个从Oracle数据库调用Java文件的要求。 In my project, whole of my business logic is in database, but there is a requirement of invoking a third party system (SOAP / RMI call) from my application. 在我的项目中,我的整个业务逻辑都在数据库中,但是需要从我的应用程序中调用第三方系统(SOAP / RMI调用)。

Now for this i need to invoke atleast a Java Code or a batch script file (depending on Windows(.bat) Or Linux(.sh)). 现在,为此,我需要至少调用一个Java代码或批处理脚本文件(取决于Windows(.bat)或Linux(.sh))。

Thanks 谢谢

Try this page: http://www.cs.umbc.edu/portal/help/oracle8/java.815/a64686/04_call2.htm 尝试以下页面: http : //www.cs.umbc.edu/portal/help/oracle8/java.815/a64686/04_call2.htm

You can can Java-Code from your PL/SQL. 您可以从PL / SQL中使用Java代码。

Web-service call outs can be done from the Oracle Database. 可以从Oracle数据库进行Web服务调出 I'm not sure why you need to use Java for this as PL/SQL also allows for outbound calls using UTL_DBWS. 我不确定为什么要为此使用Java,因为PL / SQL还允许使用UTL_DBWS进行出站调用。

If you do not intend to use JPublisher, or you have a very simple web-service to consume, then you can use UTL_HTTP itself, or the appropriate class in Java - HttpURLConnection . 如果您不打算使用JPublisher,或者您要使用一个非常简单的Web服务,则可以使用UTL_HTTP本身或Java- HttpURLConnection中的适当类。 However, I've never seen any case where a JAX-RPC library or any other web-service library was loaded into the database using loadjava , and used to make web-service calls; 但是,我从未见过使用loadjava将JAX-RPC库或任何其他Web服务库加载到数据库中并用于进行Web服务调用的情况。 it ought to be possible do so, as long as the library is very light (in not depending on other libraries that cannot be loaded or used in the database), and requires permissions only to connect out from the database. 只要该库非常轻便(不依赖于无法在数据库中加载或使用的其他库),并且只需要从数据库连接出来的权限,就应该可以这样做。

Related question 相关问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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