This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
We are using JBoss on Red Hat Linux with Java SDK version 1.3. One of our session EJBs does some manipulation of JPEG files, and thus uses the java.awt graphics and image objects. This causes the "can't connect to X11 server" exception to occur, unless we first run xhost +. (we cannot use the java.awt.headless feature because we are stuck on Java 1.3).
Our problem/question is that we can only get xhost + to run successfully if it is run from an xterm. Since this is a server, we cannot have any dependencies on a GUI. The requirement is that the machine boot up and run our JBoss application without any intervention. It is not acceptible to have a person log in and start up JBoss from an xterm.
Can anyone tell me how to configure the X server so that the machine will boot up with JBoss able to access X11? Any help would be greatly appreciated.
The best solution in my opinion (and also perhaps the easiest to implement) is to run a special X server for JBoss to use. You can use Xvfb, the X Virtual Frame Buffer, which you should already have on your system. Start it like this (do this in a startup script if you like