Google

JBoss API: Class LocalHomeObjectFactory

org.jboss.ejb
Class LocalHomeObjectFactory

java.lang.Object
  |
  +--org.jboss.ejb.LocalHomeObjectFactory
All Implemented Interfaces:
javax.naming.spi.ObjectFactory

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

Based on Scott Stark's NonSerializableObjectFactory:

Author:
Scott_Stark@displayscape.com, Daniel OConnor (docodan@mvcsoft.com

Constructor Summary
LocalHomeObjectFactory()
           
 
Method Summary
 java.lang.Object 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalHomeObjectFactory

public LocalHomeObjectFactory()
Method Detail

rebind

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.

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
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.


Copyright © 2000 The JBoss Organization. All Rights Reserved.