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>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,
PortableRemoteObjectCONTAINER_PREFIXlogger| 构造器和说明 |
|---|
JndiRmiProxyFactoryBean() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
Object |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setBeanClassLoader(ClassLoader classLoader) |
createRemoteInvocation, doInvoke, doInvoke, getRemoteInvocationFactory, getServiceInterface, getStub, invoke, isConnectFailure, lookupStub, prepare, refreshAndRetry, setCacheStub, setExposeAccessContext, setLookupStubOnStartup, setRefreshStubOnConnectFailure, setRemoteInvocationFactory, setServiceInterfacegetExpectedType, getJndiName, lookup, setExpectedType, setJndiNameconvertJndiName, isResourceRef, lookup, lookup, setResourceRefgetJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplatepublic void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader 在接口中 org.springframework.beans.factory.BeanClassLoaderAwarepublic void afterPropertiesSet()
throws NamingException
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanafterPropertiesSet 在类中 JndiRmiClientInterceptorNamingExceptionpublic Object getObject()
getObject 在接口中 org.springframework.beans.factory.FactoryBean<Object>public Class<?> getObjectType()
getObjectType 在接口中 org.springframework.beans.factory.FactoryBean<Object>public boolean isSingleton()
isSingleton 在接口中 org.springframework.beans.factory.FactoryBean<Object>