harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimmy,Jing Lv" <firep...@gmail.com>
Subject Re: [classlib][logging] how we process 'java.util.logging.config.class' propety
Date Mon, 09 Jul 2007 07:56:30 GMT
2007/7/6, Vladimir Ivanov <ivavladimir@gmail.com>:
> Hello everybody,
> I'm looking through the exclude list in the functional suite and I
> need some advice about the failure of the
> 'functional.org.apache.harmony.test.func.api.java.util.logging.LogManager.ReadConfiguration_03'
> test.
>
> The command to run this test is:
> java.exe -showversion -cp
> branches/2.0/build/classes/func/classes;branches\2.0\build\libs\th.jar
> -Dorg.apache.harmony.test.func.api.java.logging.LogManager.readConfiguration.path=branches/2.0/tests/functional/src/test/functional/org/apache/harmony/test/func/api/java/util/logging/LogManager\auxiliary\sc.cfg
> -Djava.util.logging.config.class=org.apache.harmony.test.func.api.java.util.logging.LogManager.LogManagerConfigurator
> org.apache.harmony.test.func.api.java.util.logging.LogManager.ReadConfiguration_03
>
> but the results for different runtimes are different (below).
> According to the spec for the java.util.logging.LogManager:
> "In addition, the LogManager uses two optional system properties that
> allow more control over reading the initial configuration:
>
> "java.util.logging.config.class"
> "java.util.logging.config.file"
> "
> The question is: should we follow the spec or RI in this case?
> May be my spec interpretation is wrong?
>

Hi,

    I do think RI/Harmony/BEA behaves as spec said, but there's only a
little differences, as Harmony/RI behaves "lazy-load" ;) I guess BEA
load the LogManager when vm init, while RI/Harmony does not try to
init LogManager until someone try to use it.
    Add a single line into ReadConfiguration_03.java in the main function:
    public static void main(String[] args) {
+      LogManager.getLogManager();
        System.err.println(reason);
        System.exit(result);
    }
     In this way LogManager was invoked, read configurations and the
reason field in ReadConfiguration_03 is changed, and all jdks behaves
the same after that.
    I believe it is an implementation detail, no necessary to change
this lazy-load behaviour. Your ideas? :)

>  thanks, Vladimir
>
> Execution logs:
>
> RI 1.5
> ---------------------------
> java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode)
>
> configurator didn't run
> ---------------------------
> RI 1.6
> ---------------------------
> java version "1.6.0-beta2"
> Java(TM) SE Runtime Environment (build 1.6.0-beta2-b86)
> Java HotSpot(TM) Client VM (build 1.6.0-beta2-b86, mixed mode)
>
> configurator didn't run
> ---------------------------
>
> BEA
> ---------------------------
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32,
> R25.0.0-75, GC: System optimized over throughput (initial strategy
> singleparpar))
>
> ok
> ---------------------------
>
> Harmony
> ---------------------------
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
> Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r553707, (Jul  6 2007), Windows/ia32/msvc 1310, debug build
> http://harmony.apache.org
> configurator didn't run
> ---------------------------
>


-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

Mime
View raw message