}
//now for a remote sucker, we need to update the messages status
if (remote)
{
PersistenceManager pm = sessionEndpoint.getPersistenceManager();
if (ref.getMessage().isReliable() && messageQueue.isRecoverable())
{
try
{
pm.updateMessageState(messageQueue.getChannelID(), ref, "S");
}
catch (Exception e)
{
//we need to stop the sucking process. the message should be re-delivered.
log.error("Failed to update state for message: " + ref, e);