ObjectFactory is an abstraction from XWork2 responsible for all the creation of XWork2 related objects. Its how XWork2 integrate with IoC containers like Spring, Pico, Plexus etc.

Customization

To customize an ObjectFactory, you will need to create a subclass of ObjectFactory, then tell XWork to use it in the configuration.  To configure your ObjectFactory in xwork.xml, declare your custom ObjectFactory implementation:

<bean name="default" type="com.opensymphony.xwork2.ObjectFactory" class="com.mycompany.MyObjectFactory" />

Now, XWork will use your ObjectFactory instead of the default implementation.