开发者

Java stored procedures as Java / .Net interop

I'm looking for a way to access a Java API from both a Java console application and an ASP.Net application.

In short my Java API exposes a series of methods for dealing with invoices. All of these methods are essentially commands e.g.

  • GenerateAllInvocies
  • GenerateInvoiceNumber
  • PrintAllInvoices
  • PrintInvoiceNumber

All methods will interact with the database. I had believed Web Services was going to be my means for interop. But I have since been made aware of Java Stored Procedures in Oracle.

I believe this means I could essentially treat my stored procs as an API and have the stored procs themselves call appropriate Java to write invoices to disk and to print the invoices开发者_如何学JAVA etc. However this feels slightly odd.

Has anyone out there every used Java stored procedures to provides interop between calling Java and .Net applications before? Any suggestions? Is this a really bad idea?

Thanks.


This would mean you would access the stored procedures via SQL. Given the nature of the calls (as deduced from the names) I find this very counter-intuitive, not to mention you'll tie yourself to oracle.

Why not expose the functionality via web services for the asp.net app and do the same for the command line java app or just access the calls directly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜