The 'new' Creator
The new creator is declared by default by DWR as follows:
<creator id="new" class="org.directwebremoting.create.NewCreator"/> You don't need to add this line to your dwr.xml because it is already in DWR's internal dwr.xml file.
This creator will create an instance of a class using the default constructor. There are several benefits to using the 'new' creator:
- Security: The shorter lived the objects created by DWR are the less chance that they can be exploited by loading them up with invalid values in one call and then the invalid values fired at something that wasn't expecting it in another.
- Low memory overhead: If you have a site with many users, then you don't run as high of a risk of running out of VM memory.
You allow DWR to use the new creator to create and remote your beans as follows: