org.springframework.remoting.rmi

## 类 JndiRmiProxyFactoryBean

- java.lang.Object
- - org.springframework.jndi.JndiAccessor
  - - org.springframework.jndi.JndiLocatorSupport
    - - org.springframework.jndi.JndiObjectLocator
      - - org.springframework.remoting.rmi.JndiRmiClientInterceptor
        - - org.springframework.remoting.rmi.JndiRmiProxyFactoryBean

- 所有已实现的接口:
    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 JndiRmiProxyFactoryBean
      extends JndiRmiClientInterceptor
      implements org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.BeanClassLoaderAware

  `FactoryBean` for RMI proxies from JNDI.

  Typically used for RMI-IIOP (CORBA), but can also be used for EJB home objects (for example, a Stateful Session Bean home). In contrast to a plain JNDI lookup, this accessor also performs narrowing through `PortableRemoteObject`.

  With conventional RMI services, this invoker is typically used with the RMI service interface. Alternatively, this invoker can also proxy a remote RMI service with a matching non-RMI business interface, i.e. an interface that mirrors the RMI service methods but does not declare RemoteExceptions. In the latter case, RemoteExceptions thrown by the RMI stub will automatically get converted to Spring's unchecked RemoteAccessException.

  The JNDI environment can be specified as "jndiEnvironment" property, or be configured in a `jndi.properties` file or as system properties. For example:

      <property name="jndiEnvironment">
               <props>
                       <prop key="java.naming.factory.initial">com.sun.jndi.cosnaming.CNCtxFactory</prop>
                       <prop key="java.naming.provider.url">iiop://localhost:1050</prop>
               </props>
       </property>

  从以下版本开始:
    1.1
  作者:
    Juergen Hoeller
  另请参阅:
    `JndiRmiClientInterceptor.setServiceInterface(java.lang.Class<?>)`, `JndiObjectLocator.setJndiName(java.lang.String)`, `JndiAccessor.setJndiTemplate(org.springframework.jndi.JndiTemplate)`, `JndiAccessor.setJndiEnvironment(java.util.Properties)`, `JndiObjectLocator.setJndiName(java.lang.String)`, `JndiRmiServiceExporter`, `RemoteAccessException`, `RemoteException`, `Remote`, `PortableRemoteObject`

- - ### 字段概要

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

      `CONTAINER_PREFIX`

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

      `logger`

  - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `afterPropertiesSet()`
    `Object` | `getObject()`
    `Class<?>` | `getObjectType()`
    `boolean` | `isSingleton()`
    `void` | `setBeanClassLoader(ClassLoader classLoader)`

    - ### 从类继承的方法 org.springframework.remoting.rmi.JndiRmiClientInterceptor

      `createRemoteInvocation, doInvoke, doInvoke, getRemoteInvocationFactory, getServiceInterface, getStub, invoke, isConnectFailure, lookupStub, prepare, refreshAndRetry, setCacheStub, setExposeAccessContext, setLookupStubOnStartup, setRefreshStubOnConnectFailure, setRemoteInvocationFactory, setServiceInterface`

    - ### 从类继承的方法 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`

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

    - #### JndiRmiProxyFactoryBean

          public JndiRmiProxyFactoryBean()

  - ### 方法详细资料

    - #### setBeanClassLoader

          public void setBeanClassLoader(ClassLoader classLoader)

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

    - #### afterPropertiesSet

          public void afterPropertiesSet()
                                  throws NamingException

      指定者:
        `afterPropertiesSet` 在接口中 `org.springframework.beans.factory.InitializingBean`
      覆盖:
        `afterPropertiesSet` 在类中 `JndiRmiClientInterceptor`
      抛出:
        `NamingException`

    - #### getObject

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