禁用java rmi,有没有办法在java应用程序中完全禁用RMI?

博客内容探讨了在使用Netty为基础的命令调度系统时,如何避免RMI(远程方法调用)在每个JVM上创建大量线程的问题。作者指出,RMI只有在被使用时才会启动线程,可能是通过如JMX这样的方式在不知情的情况下被调用。解决方案是检查是否无意中使用了RMI,并考虑禁用或配置它以减少线程使用。
摘要由CSDN通过智能技术生成

In our application remote Procedure call is solved with an own netty based command dispatcher system. We have a lot of modules (about 20) and I want to run all modules in separate jvm-s. My problem is, that RMI spawns about 17 threads for each JVM. I do not need RMI at all (as far as I know).

Can I completely disable RMI for a jvm? Or at least configure it in a way that it does not use this many threads?

解决方案

StuartMarks is correct. RMI doesn't start any threads until you use it.

Possibly you are using it in some way of which you are unaware, e.g. JMX?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值