Skip Headers

# Configuring Instantiation Policy

Previous

Next

The TopLink runtime instantiates new instances of a class according to the instantiation policy you configure on the class's descriptor.

Table: Descriptor Support for Instantiation Policy summarizes which descriptors support an instantiation policy.

Descriptor Support for Instantiation Policy

Descriptor | Using TopLink Workbench | Using Java
--- | --- | ---
Relational Descriptors |  |
Object-Relational Descriptors |  |
EIS Descriptors |  |
XML Descriptors |  |

You can specify one of the following types of instantiation policy:

- Default: TopLink creates a new instance of a class by calling the class's default constructor.

- Method: TopLink creates a new instance of a class by calling a public static method that you define on the class descriptor.

- Factory: TopLink creates a new instance of a class by calling the appropriate methods on a separate class that you implement according to the Factory design pattern.