问题描述
我正在寻求实现JCA资源适配器以接受来自J2EE容器内的套接字连接.
我需要以某种方式能够使用 WorkManager 来管理netty的 NioServerSocketChannelFactory 任何帮助将不胜感激.
I am looking to implement a JCA Resource adapter to accept socket connections from within J2EE container.
I need to somehow be able to use WorkManager to manage threads in netty's NioServerSocketChannelFactory Any Help is greatly appreciated.
推荐答案
知道了! NioServerSocketChannelFactory将两个执行程序(老板和工作程序)作为构造函数的参数.因此,我要做的就是为WorkManager开发一个外观,以实现将使用workManager.schedule(...)调用的execute(Runnable)方法.
Got it! NioServerSocketChannelFactory takes two Executor(s), boss and worker, as parameters to the constructor. so all I need to do is develop a facade to WorkManager to implement execute(Runnable) method that will use workManager.schedule(...) call.
这篇关于如何与NioServerSocketChannelFactory和WorkManager结婚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!