Naming operations throw a CannotProceedException when the
service provider context implementation is resolving a name but reaches a
name component that does not belong to the namespace of the current context.
The service provider is able to create a CannotProceedException
object and use methods on that object (including baseclass methods) to
provide full details of how far name resolution had progressed.
Typically, the methods used might include:
setEnvironment to record the environment from the current
context
-
setAltNameCtx to record the current context
-
setResolvedObj to record the resolved object for the next
naming system
-
setAltName to record the name of the resolved object
-
setRemainingName to record the remaining unresolved name
If the incomplete naming operation is rename , the service
provider should also use the setRemainingNewName method to
record the unresolved part of the new name.
The service provider can pass the CannotProceedException as a
parameter to NamingManager methods such as
getContinuationContext to attempt to locate another service
provider for the next naming system. If successful, that service provider can
return a new Context object on which the naming operation can
proceed further. If unsuccessful, the CannotProceedException
can be thrown by the service provider so that the JNDI application can handle
it and take appropriate action.
Multithreaded access to a single CannotProceedException
instance is only safe when client code uses appropriate synchronization and
locking.
|