*/
taManager = TAManager.getInstance();
taManager.clearManager();
taManager.begin();
Adapter adapter = new Adapter();
adapter.callApplication(source, request, Constants.TYPE_TEXT);
Object responseObject = adapter.getResponse();
if (Constants.RC_OK.equals(adapter.getReturncode()))
{
taManager.commit();
PostProcessor.start(source, responseObject,
Constants.POSTPROCESSING_PERSYSTEM);
Trace.info("End resending " + source.getCompleteName());
Trace.info("-----------------------------");
retString.append("Message from ").append(
source.getCompleteName()).append(
" successfully resent!");
File messageFile = new File(getDirectory()
+ Constants.FILE_SEPERATOR + filename);
if (messageFile.delete())
{
retString.append("<br>");
retString.append("File ").append(filename).append(
" has been deleted.");
}
else
{
retString.append("<br />");
retString.append("File ").append(filename).append(
" cannot be deleted.");
}
}
else
{
taManager.rollback();
Trace.info("Error while resending " + source.getCompleteName());
Trace.info("-----------------------------");
retString.append("Error while resending ").append(
source.getCompleteName()).append("<br>").append(
"Reason: ").append(adapter.getErrormessage()).append(
"<br>").append("File ").append(filename).append(
" has not been deleted.");
}
}
catch (Exception t)