When you deploy enterprise beans, you can run the DB2® SQLJ profile customizer indirectly by using an Ant script that is generated as a result of running the ejbdeploy command against the EAR file.
However, before you run the Ant script, you must perform the following steps:
ant -Dwork.dir=tmp -buildfile out.ear.xml
The script creates and uses a directory called tmp as its working directory.
To have the script use a different property file, set the script.property.file property when you run the script, for example:ant -Dwork.dir=tmp -Dscript.property.file=other.properties -buildfile out.ear.xml
You must modify these names to ensure that the name for each customization profile does not conflict with an existing package name in the database. Ant scripts generated for different EAR files will use the same package names, and will overwrite each other's packages unless the names are changed, which will cause problems at run time.
The Ant script defines a global property for the database URL (db.url). The DB2 SQLJ profile customizer uses a JDBC type 4 URL, for example:
jdbc:db2://<host-name>:<port>/<database-name>
This global property, defined as db.user, is required.
This global property, defined as db.password, is required.
The port will be 50000, unless you changed it when you installed DB2.
You can now run the Ant script.