我是 JBOSS 的新手。我正在尝试编写一个 mBean,它将使用 JGroups 从 AS 内通过多播通道进行通信。我在我的 mBean 中使用的代码如下......
public void create() throws Exception {
channel=new JChannel("test/udp.xml");
channel.connect("ChatCluster");
}
public void sendMsg() throws ChannelNotConnectedException,
ChannelClosedException {
channel.send(new org.jgroups.Message(
null,null, "hello from the server!"));
}
我还创建了一个正在侦听频道的客户端,但两者没有通信..这是频道的 XML ..
<UDP
mcast_port="45700"
mcast_addr="224.0.0.11"
tos="8"
ucast_recv_buf_size="20000000"
ucast_send_buf_size="640000"
mcast_recv_buf_size="25000000"
mcast_send_buf_size="640000"
loopback="true"
discard_incompatible_packets="true"
max_bundle_size="64000"
max_bundle_timeout="30"
ip_ttl="${jgroups.udp.ip_ttl:32}"
enable_bundling="true"
enable_diagnostics="true"
thread_naming_pattern="cl"
thread_pool.enabled="true"
thread_pool.min_threads="2"
thread_pool.max_threads="8"
thread_pool.keep_alive_time="5000"
thread_pool.queue_enabled="true"
thread_pool.queue_max_size="10000"
thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
oob_thread_pool.min_threads="1"
oob_thread_pool.max_threads="8"
oob_thread_pool.keep_alive_time="5000"
oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="Run"/>
任何帮助将不胜感激,因为我已经为此花费了一些领带并试图解决这个问题。我更愿意使用其他一些通信机制,但是我仅限于使用多播......长篇大论......
谢谢!!!
〜螺栓