blogger templates blogger widgets
This is part of a list of blog posts.
To browse the contents go to

Configuring and using JNDI resources in (Tomcat) container

Read about InitalContext.

In a container/server we define/reference resource in the JNDI context by specifying it in the deployment descriptors.

In Java EE, there are two types of deployment descriptors:
"java EE deployment descriptors" and "runtime deployment descriptors".

The Java EE deployment descriptors are defined by the language(J2EE) specification, whereas the runtime descriptors are defined by the vendor of each container implementation.

For example, the web.xml file is a standard Java EE deployment descriptor, specified in the Java Servlet specification, but the context.xml or server.xml files in Tomcat's conf directory are specific to the container, in this case Tomcat.

As we have seen before, JNDI name lookup's happen within a specific naming context.

The InitialContext is configured as a web application is initially deployed, and is made available to web application components (for read-only access). All configured entries and resources are placed in the java:comp/env portion of the JNDI namespace.

According to the JNDI specification, service providers are encouraged (but not required) to support object storage in one of the following formats:

First 2 are applicable to naming and directory services and the last one only for directory services.

Continue reading: Bind and lookup wrapper objects using env-entry : tomcat

No comments:

Post a Comment