Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.4.0)

E10686-05

oracle.adf.share.jndi
Class AdfInitialContext

java.lang.Object
  extended by javax.naming.InitialContext
      extended by oracle.adf.share.jndi.AdfInitialContext
All Implemented Interfaces:
javax.naming.Context, javax.naming.event.EventContext, AdfJndiContext, ConnectionEventContext

public class AdfInitialContext
extends javax.naming.InitialContext
implements AdfJndiContext, ConnectionEventContext

AdfInitialContext extends InitialContext, adding support for the methods defined by the AdfJndiContext. The methods defined by AdfJndiContext let clients save and reload the contents of a Context without closing it. This subclass is required because InitialContext does not provide any public methods to access the underlying Context that is created by the NamingManager. ADFConfig and its supporting classes create an instance of AdfInitialContext instead of InitialContext. If the configuration is changed so the underlying Context is not an instance of AdfJndiContext, the additional methods will raise exceptions NOTE: AdfJndiContext support is required by the Resource Catalog Service.


Field Summary
 
Fields inherited from class javax.naming.InitialContext
defaultInitCtx, gotDefault, myProps
 
Fields inherited from interface javax.naming.event.EventContext
OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE
 
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
 
Constructor Summary
AdfInitialContext(java.util.Hashtable env)
           
 
Method Summary
 void addContextSaveListener(ContextSaveListener l)
           
 void addNamingListener(javax.naming.Name target, int scope, javax.naming.event.NamingListener l)
           
 void addNamingListener(java.lang.String target, int scope, javax.naming.event.NamingListener l)
           
 void close()
           
 java.util.Map<java.lang.String,javax.naming.Reference> getReferenceMap()
          Return a Map containing a javax.naming.Reference object for each corresponding JAXB ReferenceType.
 boolean hasChanged()
           
 boolean isAdfJndiContext()
          Returns true if the contained Context is an instance of AdfJndiContext.
 void reload()
           
 void removeContextSaveListener(ContextSaveListener l)
           
 void removeNamingListener(javax.naming.event.NamingListener l)
           
 void save()
           
 void saveAs(java.lang.String url)
           
 boolean targetMustExist()
          This implementation only supports listeners for targets that already exist
 
Methods inherited from class javax.naming.InitialContext
addToEnvironment, bind, bind, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, doLookup, doLookup, getDefaultInitCtx, getEnvironment, getNameInNamespace, getNameParser, getNameParser, getURLOrDefaultInitCtx, getURLOrDefaultInitCtx, init, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
 

Constructor Detail

AdfInitialContext

public AdfInitialContext(java.util.Hashtable env)
                  throws javax.naming.NamingException
Throws:
javax.naming.NamingException
Method Detail

close

public void close()
           throws javax.naming.NamingException
Specified by:
close in interface javax.naming.Context
Overrides:
close in class javax.naming.InitialContext
Throws:
javax.naming.NamingException

reload

public void reload()
            throws javax.naming.NamingException
Specified by:
reload in interface AdfJndiContext
Throws:
javax.naming.NamingException

saveAs

public void saveAs(java.lang.String url)
            throws javax.naming.NamingException
Specified by:
saveAs in interface AdfJndiContext
Throws:
javax.naming.NamingException

save

public void save()
          throws javax.naming.NamingException
Specified by:
save in interface AdfJndiContext
Throws:
javax.naming.NamingException

getReferenceMap

public java.util.Map<java.lang.String,javax.naming.Reference> getReferenceMap()
                                                                       throws javax.naming.NamingException
Description copied from interface: AdfJndiContext
Return a Map containing a javax.naming.Reference object for each corresponding JAXB ReferenceType.

Specified by:
getReferenceMap in interface AdfJndiContext
Returns:
a Map containing a JNDI Reference for each corresponding JAXB ReferenceType. The key is the connection name.
Throws:
javax.naming.NamingException - if an exception occurs populating the Map.

hasChanged

public boolean hasChanged()
                   throws javax.naming.NamingException
Throws:
javax.naming.NamingException

isAdfJndiContext

public boolean isAdfJndiContext()
Returns true if the contained Context is an instance of AdfJndiContext.

Returns:
True if the contained Context is an instance of AdfJndiContext. Otherwise false.

addNamingListener

public void addNamingListener(javax.naming.Name target,
                              int scope,
                              javax.naming.event.NamingListener l)
                       throws javax.naming.NamingException
Specified by:
addNamingListener in interface javax.naming.event.EventContext
Throws:
javax.naming.NamingException

addNamingListener

public void addNamingListener(java.lang.String target,
                              int scope,
                              javax.naming.event.NamingListener l)
                       throws javax.naming.NamingException
Specified by:
addNamingListener in interface javax.naming.event.EventContext
Throws:
javax.naming.NamingException

removeNamingListener

public void removeNamingListener(javax.naming.event.NamingListener l)
                          throws javax.naming.NamingException
Specified by:
removeNamingListener in interface javax.naming.event.EventContext
Throws:
javax.naming.NamingException

addContextSaveListener

public void addContextSaveListener(ContextSaveListener l)
                            throws javax.naming.NamingException
Specified by:
addContextSaveListener in interface ConnectionEventContext
Throws:
javax.naming.NamingException

removeContextSaveListener

public void removeContextSaveListener(ContextSaveListener l)
                               throws javax.naming.NamingException
Specified by:
removeContextSaveListener in interface ConnectionEventContext
Throws:
javax.naming.NamingException

targetMustExist

public boolean targetMustExist()
This implementation only supports listeners for targets that already exist

Specified by:
targetMustExist in interface javax.naming.event.EventContext
Returns:

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.4.0)

E10686-05

Copyright © 1997, 2011, Oracle. All rights reserved.