Laurent,

Have you considered attaching a SocketAppender to the root category? The 
SocketAppender will send its output to a SocketServer. The SocketServer can apply any 
logging policy with the LoggingEvents it receives. It can log to multiple files, log 
errors here and debugs there, print on the console, do filtering, whatever. The point 
is: if you can do it locally then you can do it with a SocketAppender/SocketServer 
combination. 

The JMSAppender/JMSSink offer the same functionality. Cheers, Ceki

At 10:28 21.02.2001 -0600, you wrote:
>Laurent Vanzeune wrote:
>
>> Hi,
>>
>> I know this question has already been asked some time ago but let me
>> insist. Are they any limitation/consideration using log4j in an EJB
>> environment ?
>
>The biggest problem is that unless you are using something like the
>JMSAppender (messaging) or JDBCAppender (database), you have a tough time
>using an EJB as a front-end to Log4J.  What I mean is this:  a majority
>of people who use log4j will log messages to a file.  You may have many
>different types of files, one for error, one for trace/debug, one for
>warning, etc.  But the point is, you are logging to a single error file,
>not multiple.  So how do you log an error to an error log file within
>EJB?  You really can't use an EJB bean as your logging mechanism because
>of two reasons: 1) EJBs does not support singletons and 2) the
>specification states that file I/O is not allowed from a EJB bean.  This
>includes any Java classes callable from an EJB bean.  Neither of these
>are hard and fast rules because various EJB vendors have work arounds to
>support singletons and I have yet to see a vendor actually prevent you
>from doing file I/O.  Personally, what I do is when I start a project is
>I build either a CORBA or RMI singleton service (depending on what is
>supported by the EJB application server) that front's my log4j
>implmentation.
>
>--
>Perry Hoekstra
>E-Commerce Architect
>Talent Software Services
>[EMAIL PROTECTED]
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

----
Ceki Gülcü          Web:   http://qos.ch      
av. de Rumine 5     email: [EMAIL PROTECTED] (preferred)
CH-1005 Lausanne           [EMAIL PROTECTED]
Switzerland         Tel: ++41 21 351 23 15


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

Reply via email to