List of usage examples for javax.resource ResourceException getMessage
public String getMessage()
From source file:org.ikasan.connector.basefiletransfer.outbound.command.RetrieveFileCommand.java
/** * (non-Javadoc)//from ww w . j a va 2s . c o m * @see org.ikasan.connector.base.command.AbstractTransactionalResourceCommand#doCommit() */ @Override protected void doCommit() throws ResourceException { try { logger.info("commit called on this command:" + this + "]"); //$NON-NLS-1$ //$NON-NLS-2$); logger.info("isMoveOnSuccess [" + moveOnSuccess + "]"); //$NON-NLS-1$ //$NON-NLS-2$); logger.debug("isRenameOnSuccess [" + renameOnSuccess + "]"); //$NON-NLS-1$ //$NON-NLS-2$); logger.debug("isDestructive [" + destructive + "]"); //$NON-NLS-1$ //$NON-NLS-2$); if (renameOnSuccess) { renameFile(sourcePath, sourcePath + renameExtension); } else if (moveOnSuccess) { logger.info("moving file.."); //$NON-NLS-1$ renameFile(sourcePath, moveOnSuccessNewPath); } // TODO Delete the checksum else if (destructive) { // trying to delete the file deleteFile(sourcePath); } } catch (ResourceException exception) { logger.info("Caught ResourceException", exception); TransactionCommitException transactionCommitException = new TransactionCommitException( exception.getMessage(), exception); super.notifyListeners(transactionCommitException); throw exception; } }