exposeAccessContext should also be available for JndiRmiClientInterceptor [SPR-9428] #14063
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Sylvain LAURENT opened SPR-9428 and commented
I expose some spring beans in Weblogic using the JndiRmiServiceExporter .
To use such beans, on the client side I use JndiRmiProxyFactoryBean.
Everything works well, except that the RMI calls are done anonymously eventhough the credentials are specified in the JNDI environment of the jndiTemplate.
After investigation, the problem seems to be that the JNDI context is not kept open during remote method calls, it is created when the stub is created but immediately closed.
For EJB remote calls there is the property exposeAccessContext on AbstractSlsbInvokerInterceptor which exists for this Weblogic case.
The same property should be available on the class JndiRmiClientInterceptor to provide the same feature, that is creating an InitialContext before the remote call and closing it after. Without such a feature, it is impossible to use security with Spring remoting and RMI/weblogic
Affects: 3.0.6
Referenced from: commits cca255b, c374389
Backported to: 3.1.4
The text was updated successfully, but these errors were encountered: