tomcat, JBoss etc. Should be headless?
Mark Dixon
mark at markdnet.demon.co.uk
Tue Mar 30 14:14:41 PST 2004
On Tuesday 30 Mar 2004 18:40, you wrote:
> Jan Grant <Jan.Grant at bristol.ac.uk> writes:
> > On Tue, 30 Mar 2004, Dag-Erling Smrgrav wrote:
> > > Mark Dixon <mark at markdnet.demon.co.uk> writes:
> > > > Given that these server type java ports run as daemon processes in
> > > > the backgroundm wouldn't it be wise to start them up with
> > > > -Djava.awt.headless=true set?
> > >
> > > What exactly would be the point?
> >
> > The AWT canvas & related classes are (supposedly) available for the
> > dynamic generation of graphics, without needing an X server somewhere.
>
> In that case, isn't the onus on the application developer to make sure
> at runtime that awt knows to run headless?
>
> DES
Yes, that is true to some extent, but..
In the current situation, taking tomcat as an example, the JVM starts up with
daemonctl from /usr/local/etc/rc.d into an environment with no X server,
provided there's been no editing of the scripts. Any attempt to use the
graphics libraries in any servlet will result in the servlet falling over
with an AWTError. If we switch to headless, this would not be the case.
I really don't see any cost to anyone in doing this, and it makes more JVM
functionality avalaible by default to those that want it. The only people
that may be hurt by this are those that have created a custom startup script
which kicks off an X server (virtual or otherwise) for use by the JVM.
--
Mark
'If it compiles, ship it'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-java/attachments/20040330/bd5a264a/attachment.bin
More information about the freebsd-java
mailing list