Tom:

Thanks for your help.

I originally added the factory creation code.  At the
time, I didn't realize I'd need a non-static method.

The problem is that I have an abstract Factory class
with an object creation method called something like
newBusinessObjectInstance().  The abstract Factory
class also has an abstract method defined called
something like getBusinessObjectClass().  This latter
method is implemented by the concrete factory
subclasses (along with other methods), to let the
abstract newBusinessObjectInstance() know what class
to create.

Since abstract methods cannot be static, I need to get
an instance of the concrete Factory subclass.

Clear as mud?

Gary

--- Thomas Dudziak <[EMAIL PROTECTED]> wrote:
> On Thu, 5 Feb 2004, Gary wrote:
> 
> > I need the factory method to be non-static.  Any
> > reason why the code can't be changed as shown
> below? 
> > I could first check for a static method, and then
> try
> > to find an instance method if necessary.
> 
> In OJB you basically have two options for object
> creation:
> 
> 1)
> 
> Use the factory pattern with a factory class having
> a static
> no-arg creation method.
> 
> 2)
> 
> Have a (private) no-arg constructor, and optionally,
> use 
> initialization-method to specify an instance method
> (again no-arg) that is
> called right after the object has been created, to
> initialize the
> object. (This initialization method can also be used
> with the above
> strategy).
> 
> If these won't suffice for you, then could you
> please give some more
> details on what your particular scenario is (e.g. in
> pseudo code) ?
> 
> Tom
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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

Reply via email to