Set the run time for deferred create with JVM arguments
Overview
The specification for EJB 2.x states that for Container Managed Persistence (CMP) during the ejbCreate, the container can create the representation of the entity in the database immediately, or defer it to a later time. When you choose the defer option, the runtime defers ejbCreate (or the equivalent database persistence request) until it is needed. This can be at the end of the transaction, or when a flush is needed for finders related to this EJB type. By doing this one can reduce two round trips for the newly created entity (insert and update) to one (insert).
Procedure
- Open the administrative console.
- Select Servers.
- Select Application Servers.
- Select the server you want to configure.
- In the Additional Properties area, select Process Definition.
- In the Additional Properties area, select Java Virtual Machine.
- Update the Generic JVM arguments with -Dcom.ibm.ws.pm.deferredcreate=true.