You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Amarnath <am...@yahoo.com> on 2001/05/09 15:22:07 UTC

Re: EJB/SERVLET QUESTION

hi kurt,

can u tell me the configurations that u've mentioned below.... if possible
pls. send me some exmaples.. coz, i'm trying the part u've mentioned...

thanks in advance...

cheers,
amar
_____________________________________ Amarnath P " try agian and again till
you get SUCCEEDED"
----- Original Message -----
From: "Kurt Walz" <ku...@proveo.de>
To: <lo...@jakarta.apache.org>
Sent: Monday, April 30, 2001 5:38 PM
Subject: Re: EJB/SERVLET QUESTION


> 28.04.2001 15:49:27, "Michael Robkin" <mr...@hbsrx.com> wrote:
>
> >Could we use Log4J inside EJB and Servlet?  Where should we put the log4j
> >configuration file on the Java Applicaiton Server?  Could we log
information
> >into a flat file from EJB?  Is there an example avaliable?
>
> Hi
>       you ask a lot of questions.
>
> 1. file, config-file
>
> The ejb-spec is not very clear on this topic. It states, never to do ANY
file-access from any ejBean.
> And says: leave file-access to the ejbContainer.
>
> But it does not state, whether a helper-class of the beans should avoid
reading files.
>
> The preferred way the ejb-spec points us (as far as I understand):
>
> Make a properties-file available for the ejbContainer (as resource),
define a logical name of this resource in the xml-files(s) (i.e. in the
deploymentDescriptor),
> now, inside the container, any object, even an ejBean, can ask for this
resource and gets it as List-of-Property-objects.
>
> So I think, best would be to have a (static) class that does the
following:
>
> instantiate a log4j-BasicConfigurator,
> purchase the properties from the resource (mentioned above),
> set programmatically the behavior-flags of log4j, according to the
properties.
>
> Could  Category.setResourceBundle()  do part of that latter job?
>
>
> 2. logging to a flat file
>
> works currently, but I think it is not compliant to the ejb-spec, and
might not work in future ejbContainers?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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