log.error("UnicastTest2.start(): first seqno must be 1");
System.err.println("UnicastTest2.start(): first seqno must be 1");
    public void start() throws Exception {	Object            obj;	Message           msg;	View              view;	Vector            tmp;	UnicastTest2Info  info, myinfo;	Object            sender;	channel=new JChannel(props);	channel.connect(groupname);	System.out.println("[ready]");	while(true) {	    try {		obj=channel.receive(0);		if(obj instanceof View) {		    view=(View)obj;		    tmp=view.getMembers();		    mbrs.removeAllElements();		    for(int i=0; i < tmp.size(); i++)			mbrs.addElement(tmp.elementAt(i));		    		    for(Enumeration e=senders.keys(); e.hasMoreElements();) {			sender=e.nextElement();			if(!mbrs.contains(sender)) {			    mbrs.removeElement(sender);			}		    }		    		    if(mbrs.size() > 1) {			if(writer == null) {			    writer=new Thread(this, "WriterThread");			    writer.start();			}		    }		    else {			if(writer != null) {			    running=false;			    writer.interrupt();			}			writer=null;		    }		}		else if(obj instanceof Message) {		    msg=(Message)obj;		    info=(UnicastTest2Info)msg.getObject();		    System.out.println("Received msg: " + info);		    myinfo=(UnicastTest2Info)senders.get(info.sender);		    if(myinfo == null) { // first msg			if(info.msgno == 1) {			    // must be 1			    senders.put(info.sender, info);			}			else {			    // error			    log.error("UnicastTest2.start(): first seqno must be 1");			}		    }		    else {			if(info.msgno -1 != myinfo.msgno) {			    log.error("UnicastTest2.start(): received msg " + info.sender + ':' +					       info.msgno + ", but last received was " +					       myinfo.sender + ':' + myinfo.msgno);			}			else {			    System.out.println("UnicastTest2.start(): OK received " + info.sender + ':' +					       info.msgno + ", prev seqno=" + myinfo.sender + ':' + myinfo.msgno);			    myinfo.msgno++;			}		    }		}		else		    ;	    }	    catch(ChannelClosedException closed) {		log.error("Channel closed");		break;	    }	    catch(ChannelNotConnectedException not_conn) {		log.error("Channel not connected");		break;	    }	    catch(Exception e) {		log.error(e);	    }	}    }