Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Feedback on proposed start.jar and start.ini changes.




On 29 April 2013 02:04, Michele Rossi <michele.rossi@xxxxxxxxx> wrote:
hi,
since you are discussing changes to the jetty start.ini / start.jar I would like to propose a few things:

- The generated classpath is now gigantic, including one by one every single jar inside /lib.
This is no longer necessary as modern VMs support the "*" wildcard for the classpath.
We use it successfully at work.
This would help as on UNIX systems you are stuck with "ps -ef" and the output for jetty is so long at the moment that you can't see all of it.

The idea is that start.jar builds exactly the path you need, so if you are not using a feature it does not even exist on the classpath.
If you just want everything on the classpath, you can use the jetty-all aggregate jar that has everything in one big jar file except the servlet specification, or have your own script that uses *


 
- Do we really need start.jar / a java launcher?

start.jar is entirely optional, in as much as it is pretty simple to start jetty without it:

java -classpath 'lib/*' org.eclipse.jetty.xml.XmlConfiguration etc/jetty.xml etc/jetty-http.xml etc/jetty-deploy.xml


However, I do find it valuable to have a portable start mechanism that works identically on both unix and windows,  hence it is our default start mechanism in our distro.

 
It would be cool to be able to start jetty just with a script so that there is no launcher java process.
With the classpath change described above it should be pretty straightforward.

Indeed there is nothing stopping anybody doing that and if somebody wants to contribute a generic jetty.sh and jetty.bat file that avoids using start.jar, then we can certainly include those as options in the distro.

 
It is sometimes confusing to have two processes running, one doing apparently very little (it seems to linger around after starting jetty but does not seem to provide auto-restart of jetty).

Ah - unfortunately that is the problem of using --exec (also gives you the big ps -ef classpath).    If you move your JVM args out of start.ini files, then you don't need to use --exec and you'll have a single JVM and no huge ps-ef

 
- Automatic start up on UNIX.
As far as I know on UNIX configuring processes to start automatically can be done in a number of ways, all of them confusing / unclear unless you are a UNIX guru / sysadmin.
In the Jetty documentation there doesn't seem to be a clear indication of how to achieve that.
I think it would be very helpful having a simple script under "/bin" that just installs Jetty to start automatically when the machine reboots.
- Use of variable JAVA in current script instead of JAVA_HOME
This is a minor one but the standard in the Java world is JAVA_HOME (pointing to the root installation folder of Java) and not JAVA pointing to the java executable.


It has been a long while since I maintained a unix system in production - so contributions to improve the jetty.sh script to make it simpler to use are most welcome!

cheers


Back to the top