logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <paul.sm...@lawlex.com.au>
Subject RE: EJB and Log4J
Date Wed, 07 Jan 2004 20:36:51 GMT
On Thu, 2004-01-08 at 03:59, Ken.Liu@bmwna.com wrote:
> It's a design issue - EJB components are intended to represent business
> objects or processes, and writing to the file system (directly) shouldn't be
> their responsibility, in theory.  However, in practice, logging is a common
> concern of code in general so it's common practice to write to logs from
> EJBs.
> 
> Furthermore, I believe the intent of that part of the spec is to partially
> maximize portability of your EJBs.  Theoretically, your beans should be able
> to run in a container that doesn't have access to the filesystem (or perhaps
> is running on a system without a real filesystem).  However, in practice
> this is rarely the case.  
> 
> It shouldn't cause any problems, but use your best judgment.

I agree, and given that the choice of appender is done at runtime (or at
configuration/deployment time), you can safely choose any appender you
want that suits the particular environment the bean is running within.

cheers,

Paul Smith


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message