getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable env)
Transform the obj Reference bound into the JNDI namespace into the
actual non-Serializable object.
static java.lang.Object
lookup(java.lang.String key)
Lookup a value from the NonSerializableFactory map.
static void
rebind(java.lang.String key,
Application application,
Container container)
Place an object into the NonSerializableFactory namespace for subsequent
access by getObject.
static void
unbind(java.lang.String key)
Place or replace an object in the NonSerializableFactory namespce
for subsequent access by getObject.
public static void rebind(java.lang.String key,
Application application,
Container container)
Place an object into the NonSerializableFactory namespace for subsequent
access by getObject.
Parameters:
key, - the name to bind target under. This should typically be the
name that will be used to bind target in the JNDI namespace, but it does
not have to be.
target, - the non-Serializable object to bind.
unbind
public static void unbind(java.lang.String key)
throws javax.naming.NameNotFoundException
Place or replace an object in the NonSerializableFactory namespce
for subsequent access by getObject. Any existing binding for key will be
replaced by target.
/** Remove a binding from the NonSerializableFactory map.
Parameters:
key, - the key into the NonSerializableFactory map to remove.
target, - the non-Serializable object to bind.
Throws:
NameNotFoundException, - thrown if key does not exist in the
NonSerializableFactory map
lookup
public static java.lang.Object lookup(java.lang.String key)
Lookup a value from the NonSerializableFactory map.
Returns:
the object bound to key is one exists, null otherwise.
Transform the obj Reference bound into the JNDI namespace into the
actual non-Serializable object.
Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Parameters:
obj, - the object bound in the JNDI namespace. This must be an implementation
of javax.naming.Reference with a javax.naming.RefAddr of type "nns" whose
content is the String key used to location the non-Serializable object in the
NonSerializableFactory map.
name, - ignored.
nameCtx, - ignored.
env, - ignored.
Returns:
the non-Serializable object associated with the obj Reference if one
exists, null if one does not.