A deployment descriptor allows you to include in a JAR file the SQL statements for creating and dropping the UDRs. Both sqlj.install_jar() and sqlj.remove_jar() take parameters that, when set appropriately, cause the procedure to search for deployment descriptor files in the JAR file.
You can include the following SQL statements in a deployment descriptor:
When you execute sqlj.install_jar() or sqlj.remove_jar(), the database server automatically performs the actions described by any deployment-descriptor files that exist in the JAR file.
For example, you might prepare a file, deploy.txt, that includes the following statements:
SQLActions[] = {
"BEGIN INSTALL
CREATE PROCEDURE showusers()
WITH (class='jvp')
EXTERNAL NAME 'thisjar:admin.showusers()'
LANGUAGE JAVA;
GRANT EXECUTE ON PROCEDURE showusers() to informix;
END INSTALL",
"BEGIN REMOVE
DROP PROCEDURE showusers();
END REMOVE"
For details on deployment-descriptor files, refer to the SQLJ: SQL Routines specification.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]