operationsExecuted.append("**************************************************************************************************\n");
operationsExecuted.append(HornetQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataHeader(metaKey, parameterValue) + "\n");
Set<ServerSession> allSessions = getSessions();
ServerSession sessionFound = null;
for (ServerSession session : allSessions)
{
try
{
String value = session.getMetaData(metaKey);
if (value != null && value.equals(parameterValue))
{
sessionFound = session;
operationsExecuted.append(HornetQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataClosingConnection(sessionFound.toString()) + "\n");
RemotingConnection conn = session.getRemotingConnection();
if (conn != null)
{
conn.fail(HornetQMessageBundle.BUNDLE.destroyConnectionWithSessionMetadataSendException(metaKey, parameterValue));
}