java.lang.Object | |||||
↳ | org.springframework.remoting.support.RemotingSupport | ||||
↳ | org.springframework.remoting.support.RemoteExporter | ||||
↳ | org.springframework.remoting.support.RemoteInvocationBasedExporter | ||||
↳ | org.springframework.remoting.rmi.RmiBasedExporter | ||||
↳ | org.springframework.remoting.rmi.JndiRmiServiceExporter |
Service exporter which binds RMI services to JNDI. Typically used for RMI-IIOP (CORBA).
Exports services via the javax.rmi.PortableRemoteObject class. You need to run "rmic" with the "-iiop" option to generate corresponding stubs and skeletons for each exported service.
Also supports exposing any non-RMI service via RMI invokers, to be accessed
via JndiRmiClientInterceptor
/ JndiRmiProxyFactoryBean
's
automatic detection of such invokers.
With an RMI invoker, RMI communication works on the RmiInvocationHandler
level, needing only one stub for any service. Service interfaces do not have to
extend java.rmi.Remote
or throw java.rmi.RemoteException
on all methods, but in and out parameters have to be serializable.
The JNDI environment can be specified as "jndiEnvironment" bean 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>
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.remoting.support.RemotingSupport
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
| |||||||||||
Unbind the RMI service from JNDI on bean factory shutdown.
| |||||||||||
Initialize this service exporter, binding the specified service to JNDI.
| |||||||||||
Rebind the specified service to JNDI, for recovering in case
of the target registry having been restarted.
| |||||||||||
Set the JNDI environment to use for JNDI lookups.
| |||||||||||
Set the JNDI name of the exported RMI service.
| |||||||||||
Set the JNDI template to use for JNDI lookups.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.remoting.rmi.RmiBasedExporter
| |||||||||||
From class
org.springframework.remoting.support.RemoteInvocationBasedExporter
| |||||||||||
From class
org.springframework.remoting.support.RemoteExporter
| |||||||||||
From class
org.springframework.remoting.support.RemotingSupport
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.factory.BeanClassLoaderAware
| |||||||||||
From interface
org.springframework.beans.factory.DisposableBean
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
|
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
NamingException | |
---|---|
RemoteException |
Unbind the RMI service from JNDI on bean factory shutdown.
Initialize this service exporter, binding the specified service to JNDI.
NamingException | if service binding failed |
---|---|
RemoteException | if service export failed |
Rebind the specified service to JNDI, for recovering in case of the target registry having been restarted.
NamingException | if service binding failed |
---|
Set the JNDI environment to use for JNDI lookups. Creates a JndiTemplate with the given environment settings.
Set the JNDI template to use for JNDI lookups. You can also specify JNDI environment settings via "jndiEnvironment".