Your best bet is the startup class that loads an XML file or Properties file. I 
recommend the former. A startup class does not have the restrictions that EJBs have.
As far as runtime adjustments, there is a JMX component in the log4J library that 
exposes Log4J objects. I have not used it, but the concept seems sound to me.
//Nicholas
 "Follender, Ivan (HBO)" <[EMAIL PROTECTED]> wrote:I want the properties easily 
accessible by the Application Server
administrator so they can dynamically modify the logging configuration.
This makes me want to have the log4j.properties outside of my deployed
EAR/JAR.

There still seems to be the problem of initialization, since for EJBs, there
is no good init() method for everything (unlike a servlet).

Thanks for the responses,
ivan.

-----Original Message-----
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 12:01 PM
To: Log4J Users List
Subject: Re: Log4J in EJBs


Hello Ivan,

Well, you shouldn't use File IO in an EJB app because you can't
guarantee that the file can be read off the filesystem. For instance,
the file could be served out of a jar file. However as long as you
get an InputSream or URL of your properties or XML file, then you are
fine. That means you can store your config file in a jar archive or
in a JNDI directory or wherever you want. That said, I've not done
too much with EJB, but, in theory, there is no problem in reading your
config in EJB's.

Jake

Tuesday, November 19, 2002, 10:47:07 AM, you wrote:

FIH> Hi-

FIH> I want to use Log4J in my EJBs.
FIH> The guidance I've been getting is that EJBs should not access system
files
FIH> (e.g. log4j.properties).

FIH> Is there a recommended mechanism for configuring the LogFactory for
EJBs?

FIH> Thanks,
FIH> ivan.

FIH>
============================================================================
==
FIH> This e-mail is intended only for the use of the addressees. Any
copying, forwarding, printing or other use of this e-mail by persons other
than the addressees is not authorized. This e-mail
FIH> may contain information that is privileged, confidential and exempt
from disclosure. If you are not the intended recipient, please notify us
immediately by return e-mail (including the original
FIH> message in your reply) and then delete and discard all copies of the
e-mail. Thank you.




FIH> --
FIH> To unsubscribe, e-mail:

FIH> For additional commands, e-mail:




-- 
Best regards,
Jacob mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 


==============================================================================
This e-mail is intended only for the use of the addressees. Any copying, forwarding, 
printing or other use of this e-mail by persons other than the addressees is not 
authorized. This e-mail may contain information that is privileged, confidential and 
exempt from disclosure. If you are not the intended recipient, please notify us 
immediately by return e-mail (including the original message in your reply) and then 
delete and discard all copies of the e-mail. Thank you.




--
To unsubscribe, e-mail: 
For additional commands, e-mail: 


Nicholas Whitehead
Home: (973) 377 9335
Cell: (201) 615 2716
Work: (212) 622 5639
[EMAIL PROTECTED]


---------------------------------
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site

Reply via email to