FileDocCategorySizeDatePackage
IIOPObjectFactory.javaAPI DocGlassfish v2 API3650Fri May 04 22:35:10 BST 2007com.sun.enterprise.naming.factory

IIOPObjectFactory

public class IIOPObjectFactory extends Object implements ObjectFactory
An object factory to handle URL references. Handles references and looks up in the cosnaming contexts.

Fields Summary
static Logger
_logger
public static final boolean
debug
Hashtable
env
Constructors Summary
Methods Summary
public java.lang.ObjectgetObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env)


        
				      
				     
				        
    
	env.put("java.naming.factory.initial",
		"com.sun.jndi.cosnaming.CNCtxFactory");

	InitialContext ic = new InitialContext(env);

	Reference ref = (Reference) obj;
	if(debug) {
	    /** IASRI 4660742
	    System.out.println("IIOPObjectFactory " + ref + 
				" Name:" + name);
	    **/
	    // START OF IASRI 4660742
	    if(_logger.isLoggable(Level.FINE)) {
         _logger.log(Level.FINE,"IIOPObjectFactory " + ref +
                     " Name:" + name);
       }
	    // END OF IASRI 4660742
	}
	RefAddr refAddr = ref.get("url");
	Object realObject = ic.lookup((String) refAddr.getContent());
	if(debug) {
	    /** IASRI 4660742
	    System.out.println("Found Object:" + realObject);
	    **/
	    // START OF IASRI 4660742
	    if(_logger.isLoggable(Level.FINE)) {
         _logger.log(Level.FINE,"Found Object:" + realObject); 
       }
	    // END OF IASRI 4660742
	}
	return realObject;