Skip to content

Commit

Permalink
Merge pull request #626 from tedpet/TedPull
Browse files Browse the repository at this point in the history
update to jGroups 3.6.1,
  • Loading branch information
darkv committed Sep 21, 2015
2 parents 622a12e + 8ca0744 commit 0bb032d
Show file tree
Hide file tree
Showing 7 changed files with 217 additions and 221 deletions.
2 changes: 1 addition & 1 deletion Frameworks/EOF/ERJGroupsSynchronizer/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="Sources"/>
<classpathentry kind="lib" path="Libraries/jgroups-2.6.8.jar"/>
<classpathentry kind="lib" path="Libraries/jgroups-3.6.1.Final.jar"/>
<classpathentry exported="true" kind="con" path="WOFramework/ERExtensions"/>
<classpathentry exported="true" kind="con" path="WOFramework/ERJars"/>
<classpathentry exported="true" kind="con" path="WOFramework/JavaEOAccess"/>
Expand Down
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions Frameworks/EOF/ERJGroupsSynchronizer/Resources/Properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Properies Info

java.net.preferIPv4Stack=true

er.extensions.load.Properties.framework.ERJGroupsSynchronizer=load
er.extensions.ERJGroupsSynchronizer.hasLocalization=false

Expand Down
99 changes: 52 additions & 47 deletions Frameworks/EOF/ERJGroupsSynchronizer/Resources/jgroups-default.xml
Original file line number Diff line number Diff line change
@@ -1,66 +1,71 @@
<config>
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
<UDP
mcast_addr="${er.extensions.jgroupsSynchronizer.multicastAddress:230.0.0.1}"
mcast_port="${er.extensions.jgroupsSynchronizer.multicastPort:9753}"
tos="0"
ucast_recv_buf_size="20000000"
ucast_send_buf_size="640000"
mcast_recv_buf_size="25000000"
mcast_send_buf_size="640000"
loopback="false"
discard_incompatible_packets="true"
max_bundle_size="64000"
mcast_port="${jgroups.udp.mcast_port:45588}"
ip_ttl="4"
tos="8"
ucast_recv_buf_size="5M"
ucast_send_buf_size="5M"
mcast_recv_buf_size="5M"
mcast_send_buf_size="5M"
max_bundle_size="64K"
max_bundle_timeout="30"
use_incoming_packet_handler="true"
ip_ttl="${er.extensions.jgroupsSynchronizer.multicastTTL:2}"
enable_bundling="true"
enable_diagnostics="false"
enable_diagnostics="true"
thread_naming_pattern="cl"

use_concurrent_stack="true"
timer_type="new3"
timer.min_threads="2"
timer.max_threads="4"
timer.keep_alive_time="3000"
timer.queue_max_size="500"

thread_pool.enabled="true"
thread_pool.min_threads="1"
thread_pool.max_threads="25"
thread_pool.keep_alive_time="30000"
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="10"
thread_pool.rejection_policy="Discard"
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="4"
oob_thread_pool.keep_alive_time="10000"
oob_thread_pool.queue_enabled="true"
oob_thread_pool.queue_max_size="10"
oob_thread_pool.rejection_policy="Run"/>
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="discard"/>

<PING timeout="2000"
num_initial_members="3"
num_ping_requests="5"
num_initial_srv_members="1"/>
<MERGE2 max_interval="30000"
<PING />
<MERGE3 max_interval="30000"
min_interval="10000"/>
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<FD_ALL/>
<VERIFY_SUSPECT timeout="1500" />
<BARRIER />
<pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800"
discard_delivered_msgs="true"
use_stats_for_retransmission="false"
exponential_backoff="150"/>
<UNICAST timeout="300,600,1200,2400,3600"/>
<pbcast.NAKACK2 xmit_interval="500"
xmit_table_num_rows="100"
xmit_table_msgs_per_row="2000"
xmit_table_max_compaction_time="30000"
max_msg_batch_size="500"
use_mcast_xmit="false"
discard_delivered_msgs="true"/>
<UNICAST3 xmit_interval="500"
xmit_table_num_rows="100"
xmit_table_msgs_per_row="2000"
xmit_table_max_compaction_time="60000"
conn_expiry_timeout="0"
max_msg_batch_size="500"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
max_bytes="1000000"/>
<VIEW_SYNC avg_send_interval="60000" />
<pbcast.GMS print_local_addr="true" join_timeout="3000"
shun="false"
max_bytes="4M"/>
<pbcast.GMS print_local_addr="true" join_timeout="2000"
view_bundling="true"/>
<FC max_credits="20000000"
min_threshold="0.10"/>
<FRAG2 frag_size="60000" />
<!--pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/-->
<pbcast.STATE_TRANSFER />
<UFC max_credits="2M"
min_threshold="0.4"/>
<MFC max_credits="2M"
min_threshold="0.4"/>
<FRAG2 frag_size="60K" />
<RSVP resend_interval="2000" timeout="10000"/>
<pbcast.STATE_TRANSFER />
<!-- pbcast.FLUSH /-->
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
import java.net.URL;

import org.apache.log4j.Logger;
import org.jgroups.Channel;
import org.jgroups.ChannelClosedException;
import org.jgroups.ChannelException;
import org.jgroups.ChannelNotConnectedException;
import org.jgroups.ExtendedReceiverAdapter;
import org.jgroups.JChannel;
import org.jgroups.Message;
import org.jgroups.ReceiverAdapter;
import org.jgroups.View;

import com.webobjects.appserver.WOApplication;
Expand Down Expand Up @@ -48,7 +44,7 @@ public class ERJGroupsNotificationCenter extends ERXRemoteNotificationCenter {

private static volatile ERJGroupsNotificationCenter _sharedInstance;

protected ERJGroupsNotificationCenter() throws ChannelException {
protected ERJGroupsNotificationCenter() throws Exception {
String jgroupsPropertiesFile = ERXProperties.stringForKey("er.extensions.jgroupsNotificationCenter.properties");
String jgroupsPropertiesFramework = null;
if (jgroupsPropertiesFile == null) {
Expand All @@ -67,9 +63,9 @@ protected ERJGroupsNotificationCenter() throws ChannelException {
URL propertiesUrl = WOApplication.application().resourceManager().pathURLForResourceNamed(jgroupsPropertiesFile, jgroupsPropertiesFramework, null);
_channel = new JChannel(propertiesUrl);
_postLocal = ERXProperties.booleanForKeyWithDefault("er.extensions.jgroupsNotificationCenter.postLocal", false);
_channel.setOpt(Channel.LOCAL, Boolean.FALSE);
_channel.setDiscardOwnMessages(Boolean.FALSE);
_channel.connect(_groupName);
_channel.setReceiver(new ExtendedReceiverAdapter() {
_channel.setReceiver(new ReceiverAdapter() {

@Override
public void receive(Message message) {
Expand Down Expand Up @@ -108,7 +104,7 @@ public static void install() {
try {
_sharedInstance = new ERJGroupsNotificationCenter();
setDefaultCenter(_sharedInstance);
} catch (ChannelException e) {
} catch (Exception e) {
throw NSForwardException._runtimeExceptionForThrowable(e);
}
}
Expand All @@ -128,7 +124,7 @@ public void postRemoteNotification(NSNotification notification) {
}
}

protected void writeNotification(NSNotification notification) throws ChannelNotConnectedException, ChannelClosedException, IOException {
protected void writeNotification(NSNotification notification) throws Exception, IOException {
RefByteArrayOutputStream baos = new RefByteArrayOutputStream();
ObjectOutputStream dos = new ObjectOutputStream(baos);
dos.writeObject(notification.name());
Expand Down
Loading

0 comments on commit 0bb032d

Please sign in to comment.