English 中文(简体)
从Oracle存储程序到Java的数据
原标题:passing data from Oracle stored procedures to Java

我们再为基于Oracle数据库的大型系统撰写新的网络接口。 所有业务规则都已编入PL/SQL的存储程序,我们希望尽可能重用代码。 我们撰写了一些新的储存程序,将现有业务规则与最后结果数据集结合起来。

We want to do this on the database level to avoid java-db round trips. The interface layer will be written in Java (we d like to use GWT), so we need a way of passing data from Oracle stored procedures to Java service side. The data can be e.g. a set of properties of a specific item or a list of items fulfilling certain criteria. Would anyone recommend a preferable way of doing this?

www.un.org/Depts/DGACM/index_spanish.htm 我们重新审议了以下两种情景之一:

  • passing objects and lists of objects (DB object types defined on the schema level)

  • 页: 1

我们核实,这两种方法都是“可行的”,问题更多地涉及设计决定、最佳做法、可能的维护问题、灵活性等。

我感谢任何方面。

问题回答

我建议与一位精通的钥匙(由java devs 和 pl/sql 开发商在双方商定)。 将来更便于推广,你可以很容易地将回购者改成黑色地图,然后用一刀切的美术把 has图改成一个POJO。 Im公司正在实施一项大型电信项目,对这一问题采取许多办法,而后台公司似乎在当天最合适。

过去,我与传统的<代码>JDBC呼唤性声明>/代码”完全相同,没有任何不一致或维护问题。 post。 另见rel=“nofollow noreferer”>example 。 如果你已经不熟悉储存程序和可要求申报的工作方式。

It s been a while since I ve done something like that, but the way I remember is that you need to define a view that calls your stored procedure, and you can then easily read the result sets from within java, with the OR-mapper of your choice.

因此,这似乎与你的设想1非常接近,这在我的经验中从未造成过任何问题。

需要谨慎的是处理交易: 如果您所储存的程序书写数据,而且你在 JavaE交易中称其中几个,你可能会陷入数据不一致的情况。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签