org.jboss.ejb3
Class NonSerializableFactory

java.lang.Object
  extended by org.jboss.ejb3.NonSerializableFactory
All Implemented Interfaces:
javax.naming.spi.ObjectFactory

public class NonSerializableFactory
extends java.lang.Object
implements javax.naming.spi.ObjectFactory

A utility class that allows one to bind a non-serializable object into a local JNDI context. The binding will only be valid for the lifetime of the VM in which the JNDI InitialContext lives. An example usage code snippet is:

Internally, there is a static map that is keyed based on Context identityMap and the atom name of the target

See Also:
ObjectFactory, rebind(javax.naming.Context, String, Object)

Constructor Summary
NonSerializableFactory()
           
 
Method Summary
static void bind(javax.naming.Context ctx, java.lang.String strName, java.lang.Object value)
           
 java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env)
           
static void rebind(javax.naming.Context ctx, java.lang.String strName, java.lang.Object value)
           
static void unbind(javax.naming.Context ctx, java.lang.String strName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonSerializableFactory

public NonSerializableFactory()
Method Detail

unbind

public static void unbind(javax.naming.Context ctx,
                          java.lang.String strName)
                   throws javax.naming.NamingException
Throws:
javax.naming.NamingException

rebind

public static void rebind(javax.naming.Context ctx,
                          java.lang.String strName,
                          java.lang.Object value)
                   throws javax.naming.NamingException
Throws:
javax.naming.NamingException

bind

public static void bind(javax.naming.Context ctx,
                        java.lang.String strName,
                        java.lang.Object value)
                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

getObjectInstance

public java.lang.Object getObjectInstance(java.lang.Object obj,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable env)
                                   throws java.lang.Exception
Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Throws:
java.lang.Exception