我们的应用程序依赖于AuthorizationModule
来过滤远程上下文中的某些IP地址。这个模块在 JBoss 5.1.0.GA (with a known workaround)上运行得很好,但是在{strong> EAP-6.1.0.Alpha 上有效,因为{{1}名称模式发生了重大变化。
问:是否可以在以下环境中获取客户端IP地址?
Thread
到目前为止我尝试过:
致电import org.jboss.security.authorization.modules.AbstractAuthorizationModule;
public class MyAuthorizationModule extends AbstractAuthorizationModule {
@Override
public int authorize(Resource resource) {
//Caller is a standalone Java client, that connects to JBoss 7.x using EJB Remoting
String callerIP = ...;
}
}
。这会产生java.rmi.server.RemoteServer.getClientHost()
。
解析ServerNotActiveException
名称(related discussions)。
答案 0 :(得分:0)
我在JBoss Community的帮助下解决了我的问题。但是,这不是一个优雅的解决方案,因为我最终修补了应用程序服务器(EJB3模块)的内部。查看社区帖子了解更多详情。