appc compiler generates and compiles the classes needed to deploy EJBs and JSPs to WebLogic Server. It also validates the deployment descriptors for compliance with the current specifications at both the individual module level and the application level. The application-level checks include checks between the application-level deployment descriptors and the individual modules as well as validation checks across the modules.
If you are compiling an application that contains Kodo persistence units, the
appc complier also runs the Kodo enhancer. The Kodo enhancer performs post-processing of the bytecode generated by the Java compiler, adding the necessary fields and methods to implement the required persistence features. This bytecode modification perfectly preserves the line numbers in stack traces and is compatible with Java debuggers. For more information about using Kodo, see in Programming WebLogic Enterprise JavaBean, Version 3.0.
appc tool offers the following benefits:
Without appc, a user wanting to compile all modules within an EAR file had to extract the individual components of an EAR and manually execute the appropriate compiler (
ejbc) to prepare the module for deployment.
appc automates this process and makes additional pre-deployment validation checks not previously possible.
By contrast, if you defer compilation to the time of deployment and a compilation error occurs, the server fails the deployment and goes on with its work. To determine why deployment failed, you must examine the server output, fix the problem and then redeploy.
appcprior to deployment, you potentially reduce the number of time a bean is compiled.
For example, if you deploy a JAR file to a cluster of 3 servers, the JAR file is copied to each of the three servers for deployment. If the JAR
Use the following syntax to run
prompt>java weblogic.appc [options] <ear, jar, or war file or directory>
J2EE allows you to designate an alternative J2EE deployment descriptor for an EJB or Web application module, using the <
alt-dd> element in the
<module> element of
You can use <
alt-dd> to specify an alternate deployment descriptor only for the J2EE deployment descriptors,
ejb-jar.xml. As of WebLogic Server 8.1 SP01, if you specify an alternative deployment descriptor for a module in
appc will compile the EJB using the alternative descriptor file.
For more information about the <
alt-dd> element, see “module” in in Developing Applications with WebLogic Server.
In WebLogic Server 8.1 SP01and later, you can use
appc command line options to designate alternative J2EE and WebLogic Server deployment descriptors for an application, as shown below:
>—Use this option to specify the full path and file name of an alternative J2EE deployment descriptor file,
>—Use this option to specify the full path and file name of an alternative WebLogic application deployment descriptor,
Table D-1 lists
appc command line options.
Comma-separated list of libraries. Each library may optionally set its name and versions, if not already set in its manifest, with the syntax:
weblogic.appc performs the following EJB-related functions:
appcverifies that the column is mapped in the
javac as a compiler. For faster performance, specify a different compiler (such as Symantec’s
sj) using the command-line
-compiler flag or via the Administration Console. See .
For the location of the public version of
weblogic-ejb-jar.xml, see weblogic-ejb-jar.xml Deployment Descriptor Reference. For the location of the public version of
weblogic-cmp-jar.xml, see weblogic-cmp-jar.xml Deployment Descriptor Reference.