*/
protected static LinkInfo processLinkInit(Packet p) throws Exception {
String hostName = null;
String instName = null;
String brokerID = null;
UID brokerSessionUID = null;
UID storeSessionUID = null;
boolean ha = false;
int port = 0;
BrokerAddressImpl remote = null;
ByteArrayInputStream bis =
new ByteArrayInputStream(p.getPacketBody());
DataInputStream dis = new DataInputStream(bis);
int clusterVersion = dis.readInt();
hostName = dis.readUTF();
instName = dis.readUTF();
port = dis.readInt();
BrokerAddressImpl configServer = null;
boolean hasConfigServer = false;
String cfgHostName = null;
String cfgInstName = null;
int cfgPort = 0;
hasConfigServer = dis.readBoolean();
if (hasConfigServer) {
cfgHostName = dis.readUTF();
cfgInstName = dis.readUTF();
cfgPort = dis.readInt();
}
Properties props = new Properties();
int nprops = dis.readInt();
for (int i = 0; i < nprops; i++) {
String prop = dis.readUTF();
String value = dis.readUTF();
props.setProperty(prop, value);
}
if (clusterVersion >= ProtocolGlobals.VERSION_400) {
ha = dis.readBoolean();
if (dis.readBoolean()) {
brokerID = dis.readUTF();
}
brokerSessionUID = new UID(dis.readLong());
if (ha) storeSessionUID = new UID(dis.readLong());
}
if (hasConfigServer) {
if (ha) {
throw new BrokerException(