System.err.println("->Connect to avalon ...");
avalonCon = serverHelper.connect(serverHelper.getAvalonGlob(), null);
{
System.err.println("->Connect to bilbo ...");
bilboCon = serverHelper.connect(serverHelper.getBilboGlob(), 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 "";
}
updateCounterBilbo++;
log.info(
"Receiving update '" + updateKey.getOid() + "' " + updateCounterBilbo + " ...");
assertEquals("Wrong message updated", oid, updateKey.getOid());
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 "";
}