简体   繁体   中英

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 eg

  • 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 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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