Embedding configuration scripts in J2EE archives

You can embed user configuration scripts in J2EE archives to automate post-deployment configuration. When you deploy the archive to EAServer, EAServer copies the script into the installation as a user configuration script. If present, the deploy-user, configure-user, and recompile-user targets execute after deployment. The undeploy-user target executes when you undeploy the module.

Place the configuration file in the archive’s META-INF subdirectory, using the file name that matches the archive type, as listed in the second column of Table 2-3.

Table 2-3: File names for Sybase configuration files in J2EE archives

Archive type

File name in archive

J2EE application

sybase-application-config.xml

EJB JAR

sybase-ejbjar-config.xml

Web application

sybase-webapp-config.xml

J2EE application client

sybase-client-config.xml

Connector

sybase-connector-config.xml

After deployment, EAServer copies the configuration file to the config subdirectory of the EAServer installation, and renames it using the standard naming scheme for user configuration files–see Table 2-2.