Configuration scripts allow you to automate the creation and deployment of CORBA components. For a description of the Ant configuration mechanism used in EAServer, see Chapter 2, “Ant-Based Configuration,” in the Automated Configuration Guide.
The sample script below defines a configure target that shows the commands required to define and configure a CORBA package and component.
<?xml version="1.0"?> <project name="cpptut" default="configure"> <import file="${djc.home}/config/ant-config-tasks.xml"/> <property name="package.name" value="packageName" /> <target name="configure"> <setProperties package="${package.name}"> <property name="com.sybase.jaguar.package.roles" value=""/> </setProperties> <setProperties component="${package.name}/compName"> <property name="propName" value="propValue"/> ... </setProperties> <jaguarJarCompiler package="${package.name}"/> </target> </project>
The example defines the CORBA package name as the top-level
Ant property package.name. Since the package
name appears several places in the script, it is convenient to define
it in one place and reference the property with the Ant syntax ${package.name}
.
Inside the configure target, the script runs these commands:
The first setProperties command creates and configures the CORBA package. Any modifications to the default package properties must be made with nested property commands in this command. See “CORBA package property descriptions”.
For each component in the package, an additional setProperties command creates and configures the component. To ensure EAServer creates the component in the intended package, the value of the component attribute for the setProperties command must use the syntax:
package/component
Where package is the CORBA package name, and component is the component name as it should display in the Management Console and output from configuration and status commands.
Use nested property commands to configure the component properties. See “CORBA component property descriptions”.
The jaguarJarCompiler command generates the EJB wrapper components and other code required to run the components in the server.