Yes, permgen space needs to be increased with this. Sorry, I mis-understood your objection as a performance related to speed of the newInstance() vs more classes.
Marc Morin Emforium Group Inc. ALL-IN Software 519-772-6824 ext 201 [email protected] ----- Original Message ----- > On 12/10/2010 06:37 PM, Marc Morin wrote: > > The facade doesn't instantiate more objects than current, but the > > class hierarchy is taller. (ie. when GenericValue.makeValue() > > currently instantiates a GenericValue(), that factory would then > > instantiate a class based on the entity name, that derives from > > GenericValue()). > > A class based on GenericValue(even one generated dynamically at > runtime, into a custom classloader), is still a class. Said class is > not loaded on the heap. It's bytecode is placed into permgen. More > classes would increase permgen pressure.
