Home Javacertification Ibm-287 Identify misbehaving application components

Ask Questions?

View Latest Questions

Advertisement


 
 

Identify misbehaving application components
Posted on: April 18, 2011 at 12:00 AM
This page discusses - Identify misbehaving application components

Identify misbehaving application components

NoInitialContextException

Extends NamingException.

This exception is thrown when no initial context implementation can be created. When the environment property "java.naming.factory.initial" is non-null, the InitialContext constructor will attempt to create the initial context specified therein. At that time, the initial context factory involved might throw an exception if a problem is encountered. However, it is provider implementation-dependent when it verifies and indicates to the users of the initial context any environment property- or connection- related problems. It can do so lazily-delaying until an operation is performed on the context, or eagerly, at the time the context is constructed.

This exception can be thrown during any interaction with the InitialContext, not only when the InitialContext is constructed. For example, the implementation of the initial context might lazily retrieve the context only when actual methods are invoked on it. The application should not have any dependency on when the existence of an initial context is determined.

INITIAL_CONTEXT_FACTORY

Constant that holds the name of the environment property for specifying the initial context factory to use. The value of the property should be the fully qualified class name of the factory class that will create an initial context. This property may be specified in the environment parameter passed to the initial context constructor, an applet parameter, a system property, or an application resource file. If it is not specified in any of these sources, NoInitialContextException is thrown when an initial context is required to complete an operation.

The value of this constant is "java.naming.factory.initial".

Advertisement


DMCA.com