Previous | Next | Trail Map | Building a Service Provider | The Big Picture

Advanced Features

A context implementation must support methods defined in the Context(in the API reference documentation) interface and subinterfaces in accordance with the JNDI specifications. Within that framework, however, a lot of leeway exists regarding the features that the context implementation supports. None of the features discussed in this section involve adding any new components. Rather, they involve embellishing a context implementation, typically by making existing methods support the feature or by adding new methods.

Federation

Federation concepts are described in the Federation (in the Beyond the Basics trail) lesson. Support for federation consists of the following: The JNDI SPI framework contains methods to assist in the latter.

A context implementation's support of federation is helpful but not required. The implementation can be used simply for accessing a particular naming/directory service--a valid and supported use of the JNDI.

The Adding Federation Support (in the Building a Service Provider trail) lesson describes how to add support for federation.

Link Reference Support

A link reference is a symbolic link that can span multiple naming systems. It is represented by the LinkRef(in the API reference documentation) class. Context.lookup()(in the API reference documentation) and the resolution portion of all context methods are supposed to dereference link references automatically. Context.lookupLink()(in the API reference documentation) is used to read a link reference. Link references are described in the Miscellaneous (in the Beyond the Basics trail) lesson.

A context implementation that does not support binding of link references obviously does not have to deal with them. One that does support this feature should process the references according to the specification. It also should have mechanisms in place to catch link loops and/or to limit the number of links that can be followed.

The Miscellaneous (in the Building a Service Provider trail) lesson describes how to add support for link references.

Referral Support

A referral is an entity used to redirect a client's request to another server. Containing the names and locations of other objects, it is sent by the server to indicate that the information that the client has requested can be found at another location (or locations), possibly at another server or several servers.

Referrals are used by the LDAP (RFC 2251) and therefore apply only to LDAP-style directories. They are described in detail in the Referrals (in the Tips for LDAP Users trail) lesson.

The JNDI specifies the environment property Context.REFERRAL(in the API reference documentation) ("java.naming.referral") that an application can use to control how referrals are processed by the context implementation. A context implementation that supports referrals must conform to this specification. It also should have mechanisms in place to catch referral loops and/or to limit the number of referrals that can be followed.

The Miscellaneous (in the Building a Service Provider trail) lesson describes how to add support for referrals.

Schema Support

The DirContext(in the API reference documentation) and Attribute(in the API reference documentation) interfaces contain methods that enable programs to retrieve the schema of the directory entry/attribute. Schema in the LDAP are described in detail in the Schema (in the Tips for LDAP Users trail) lesson. These methods make sense only for a directory context implementations that publishes its schema. The schema might be read-only or read-write, depending on both the context implementation and the underlying directory service. To the degree possible, support for schemas should follow the guidelines given in the Guidelines for LDAP Service Providers.

The Adding Directory Support (in the Building a Service Provider trail) lesson describes how to add support for schema.

Event Notification Support

Event notification support is defined in the javax.naming.event(in the API reference documentation) package. It is described in detail in the Event Notification (in the Beyond the Basics trail) lesson.

Support for event notification makes sense primarily for an underlying naming and directory service that supports event notification. Some context implementations might support this feature for those underlying services that do not support event notification, by using techniques such as polling to simulate the effects of notifications.

The Miscellaneous (in the Building a Service Provider trail) lesson describes how to add support for events.

The Big Picture: End of Lesson

What's next? Now you can:


Previous | Next | Trail Map | Building a Service Provider | The Big Picture