try
{
// Log incomming protocol negotiation request
_actor.message(ConnectionMessages.OPEN(null, pi.getProtocolMajor() + "-" + pi.getProtocolMinor(), null, false, true, false));
ProtocolVersion pv = pi.checkVersion(); // Fails if not correct
// This sets the protocol version (and hence framing classes) for this session.
setProtocolVersion(pv);
String mechanisms = _broker.getSubjectCreator(getLocalAddress()).getMechanisms();
String locales = "en_US";
FieldTable serverProperties = FieldTableFactory.newFieldTable();
serverProperties.setString(ServerPropertyNames.PRODUCT,
QpidProperties.getProductName());
serverProperties.setString(ServerPropertyNames.VERSION,
QpidProperties.getReleaseVersion());
serverProperties.setString(ServerPropertyNames.QPID_BUILD,
QpidProperties.getBuildVersion());
serverProperties.setString(ServerPropertyNames.QPID_INSTANCE_NAME,
_broker.getName());
serverProperties.setString(ConnectionStartProperties.QPID_CLOSE_WHEN_NO_ROUTE,
String.valueOf(_closeWhenNoRoute));
AMQMethodBody responseBody = getMethodRegistry().createConnectionStartBody((short) getProtocolMajorVersion(),
(short) pv.getActualMinorVersion(),
serverProperties,
mechanisms.getBytes(),
locales.getBytes());
_sender.send(asByteBuffer(responseBody.generateFrame(0)));
_sender.flush();