org.jboss.ejb3.nointerface.impl.jndi
Class StatefulBeanNoInterfaceViewBinder

java.lang.Object
  extended by org.jboss.ejb3.nointerface.impl.jndi.AbstractNoInterfaceViewBinder
      extended by org.jboss.ejb3.nointerface.impl.jndi.StatefulBeanNoInterfaceViewBinder

public class StatefulBeanNoInterfaceViewBinder
extends AbstractNoInterfaceViewBinder

Responsible for creating and binding nointerface view proxy (and any other relevant objects like session creating proxy factory) into jndi, for beans which are session aware (ex: Stateful session beans)

Version:
$Revision: $
Author:
Jaikiran Pai

Field Summary
 
Fields inherited from class org.jboss.ejb3.nointerface.impl.jndi.AbstractNoInterfaceViewBinder
beanClass, endpointContext, jndiContext, noInterfaceViewJNDIName, sessionBeanMetaData
 
Constructor Summary
StatefulBeanNoInterfaceViewBinder(javax.naming.Context jndiCtx, java.lang.String jndiName, java.lang.Class<?> beanClass, org.jboss.metadata.ejb.jboss.JBossSessionBean31MetaData beanMetaData)
          Constructor
 
Method Summary
 void bind()
          1) Creates a StatefulNoInterfaceViewProxyFactory and binds it to JNDI (let's call this jndi-name "A") 2) Creates a StatefulNoInterfaceViewObjectFactory objectfactory and binds a Reference to this objectfactory into the JNDI (let's call it jndi-name "B").
 void unbind()
          Unbind the StatefulNoInterfaceViewProxyFactory and the StatefulNoInterfaceViewObjectFactory from the jndi
 
Methods inherited from class org.jboss.ejb3.nointerface.impl.jndi.AbstractNoInterfaceViewBinder
prettyPrintJNDIBindingInfo, setEndpointContext, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatefulBeanNoInterfaceViewBinder

public StatefulBeanNoInterfaceViewBinder(javax.naming.Context jndiCtx,
                                         java.lang.String jndiName,
                                         java.lang.Class<?> beanClass,
                                         org.jboss.metadata.ejb.jboss.JBossSessionBean31MetaData beanMetaData)
Constructor

Parameters:
beanClass - The bean class
sessionBeanMetadata - Metadata of the bean
Method Detail

bind

public void bind()
          throws javax.naming.NamingException
1) Creates a StatefulNoInterfaceViewProxyFactory and binds it to JNDI (let's call this jndi-name "A") 2) Creates a StatefulNoInterfaceViewObjectFactory objectfactory and binds a Reference to this objectfactory into the JNDI (let's call it jndi-name "B"). The objectfactory will have a reference to the jndi-name of the stateful factory (created in step#1). This will then be used by the object factory to lookup the stateful factory for creating the no-interface view when the client does a lookup.

Specified by:
bind in class AbstractNoInterfaceViewBinder
Throws:
javax.naming.NamingException

unbind

public void unbind()
            throws javax.naming.NamingException
Unbind the StatefulNoInterfaceViewProxyFactory and the StatefulNoInterfaceViewObjectFactory from the jndi

Specified by:
unbind in class AbstractNoInterfaceViewBinder
Throws:
javax.naming.NamingException
See Also:
org.jboss.ejb3.nointerface.impl.jndi.NoInterfaceViewJNDIBinderFacade#unbindNoInterfaceView()


Copyright © 2010. All Rights Reserved.