2

In my requirement need to Invoke java method or webservice while a record is insert or update in to a Table.

I am using Postgres (9.5) Database , How can I invoke the java method?

14
  • what is inserting a record into the DB? Commented Apr 4, 2018 at 7:12
  • I'm not sure "invoke the Java method" even makes sense, because Postgres does not run on a JVM. Postgres may have some extensions which can make an API call, but even then you'd be calling some Java webservice, and not Java directly. Commented Apr 4, 2018 at 7:14
  • So where is that "Java method" located? Is that exposed as a web service in an application server? Do you only have a JAR file? Commented Apr 4, 2018 at 7:14
  • Possible, but involves plenty of trickery: stackoverflow.com/questions/21632243/… Commented Apr 4, 2018 at 7:15
  • @TimBiegeleisen: well there is, PL/Java but that is not a road I would like to take. For one it's not actively maintained but more importantly it starts one JVM for every connection which is a huge overhead. Commented Apr 4, 2018 at 7:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.