FileDocCategorySizeDatePackage
SerialContextProviderImpl.javaAPI DocGlassfish v2 API6247Fri May 04 22:35:08 BST 2007com.sun.enterprise.naming

SerialContextProviderImpl

public class SerialContextProviderImpl extends Object implements SerialContextProvider

Fields Summary
static Logger
_logger
private TransientContext
rootContext
Constructors Summary
protected SerialContextProviderImpl(TransientContext rootContext)


 
       
	  
	this.rootContext = rootContext;
    
Methods Summary
public voidbind(java.lang.String name, java.lang.Object obj)
Bind the object to the specified name.

exception
NamingException if there is a naming exception.
exception
if there is an RMI exception.


        rootContext.bind(name, obj);
    
private booleancheckAndLoadResource(java.lang.String name)

        boolean res = false;
        ConnectorRuntime connectorRuntime = ConnectorRuntime.getRuntime();
        if(connectorRuntime.isServer()) {
            res = connectorRuntime.checkAndLoadResource(name);
        }
        return res;
    
public javax.naming.ContextcreateSubcontext(java.lang.String name)
Create a subcontext with the specified name.

return
the created subcontext.
exception
NamingException if there is a naming exception.
exception
if there is an RMI exception.


	Context ctx = rootContext.createSubcontext(name);
	return ctx;
    
public voiddestroySubcontext(java.lang.String name)
Destroy the subcontext with the specified name.

exception
NamingException if there is a naming exception.
exception
if there is an RMI exception.


	rootContext.destroySubcontext(name);
    
public java.util.Hashtablelist()


        return rootContext.list();
    
public java.util.Hashtablelist(java.lang.String name)
List the contents of the specified context.

exception
NamingException if there is a naming exception.
exception
if there is an RMI exception.

	Hashtable ne = rootContext.listContext(name);
	return ne;
    
public java.lang.Objectlookup(java.lang.String name)
Lookup the specified name.

return
the object or context bound to the name.
exception
NamingException if there is a naming exception.
exception
if there is an RMI exception.

        try { 
            _logger.fine(" SerialContextProviderImpl :: lookup " + name);
	
            Object obj = rootContext.lookup(name);         
            return obj;
        } catch(NamingException ne) {
            boolean isLoaded = checkAndLoadResource(name);
            _logger.fine("CheckAndLoad Resource of " + name + " was "  + isLoaded );
            if ( isLoaded ) {
                Object i = rootContext.lookup(name);
                return i;
            }
            throw ne;	    
        } catch(Exception e) {
	    _logger.severe("Exception occurred : " + e.getMessage());
            RemoteException re = new RemoteException("", e);
            throw re;

        }
    
public voidrebind(java.lang.String name, java.lang.Object obj)
Rebind the object to the specified name.

exception
NamingException if there is a naming exception.
exception
if there is an RMI exception.


        rootContext.rebind(name, obj);
    
public voidrename(java.lang.String oldname, java.lang.String newname)
Rename the bound object.

exception
NamingException if there is a naming exception.
exception
if there is an RMI exception.


        rootContext.rename(oldname, newname);
    
public voidunbind(java.lang.String name)
Unbind the specified object.

exception
NamingException if there is a naming exception.
exception
if there is an RMI exception.


        rootContext.unbind(name);