private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Jetty supports the servlet specification annotations. It is not enabled by default, so the following sections show you how to enable it, and how to use them.
If you are using the standard distribution of Jetty, and want to
enable processing of annotation for all your webapps,
$JETTY_HOME/start.ini file and uncomment the
If you want to use annotations that relate to JNDI, such as @Resource and @Resources then you should also uncomment these other lines also:
You can now start Jetty and use annotations within your webapps. See Using Annotations for more information.
Since jetty-9.1.0 annotation scanning will be conducted by default in a multi-threaded manner. This speeds up the process of opening jar files and looking for discoverable annotations. Jetty will use threads from the configured thread pool to perform the scanning. You can disable threaded scanning and use just the single main execution thread if for some reason you need to. You have several options for doing this:
Set org.eclipse.jetty.annotations.multiThreaded to false on a context attribute for the specific webapp you want to affect
Set -Dorg.eclipse.jetty.annotations.multiThreaded=false as a System property in a start.ini file or command line to affect all webapps in the jvm
By default, Jetty will wait up to 60 seconds for the scanning to complete when using the multi-threaded mode. If you would like to make it longer or shorter, you can use any of the following:
Set org.eclipse.jetty.annotations.maxWait as a context attribute to the time in seconds you want to maximally wait for scanning to complete. This affects the specific webapp only.
Set org.eclipse.jetty.annotations.maxWait as a Server attribute to the time in secods you want to maximally wait for scanning to complete. This affects all webapps deployed to that Server.
Set -Dorg.eclipse.jetty.annotations.maxWait as a System property to the time in seconds you want to maximally wait for scanning to complete. This affects all webapps deployed in the jvm.