Tomcat 7 is a very good Servlet Container.

However – in practice Tomcat finds itself drafted to be used as an Application Server (AS) rather than Servlet container in many situations. In particular in development.

Tomcat 7 JNDI is explicitly not designed to allow real AS use though.

In particular it is limited to:

i) Being configurable (via server.xml / context.xml) to only add items to context’s rooted: java:comp/env

(I am ignoring the <TRANSACTION> tag here…)

ii) The Tomcat JNDI takes exclusive control of java: namespace. This means that if using a separate Initial Factory Context which is declaring java: items, these will be hidden from the regular Tomcat runtime.

iii) There is no visibility into the loaded JNDI structure through the included management tool.

The minimal consequence of this is that certain solutions developed on Tomcat will be forced to contain configurations which are not compatible with real AS’s.

The bigger picture though is that there is a certain degree of uncertainty involved with setting up object within JNDI – particularly if dependent components are locked to referencing items outside of java:/comp/env, and if working with separate distinct Initial Contexts – for example that of the Bitronix Transaction manager.

To address these issues and provide visibility and a bridge between Tomcat and the real AS world a Tomcat JNDI Management interface has been implemented.

It is downloadble from here:

The help file / further information (included in the above) can be viewed here: