I have set up a Postgres database server with PL/Java binary installed on it.
I have observed the process of getting an example PL/Java code to install and run on the database as it starts with moving the compiled .jar
file from application server to the database server, via file transfer, then call sqlj.install_jar('file::<path>', 'name', true);
to load the .jar
into the database server.
I am looking for a different way to load compiled PL/Java code without resorting to the file transfer method as explained above. I am looking through PL/Java documentation and it mentions that sqlj.install_jar
function also supports pulling a .jar
from web. Theoretically, I could get the application server to briefly spin up a HTTP file server to serve the .jar
file and invoke the sqlj.install_jar
to pull the .jar
from the ad-hoc webserver. However, this may be difficult if the hostname of the application server is not known (i.e. not localhost or behind firewall/private network).
However I am wondering if there are a better way to do it. I am looking for a way that allows the application server to directly push implementation inside .jar
using the existing connection to Postgres server without resorting to "hacks" explained above.
Does something like this already exists in PL/Java?