Jetty has moved!
Jetty is a project at the Eclipse Foundation.
Homepage:http://www.eclipse.org/jetty
Downloads: http://download.eclipse.org/jetty/
Documentation:http://www.eclipse.org/jetty/documentation/current/
About:http://www.eclipse.org/jetty/about.php
Jetty Powered:http://www.eclipse.org/jetty/powered/
Contact the core Jetty developers at www.webtide.com
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
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Using JNDI Resources with jetty6

Jetty6 supports java:comp/env lookups. This is an optional feature provided by the 2 jars lib/naming/jetty-naming.jar and lib/plus/jetty-plus.jar. As it is an optional feature, some setup needs to be done.

Firstly, to enable JNDI for a web application, you need to configure the WebAppContext to parse the web.xml file and perform the java:comp/env linkages. The class that does this is org.mortbay.jetty.plus.webapp.Configuration, and we specify its name in the list of configurations to be applied to the webapp. The following example enables JNDI for the testWebAppContext:

Then, you may configure container-wide naming resources that can be referenced in a web.xml file. Some examples of these resources are javax.sql.DataSource, javax.jms.QueueConnectionFactory. These are discussed below in Configuring resource-refs and resource-env-refs

h2. Configuring global env-entrys

h2. Configuring resource-refs and resource-env-refs

h2. Configuring Transactions

  • No labels
Contact the core Jetty developers at www.webtide.com
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