I took a different spin on option #2.  I have a logging.ear file which is
deployed into the app server.  It is made up of a "JMS-listening"
MessageDrivenBean a singleton for processing the incoming JMS messages and a
servlet for administrating/viewing log files.  The singleton does some
separate processing to get the various messages into appropriate files
specifically so the files do not become huge.

And the beauty of using the JMS approach is that all of our apps can log to
the same central place (and thus all file can be checked at one place).
Plus it provides the de-coupling you mention in option #3.




----- Original Message -----
From: "Reg Sherwood" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Friday, February 22, 2002 9:28 AM
Subject: Re: log4j and weblogic 6.1


> Hi,
>
> I have been investigating using log4j within the J2EE environment.  I can
> get the log4j package to work, but I cannot do the following:  For
> discussion purposes I want to setup my various applications within the App
> Server (in my case BEA 6.1 SP2) as follows:
>
> APP1.EAR
>     + Servlet1.WAR
>
> APP2.EAR
>     + Servlet2.WAR
>
> COMMON.EAR
>     + EJB.JAR
>
> I can easily configure log4j to print all the statements from each app
level
> client.  But, I cannot get log4j to send the log statements from the
common
> (EJB layer) to the appropriate applications logging system... for obvious
> reasons.   Does anyone have an approach for integrating log4j and J2EE
> common classes?  So, that the log messages from the common layer go to the
> correct applications logging configuration system.
>
> There are a couple alternatives available to me, but each has flaws
>
> 0) Setup log4j on the App Server's classpath.  UGG!
> 1) Pass down client identifying information to each and every call in the
> common layer.  YUCK!
> 2) Setup logging in the common layer separately from the application
layers.
> This would work, but makes things difficult to diagnose as I would have no
> client identifying information... so the logging would be a huge file with
> all application to common level calls.
> 3) *I think this is a limitation of J2EE, or maybe BEA* During packaging
and
> deployment, if I could include the common ejb's within each application
EAR
> then I would have a certain level of separation, but when I deploy the
first
> app which contains the common EJBs, the deployment of the second EAR will
> fail as the EJB is already bound.
>
> I currently have this question into BEA, if I get an appropriate response
I
> will post it to this group.
>
> I would be interested in hearing what other people have done to solve this
> problem.
>
> Cheers
>
> -Reg
>
>
> ----- Original Message -----
> From: "Bobby Nations" <[EMAIL PROTECTED]>
> To: "Log4J Users List" <[EMAIL PROTECTED]>
> Sent: Friday, February 22, 2002 10:47 AM
> Subject: Re: log4j and weblogic 6.1
>
>
> > Deepak,
> >
> > I've been using log4j in my web app and ejb's under BEA weblogic 6.1 on
> > a linux box for some time with little trouble.  The jar file is in the
> > classpath for the server itself as well as the web-app's WEB-INF/lib
> > directory.  One of these days, I'm going to get around to using the
> > Class-path attribute in my EJB's manifest and then I could do away with
> > one of the jar files, but just not today.  Anyway, it works pretty
> > reliably for me.  The biggest issue that I faced was getting it to find
> > the log4j.properties file.
> >
> > Hope that helps,
> >
> > Bobby
> >
> > Parmar, Deepak wrote:
> >
> > >Hi guys,
> > >
> > >Has anyone configured/installed Log4j to work with
> > >the BEA Weblogic
> > >Application Server 6.1?
> > >
> > >More specifically we have a web app that uses
> > >Struts as the framework and Log4j to do all the
> > >logging/debugging for this app.
> > >
> > >I'm getting NoClassDefFoundError :
org/apache/log4j/PropertyConfigurator.
> > >
> > >I tried putting log4j.jar file in WEB-INF/lib directory but it didn't
> work,
> > >so I added log4j.jar file in classpath in startWeblogic.sh/cmd file
> > >and still getting this error.
> > >
> > >Any idea?
> > >Deepak
> > >
> > >
> >
>------------------------------------------------------------------------
> > >
> > >--
> > >To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > >For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > >
> >
> > --
> > Sr. Programmer / Analyst
> > FedEx Services
> > 20 FedEx Parkway
> > Collierville, TN  38017
> > (901) 263-6517
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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

Reply via email to