Programming WebLogic Enterprise JavaBeans
| 
 | 
The 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. 
The appc tool offers the following benefits:
Previously, 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 (jspc or ejbc) to prepare the module for deployment. appc automates this process and makes additional pre-deployment validation checks not previously possible.
appc produces.If an error occurs while running appc from the command line, appc exits with an error message.
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.
appc prior to deployment, you potentially reduce the number of time a bean is compiled. Use the following syntax to run appc:
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> stanza of application.xml. 
You can use <alt-dd> to specify an alternate deployment descriptor only for the J2EE deployment descriptors, web.xml and ejb-jar.xml. As of WebLogic Server 8.1 SP01, if you specify an alternative deployment descriptor for a module in alt-dd, appc will compile it using the EJB using the alternative descriptor file.
For more information about the <alt-dd> element, see module in Developing WebLogic Server Applications.
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:
altappdd <file>—Use this option to specify the full path and file name of an alternative J2EE deployment descriptor file, application.xml. -altwlsappdd <file>—Use this option to specify the full path and file name of an alternative WebLogic application deployment descriptor., weblogic-application.xmlTable C-1 lists appc command line options
Table C-1 appc Command Line Options
| 
			
 Designates an alternative J2EE application deployment descriptor.  | 
	|
| 
			
 Designates an alternative WebLogic Server application deployment descriptor.  | 
	|
| 
			
 Does not include deployment descriptors in client JARs generated for EJBs.  | 
	|
| 
			
 Attempts to update deployment descriptors to the latest version.  | 
	|
| 
			
 Forces generation of EJB and JSP classes. Without this flag, the classes will not be regenerated unless a checksum indicates that it is necessary.  | 
	|
| 
			
 Specifies the directory where IDL files will be created (default: target directory or JAR)  | 
	|
| 
			
 Specifies the method signatures used to trigger IDL code generation.  | 
	|
| 
			
 Does not generate abstract interfaces and methods/attributes that contain them.  | 
	|
| 
			
 Does not generate valuetypes and the methods/attributes that contain them.  | 
	|
| 
			
 Specifies the directory where IIOP stub files will be written (default: target directory or JAR)  | 
	|
| 
			
 Used in conjunction with remote-client-timeout.  | 
	|
| 
			
 Adds line numbers to generated class files to aid in debugging.  | 
	|
| 
			
 Specifies an alternate output archive or directory. If not set, the output is placed in the source archive or directory.  | 
	|
weblogic.appc performs the following EJB-related functions:
ejb-jar.xml, appc verifies that the column is mapped in the weblogic-cmp-rdbms.xml deployment descriptor.By default, appc uses 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 Configuring Compiler Options.
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.
Note:	 ejbc is deprecated. Use appc instead. See appc.
Use the weblogic.ejbc tool for generating and compiling EJB container classes. If you compile JAR files for deployment into the EJB container, you must use weblogic.ejbc to generate the container classes. 
weblogic.ejbc does the following:
Note:	 ejbc accepts both JAR files and exploded directories as input.
If you specify an output JAR file, ejbc places all generated files into the JAR file.
By default, ejbc uses javac as a compiler. For faster performance, specify a different compiler (such as Symantec's sj) using the -compiler flag or via the Administration Console. See Configuring Compiler Options.
Although versions of the WebLogic-specific XML deployment descriptor files are published on or web site for your convenience, an internal version is shipped with the product for use by weblogic.ejbc. 
For the location of the public version of weblogic-ejb-jar.xml and weblogic-cmp-jar.xml, see Document Type Definitions and DOCTYPE Header Information.
The ejbc tool offers the following benefits:
ejbc produces.If an error occurs while running ejbc from the command line, ejbc exits with an error message.
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.
ejbc prior to deployment, you potentially reduce the number of time a bean is compiled. prompt> java weblogic.ejbc [options] <source directory or jar file>
<target directory or jar file>
Note: If you output to a JAR file, the output JAR name must be different from the input JAR name.
| 
			
 Does not include deployment descriptors in client JARs generated for EJBs.  | 
	|
| 
			
 Specifies a configured execute queue that the EJB should use for obtaining execute threads in WebLogic Server. For more information, see Using Execute Queues to Control Thread Usage.  | 
	|
| 
			
 Forces generation of EJB classes. Without this flag, the classes may not be regenerated (if determined to be unnecessary).  | 
	|
| 
			
 Generates CORBA Interface Definition Language for remote interfaces.  | 
	|
| 
			
 Does not generate valuetypes and the methods/attributes that contain them.  | 
	|
| 
			
 Specifies the directory where   | 
	|
| 
			
 Specifies the method signatures used to trigger IDL code generation.  | 
	|
| 
			
 Specifies the directory where IIOP stub files will be written (default: target directory or JAR)  | 
	|
| 
			
 Used in conjunction with remote-client-timeout.  | 
	|
| 
			
 Specifies the heap size for   | 
	|
| 
			
 Saves the intermediate Java files generated during compilation.  | 
	|
| 
			
 Passed through to Symantec's java compiler,   | 
	|
| 
			
 Sets a CLASSPATH used during compilation. This augments the system or shell CLASSPATH.  | 
	|
| 
			
 Attempts to update deployment descriptors to the latest version.  | 
	
| 
			 | 
		
			 |