commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <>
Subject Re: [lang] System properties
Date Fri, 23 Aug 2002 13:41:02 GMT

I believe it is possible to configure:

 possible it is very specific for OS, but I think it is better to configure
"strategy" not
to detect it from OS name and "Administrators Guide" is more usefull thing
in this case.

----- Original Message -----
From: "Berin Loritsch" <>
To: "'Jakarta Commons Developers List'" <>
Sent: Friday, August 23, 2002 3:20 PM
Subject: RE: [lang] System properties

> > From: Juozas Baliuka []
> >
> > Hi,
> > I do not like any kind of OS detection, I think it useless.
> > Things must be configured, not detected from System
> > properties by OS name.
> >
> > Like "pool.maxThreads=40" and not this kind of crap:
> <snip/>
> > Doe's somebody knows "good" usage for OS_XXX ?
> For OS_XXX? no.  There are no good usages in *Java*.  There
> are a number of uses in C++, etc. where you may have to make
> decisions based on the processor type or platform--i.e.
> enabling some optimizations that are specific to a platform.
> In Java, the best we can do is display a little bit of system
> information.
> What is the most useful bit of information is how many
> processors exist.  The clumsy way is to require the user
> to specify that in a property:
> system.numcpus=2
> And then later use that for threadpool sizing for an event based
> system.  You can choose to have more than one thread per CPU,
> or you can have a set of threads that you just use.
> I honestly think the number of CPUs helps in the decision process,
> because the system can handle that many more threads.  The only
> problem is that there is no *currently* standard way of grabbing
> that information.
> Win 9x can only support one processor
> Win NT/2000/XP use environment variables
> UNIX systems usually have support for the /proc filesystem
> Now, to reduce the number of "plug-ins" for the types of
> platforms we can grab the number of CPUs from, the OS_XXX
> macros can really help.  Windows95, Windows98, WindowsME
> are all essentially the same plugin with a different name.
> Same with the WindowsNT, Windows2000, and WindowsXP plugins.
> The Linux plugin uses the /proc filesystem--which all UNIX
> platforms should be able to support.
> Outside of that, there is no real benefit I can see.
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message