tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vince Stewart <>
Subject Re: Share info across different sessions & servers
Date Wed, 03 Jul 2013 22:14:38 GMT
Hi Jose,

a couple of things,
1) I use embedded Tomcat to build my application and this has allowed me to
maintain 2 single-line patches in tribes classes by adding tribes source
code to my compilations. However those patches are only necessary with
large messages that take more than 3 seconds to be transmitted from the
transmitting machine to the Internet Service Provider machine (approx 0.5
meg for my system). There is a config setting (Sender/Transport/timeout)
that's supposed to alter this 3 second timeout limit but I'm not sure it
2) The implementation is not at all trivial. You have to register
StaticMember objects because usual member discovery does not work over
wide-area network (WAN). I allocate one machine as "SuperServer" and all
other machines have to enroll with SuperServer at startup. All machines
need to have a unique combination of Ipv4 address and port number (which
might represent a redirection port for use by the router whereupon
networked machines also need LAN addresses set). Once registration is
complete, all sub-Server machines can send/receive SuperServer and vice

There is a tutorial on-line which is adequate but not for WAN. I think you
have at least two weeks of work in front of you using tribes but I am very
happy I used this method.
None of my code would add much (except confusion) to that in the tutorial.
Make sure you start without multicast enabled as it currently is suitable
only for LAN.

 ///Class Constructor
 public ServerMessaging() throws SocketException{
 this.myChannel=new GroupChannel();
 ChannelListener msgListener = new ServerMessaging.MyMessageListener();
 MembershipListener mbrListener = new ServerMessaging.MyMemberListener();

  catch(ChannelException e){

public void detectOrderNumber_EnrollWithSuperServer() throws
setMyServerOrderStatus(); // machine reads its mac address or some file;
then from a table will set serverOrderNumber to 0 for superserver ; others
 if(this.getServerOrderNumber()==0){  ////meaning this is the superserver
 this.sendAckRequiredMessage(0,"Enrollment"); /// first argument specifies
SuperServer, member 0 (a table will need to be provided to hold IPv4
address and port for each member)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message