【发布时间】:2019-03-19 09:56:16
【问题描述】:
CORBA 新手,但可以建立从客户端到服务器的远程方法调用。使用拦截器并尝试加密远程方法的参数时,它会抛出以下错误
Failed to initialise ORB: org.omg.CORBA.NO_RESOURCES: vmcid: OMG minor code: 1 completed: No org.omg.CORBA.NO_RESOURCES: vmcid: OMG minor code: 1completed: No at com.sun.corba.se.impl.logging.OMGSystemException.piOperationNotSupported1(Unknown Source)
at com.sun.corba.se.impl.logging.OMGSystemException.piOperationNotSupported1(Unknown Source)
at com.sun.corba.se.impl.interceptors.ClientRequestInfoImpl.arguments(Unknown Source)
at orb.CustomClientInterceptor.send_request(CustomClientInterceptor.java:23)
我正在尝试从拦截器访问参数并像下面这样加密它们。
public void send_request( ClientRequestInfo ri )
{
System.out.println( ri.arguments() );
System.out.println( "Arguments.." );
logger( ri, "send_request" );
}
但甚至无法访问它们,它会引发上述错误。拦截方法调用正常。你能指导我一些代码或链接吗?
提前致谢
【问题讨论】:
-
这不是rmi,这是直接CORBA编程。遗憾的是,J2SE 并不支持所有的拦截。
-
CORBA 有拦截器??
-
@Antoniossss 当然,服务器端和客户端。见org.omg.PortableInterceptor。
-
@Antoniossss 检查代码如果你想有一个拦截器,然后操作远程对象的参数。
-
@user207421,我发现只有 DII 和 DSI 调用被允许访问和操作远程对象的参数。看看我的回答