{
// wrong file permissions
Vector params = new Vector(1);
params.add(mFilename);
throw new XException(Constants.LOCATION_EXTERN,
Constants.LAYER_TECHNICAL,
Constants.PACKAGE_TECHNICAL_FILE, "17", params);
} // then (!checkFilePermissions())
else
{
try
{
// make copy and use this copy for read
mCopyname = mFilename + Constants.getDateAsString();
copyFile(mFilename, mCopyname);
if (!mConfiguration.getResolution().equals(
Constants.READ_PRESERVE))
{
// hide file from other using wenn
// resolution delete or rename
mBackupname = mFilename
+ Constants.BACKUP_SUFFIX;
renameFile(mFilename, mBackupname);
} // The content of the request.
// Subclasses may define their own request content.
Object requestContent = getRequestContent();
// call application layer
Adapter adapter = new Adapter();
adapter.callApplication(xbusSystem, requestContent,
getType());
// check the Adapter return code
// in case of "not success" throw new XException
if (Constants.RC_OK.equals(adapter.getReturncode()))
{
TAManager.getInstance().commit();
PostProcessor.start(xbusSystem, adapter
.getResponse(),
Constants.POSTPROCESSING_PERSYSTEM);
Trace.info("End processing "
+ xbusSystem.getCompleteName());
Trace
.info("----------------------------------------");
successful = true;
} // then
// (Constants.RC_OK.equals(adapter.getReturncode()))
else
{
TAManager.getInstance().rollback();
NotifyError.notifyError(this, xbusSystem,
adapter.getErrormessage(),
requestContent, null);
Trace.info("Error while processing "
+ xbusSystem.getCompleteName());
Trace
.info("----------------------------------------");
return false;
} // else
// (Constants.RC_OK.equals(adapter.getReturncode()))
} // try
catch (Throwable t)
{
// Something unexpected has happened.
TAManager.getInstance().rollback();
NotifyError.notifyError(this, xbusSystem, t
.getMessage(), null, null);
Trace.info("Error while processing "
+ xbusSystem.getCompleteName());
Trace
.info("----------------------------------------");
throw new XException(Constants.LOCATION_EXTERN,
Constants.LAYER_TECHNICAL,
Constants.PACKAGE_TECHNICAL_FILE, "0", t);
} // catch (Throwable t)
} // else (!checkFilePermissions())