org.springframework.ejb.access

## 类 LocalStatelessSessionProxyFactoryBean

- java.lang.Object
- - org.springframework.jndi.JndiAccessor
  - - org.springframework.jndi.JndiLocatorSupport
    - - org.springframework.jndi.JndiObjectLocator
      - - org.springframework.ejb.access.AbstractSlsbInvokerInterceptor
        - - org.springframework.ejb.access.LocalSlsbInvokerInterceptor
          - - org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean

- 所有已实现的接口:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.InitializingBean

      public class LocalStatelessSessionProxyFactoryBean
      extends LocalSlsbInvokerInterceptor
      implements org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.BeanClassLoaderAware

  Convenient `FactoryBean` for local Stateless Session Bean (SLSB) proxies. Designed for EJB 2.x, but works for EJB 3 Session Beans as well.

  See `JndiObjectLocator` for info on how to specify the JNDI location of the target EJB.

  If you want control over interceptor chaining, use an AOP ProxyFactoryBean with LocalSlsbInvokerInterceptor rather than rely on this class.

  In a bean container, this class is normally best used as a singleton. However, if that bean container pre-instantiates singletons (as do the XML ApplicationContext variants) you may have a problem if the bean container is loaded before the EJB container loads the target EJB. That is because by default the JNDI lookup will be performed in the init method of this class and cached, but the EJB will not have been bound at the target location yet. The best solution is to set the "lookupHomeOnStartup" property to "false", in which case the home will be fetched on first access to the EJB. (This flag is only true by default for backwards compatibility reasons).

  从以下版本开始:
    09.05.2003
  作者:
    Rod Johnson, Colin Sampaleanu
  另请参阅:
    `AbstractSlsbInvokerInterceptor.setLookupHomeOnStartup(boolean)`, `AbstractSlsbInvokerInterceptor.setCacheHome(boolean)`

- - ### 字段概要

    - ### 从类继承的字段 org.springframework.jndi.JndiLocatorSupport

      `CONTAINER_PREFIX`

    - ### 从类继承的字段 org.springframework.jndi.JndiAccessor

      `logger`

  - ### 构造器概要

    构造器
    构造器和说明
    `LocalStatelessSessionProxyFactoryBean()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `afterPropertiesSet()` Fetches EJB home on startup, if necessary.
    `Class<?>` | `getBusinessInterface()` Return the business interface of the EJB we're proxying.
    `Object` | `getObject()`
    `Class<?>` | `getObjectType()`
    `boolean` | `isSingleton()`
    `void` | `setBeanClassLoader(ClassLoader classLoader)`
    `void` | `setBusinessInterface(Class<?> businessInterface)` Set the business interface of the EJB we're proxying.

    - ### 从类继承的方法 org.springframework.ejb.access.LocalSlsbInvokerInterceptor

      `getCreateMethod, getSessionBeanInstance, invokeInContext, newSessionBeanInstance, releaseSessionBeanInstance, removeSessionBeanInstance`

    - ### 从类继承的方法 org.springframework.ejb.access.AbstractSlsbInvokerInterceptor

      `create, getHome, invoke, isHomeRefreshable, refreshHome, setCacheHome, setExposeAccessContext, setLookupHomeOnStartup`

    - ### 从类继承的方法 org.springframework.jndi.JndiObjectLocator

      `getExpectedType, getJndiName, lookup, setExpectedType, setJndiName`

    - ### 从类继承的方法 org.springframework.jndi.JndiLocatorSupport

      `convertJndiName, isResourceRef, lookup, lookup, setResourceRef`

    - ### 从类继承的方法 org.springframework.jndi.JndiAccessor

      `getJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplate`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### LocalStatelessSessionProxyFactoryBean

          public LocalStatelessSessionProxyFactoryBean()

  - ### 方法详细资料

    - #### setBusinessInterface

          public void setBusinessInterface(@Nullable
                                           Class<?> businessInterface)

      Set the business interface of the EJB we're proxying. This will normally be a super-interface of the EJB local component interface. Using a business methods interface is a best practice when implementing EJBs.
      参数:
        `businessInterface` - set the business interface of the EJB

    - #### getBusinessInterface

          @Nullable
          public Class<?> getBusinessInterface()

      Return the business interface of the EJB we're proxying.

    - #### setBeanClassLoader

          public void setBeanClassLoader(ClassLoader classLoader)

      指定者:
        `setBeanClassLoader` 在接口中 `org.springframework.beans.factory.BeanClassLoaderAware`

    - #### afterPropertiesSet

          public void afterPropertiesSet()
                                  throws NamingException

      从类复制的说明: `AbstractSlsbInvokerInterceptor`
      Fetches EJB home on startup, if necessary.
      指定者:
        `afterPropertiesSet` 在接口中 `org.springframework.beans.factory.InitializingBean`
      覆盖:
        `afterPropertiesSet` 在类中 `AbstractSlsbInvokerInterceptor`
      抛出:
        `NamingException`
      另请参阅:
        `AbstractSlsbInvokerInterceptor.setLookupHomeOnStartup(boolean)`, `AbstractSlsbInvokerInterceptor.refreshHome()`

    - #### getObject

          @Nullable
          public Object getObject()

      指定者:
        `getObject` 在接口中 `org.springframework.beans.factory.FactoryBean<Object>`

    - #### getObjectType

          public Class<?> getObjectType()

      指定者:
        `getObjectType` 在接口中 `org.springframework.beans.factory.FactoryBean<Object>`

    - #### isSingleton

          public boolean isSingleton()

      指定者:
        `isSingleton` 在接口中 `org.springframework.beans.factory.FactoryBean<Object>`