public class JndiRmiProxyFactoryBean extends JndiRmiClientInterceptor implements org.springframework.beans.factory.FactoryBean<java.lang.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,
PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)CONTAINER_PREFIXlogger| Constructor and Description |
|---|
JndiRmiProxyFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
java.lang.Object |
getObject() |
java.lang.Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setBeanClassLoader(java.lang.ClassLoader classLoader) |
createRemoteInvocation, doInvoke, doInvoke, getRemoteInvocationFactory, getServiceInterface, getStub, invoke, isConnectFailure, isConnectFailure, lookupStub, prepare, refreshAndRetry, setCacheStub, setExposeAccessContext, setLookupStubOnStartup, setRefreshStubOnConnectFailure, setRemoteInvocationFactory, setServiceInterfacegetExpectedType, getJndiName, lookup, setExpectedType, setJndiNameconvertJndiName, isResourceRef, lookup, lookup, setResourceRefgetJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplatepublic void setBeanClassLoader(java.lang.ClassLoader classLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic void afterPropertiesSet()
throws javax.naming.NamingException
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class JndiRmiClientInterceptorjavax.naming.NamingExceptionpublic java.lang.Object getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<java.lang.Object>public java.lang.Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<java.lang.Object>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<java.lang.Object>