return "";
}
});
System.err.println("->Subscribe from bilbo ...");
SubscribeKey sk = new SubscribeKey(glob, oid);
sk.setDomain(domain);
SubscribeQos sq = new SubscribeQos(glob);
bilboCon.subscribe(sk.toXml(), sq.toXml());
}
{
System.err.println("->Connect to bilbo 2 ...");
final Global bilboGlob2 = serverHelper.getBilboGlob().getClone(null);
bilboCon2 = serverHelper.connect(bilboGlob2, new I_Callback() { // Login to xmlBlaster, register for updates
public String update(String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos) {
if (updateQos.isErased()) {
log.info("Ignoring erase message");
return "";
}
updateCounterBilbo2++;
log.info(
"Receiving update '" + updateKey.getOid() + "' " + updateCounterBilbo2 + " ...");
assertEquals("#2 Wrong message updated", oid, updateKey.getOid());
return "";
}
});
System.err.println("->Subscribe from bilbo 2 ...");
SubscribeKey sk = new SubscribeKey(glob, oid);
sk.setDomain(domain);
SubscribeQos sq = new SubscribeQos(glob);
bilboCon2.subscribe(sk.toXml(), sq.toXml());
}
// First test subscribe ...
{
System.err.println("->Publish to avalon ...");