On Thu, 5 Feb 2004, Gary wrote:

> Unfortunately, the factory class won't work until the
> following change is made in RowReaderDefaultImpl:
> 
> Change:
> // 1. create an empty Object by calling the no-parms
> factory method
>                 result =
> targetClassDescriptor.getFactoryMethod().invoke(null,
> null);
> 
> 
> To:
> // 1. create an empty Object by calling the no-parms
> factory method
>                          Object obj =
> targetClassDescriptor.getFactoryClass().newInstance();
>                          result =
> targetClassDescriptor.getFactoryMethod().invoke(obj,
> null);

I guess you missed the intention of factory-class. You specify a class
(not necessarily the persistent class) which contains a no-arg static(!)
method.
Usually you would have a class MyObjectFactory that contains a static
function:

public static MyObject createMyObject()
{
  // create a new object here and return it
}
 
Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to