Description:
The ejbc task will run Weblogic's ejbc tool. This tool will take a serialized deployment descriptor, examine the various EJB interfaces and bean classes and then generate the required support classes necessary to deploy the bean in a Weblogic EJB container. This will include the RMI stubs and skeletons as well as the classes which implement the bean's home and remote interfaces.
The ant task which runs this tool is able to compile several beans in a single operation. The beans to be compiled are selected by including their serialized deployment descriptors. The standard ant include and exclude constructs can be used to select the deployment descriptors to be included.
Each descriptor is examined to determine whether the generated classes are out of date and need to be regenerated. The deployment descriptor is de-serialized to discover the home, remote and implementation classes. The corresponding source files are determined and checked to see their modification times. These times and the modification time of the serialized descriptor itself are compared with the modification time of the generated classes. If the generated classes are not present or are out of date, the ejbc tool is run to generate new versions.
Parameters
Attribute | Description | Required
|
---|---|---|
descriptors | This is the base directory from which the serialized deployment descriptors are selected. | Yes |
dest | The base directory where the generated classes, RIM stubs and RMI skeletons are written | Yes |
manifest | The name of a manifest file to be written. This manifest will contain an entry for each EJB processed | Yes |
src | The base directory of the source tree containing the source files of the home interface, remote interface and bean implementation classes. | Yes |
classpath | This classpath must include both the weblogic.ejbc class and the class files of the bean, home interface, remote interface, etc of the bean being processed. | No |
keepgenerated | Controls whether ejbc will keep the intermediate Java files used to build the class files. This can be useful when debugging. | No, defaults to false. |
Examples
<ejbc descriptors="${gen.classes}" src="${src.dir}" dest="${gen.classes}" manifest="${build.manifest}" classpath="${descriptorbuild.classpath}"> <include name="*.ser"/> </ejbc>