Hello forums, I am new to the forums and to JBOSS. I am trying to write an mBean that will communicate from within the AS across a multicast channel using JGroups. The code I'm using in my mBean is below...
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!")); }
<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"/>
Thanks to everyone who never answered this question. I'll post what I found in the hope that it may help someone....
It turned out that I had multiple NIC cards on my system, so I set the flag receive_on_all_interfaces="true".