Hi..
I see no advantage of using abstract factory patern in your case,except if
you need to create different types of logger for different purposes(which is
not likely  the case).  Singleton is the proper one, since you only need
single object to do the logging for the whole application. When you
implement your logger as a singleton, you should synchronize the call to the
getInstance method. Another issue, for the network bw consideration, when
you declare the logger in a class, you might need to use the "transient"
keyword in your declaration, so that the logger object wont be the
transmitted over with the other class components(it doesnt necessary to do
so), when the class is used/called.


rgds

beN

-----Original Message-----
From: Murali Mohan [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 1:45 PM
Subject: Logger singleton or abstractpattern method


Hi I am using  Singleton Pattern for Logger object.

is it better or using  Factory for  Logger????????
If I use factory  it creats somany objects.

Thanks,
Murali

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to