response = new CreateSessionResponseMessage(server.getVersion().getIncrementingVersion());
}
catch (HornetQException e)
{
log.error("Failed to create session ", e);
response = new HornetQExceptionMessage((HornetQException)e);
if (e.getCode() == HornetQException.INCOMPATIBLE_CLIENT_SERVER_VERSIONS)
{
incompatibleVersion = true;
}
}
catch (Exception e)
{
log.error("Failed to create session ", e);
HornetQPacketHandler.log.error("Failed to create session", e);
response = new HornetQExceptionMessage(new HornetQException(HornetQException.INTERNAL_ERROR));
}
// send the exception to the client and destroy
// the connection if the client and server versions
// are not compatible