logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: log4j and weblogic help needed
Date Tue, 29 Nov 2005 12:43:11 GMT
Quoting kalohr <kalohr@gmail.com>:

> It's a good idea! I did not know about classloading config options, I
> thought that each ear is by default loaded by a chlid classloader which uses
> the libs within the ear. Never verified if Weblogic really works in that
> manner. I 'll look into it and I will inform.
>

You are right that each EAR and WAR gets its own classloader.  However, this is
not the same issue.  The issue is the behavior of those classloaders; whether
they look to themselves first to load classes, using servlet-spec recommended
classloading behavior, or whether they use standard Java2 classloading behavior
where they look to the system classloader first and only look to its own
classloader if the class doesn't exist in the system classloader.

In Weblogic 8.xx, the default is to use standard Java2 classloading behavior.  
Using child-first, at least for the webapps, is configurable.  I'm not so sure
whether it is configurable for the EAR classloaders?  I've just never looked
into that.

Jake

> Kalohr
>
> On 11/28/05, Jacob Kjome <hoju@visi.com> wrote:
> >
> >
> > I would look at the release notes between 7.01 and 7.05 to see if there
> > were any
> > changes to classloading behavior.  Does the server contain log4j?  Are you
> > specifically using child-first classloading behavior?  If it is
> > parent-first,
> > then the Log4j.jar instance owned by the server would perform default
> > initialization upon startup and the apps would use the server's log4j
> > default
> > logger repository to perform logging and ignore the app-local copies of
> > logj4.jar.  It is even possible that when Log4j is initialized at the
> > server
> > level, it might find a config file in one of the apps to use for its
> > configuration, which is why Log4j-1.3 stopped using the thread context
> > classloader to look up configuration files for auto-configuration.
> >
> > It sounds like you want child-first classloading behavior.  I suggest you
> > investigate the docs to see how to enable that for your applications.  I
> > know
> > it isn't the default for most full-stack J2EE servers such as Weblogic
> > 8.xx.
> >
> > Jake
> >
> > Quoting kalohr <kalohr@gmail.com>:
> >
> > > Hello all,
> > >
> > > I am trying to create two separate logs for two webapps (ears) by using
> > > log4j-1.2.8 with weblogic7.05. Both the apps are deployed in the same
> > > server. The first archive holds the enterprize beans of the application
> > > whereas the second contains the web part. Each archive contains the
> > log4j
> > > jar. The problem is that only one log is created when server version
> > 7.05 is
> > > used
> > >
> > > Has anyone ever faced a similar problem? I understand that it may have
> > to do
> > > with the server but it worked just fine on server version 7.01. Anyway
> > any
> > > help / opinios / thougths are very welcome
> > >
> > > thank you,
> > >
> > > Kalohr
> > >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>




---------------------------------------------------------------------
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