At 04:24 PM 3/2/2005 -0600, you wrote:
>Each ear is a separate app in the server's eyes.  I believe weblogic is
>using the equivalent of "multiple" in websphere.  That's ok.  I'm just
>wondering whether log4j in multiple classloaders in 1 jvm will have the same
>log interleaving problem that multilpe jvms has.

Ok, so let me make sure I understand. You are seeing a static block in your log4j wrapper class which exists in a jar of each ear and doesn't exist in any classloader above both ears. Well, that makes sense. The wrapper class would have to get loaded once per visible classloader. BTW, are you doing manual configuration upon application load or are you counting on autoconfiguration? I say this because Weblogic comes with log4j in the classpath and since it is configured already, your apps won't perform autoconfiguration (even if you have log4j.jar in each ear, they will be ignored in favor of the server's). And if you do manual configuration, how do avoid stepping all over Weblogic's configured logger repository? Are you using a repository selector? I'm really curious how your setup works without simply using Weblogic's log4j configuration for the server+apps.

Anyway, more specifically to your question, I'm not sure if two separate logger repositories writing to one file would cause an issue? The VM manages the file handle, so I'm guessing that it won't be an issue since it is all running in the same VM, but someone else will have to speak to that more authoritatively.


Jake

>
>thanks
>
>-----Original Message-----
>From: Korver, Aaron [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 02, 2005 4:17 PM
>To: 'Log4J Users List'
>Subject: RE: single log file with multiple JVMs vs. multiple class loaders
>
>
>Is each EAR deployed to it's own appserver?  Or do both EAR's belong to the
>same appserver, but fall under different applications?  I know that in
>Websphere there is a setting which says "Application Classloader Policy".
>The two options are MULTIPLE and SINGLE.  If MULTIPLE is choosen, then it
>will use a seperate classloader per application.  Perhaps there is a similar
>thing for Weblogic?
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, March 02, 2005 4:13 PM
>> To: [email protected]
>> Subject: RE: single log file with multiple JVMs vs. multiple class
>> loaders
>>
>>
>> Log4j.jar appears once in each ear file, but not in the war
>> file at all.
>> The config file is in a common jar file that is included at
>> the root of each
>> ear.  Our war file does not contain its own copy of log4j.jar,
>> log4j.xml/properties, or the common jar.  I haven't changed
>> the default
>> class loading of weblogic, so I assume the webapp is
>> inheriting from the app
>> when it can't find the jar or config files in its own space.
>> The reason I
>> think log4j is still getting initialized twice is that I can see a
>> breakpoint hit in a static block for our log4j wrapper.  I
>> believe it's
>> happening once in app 1's classloader and once in app 2's classloader.
>>
>> thanks
>>
>> -----Original Message-----
>> From: Jacob Kjome [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, March 02, 2005 4:07 PM
>> To: Log4J Users List
>> Subject: Re: single log file with multiple JVMs vs. multiple
>> class loaders
>>
>>
>>
>> Where do you have log4j.jar?  Where is the config file you
>> think is being
>> used?
>> Do you have the optional child-first classloading behavior enabled for
>> webapps or not?
>>
>>
>> Jake
>>
>> Quoting [EMAIL PROTECTED]:
>>
>> > Hi all,
>> >
>> > I'm aware of the problems with more than 1 jvm trying to write to 1
>> > file, but what about multiple class loaders?  In my j2ee
>> app we have 2
>> > ears, one of which contains a war.  They all use the same log4j
>> > config.  They're deployed to WebLogic 8.1.  There appears
>> to be only 1
>> > java.exe on my machine (XP Pro), which I believe is for WebLogic,
>> > regardless of whether I deploy both ears or just 1.  (Might
>> that vary
>> > by OS or java implementation?) That makes me think there's just 1
>> > process writing to the file.  However, I think log4j is being
>> > configured more than once because I see our wrapper class
>> get loaded
>> > more than once.  Would this cause the same kind of interleaving
>> > problems that multiple processes will?  I haven't seen any
>> yet, but we
>> > haven't started testing heavily yet, either.
>> >
>> > thanks
>> >
>> >
>> > John Gregg
>> > Application Systems Engineer
>> > Wells Fargo Private Client Services Technology
>> >
>> >
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


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



Reply via email to