The <persistentObject> and <persistentField> Ant task configure the object-relational mapping for the entity beans. For each entity bean, <persistentObject> commands specify the data source to use, which table is queried, and other settings such as caching options and transaction isolation level. For each container-managed field, <persistentField> maps fields to database table columns.
For example:
<target name="configure-user"> <setProperties component="ejb.components.example.CustomerInventory"> <persistentObject table="cust_inv" isolationLevel="RepeatableRead" dataSource=”myDB” /> <persistentField field="id" column="c_id" /> <persistentField field="name" column="c_name" maxLength="40" /> </setProperties> </target>
Many optimizations require you to modify or add parameters in the <persistentObject> invocations.