Class RollbackDefinition

All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.LineNumberAware, Block, org.apache.camel.NamedNode, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.spi.IdAware

@Metadata(label="eip,routing") public class RollbackDefinition extends NoOutputDefinition<RollbackDefinition>
Forces a rollback by stopping routing the message
  • Constructor Details

    • RollbackDefinition

      public RollbackDefinition()
    • RollbackDefinition

      public RollbackDefinition(String message)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getShortName

      public String getShortName()
    • getLabel

      public String getLabel()
      Description copied from class: ProcessorDefinition
      Returns a label to describe this node such as the expression if some kind of expression node
      Specified by:
      getLabel in interface org.apache.camel.NamedNode
      Overrides:
      getLabel in class ProcessorDefinition<RollbackDefinition>
    • getMessage

      public String getMessage()
    • setMessage

      public void setMessage(String message)
      Message to use in rollback exception
    • getMarkRollbackOnly

      public String getMarkRollbackOnly()
    • setMarkRollbackOnly

      public void setMarkRollbackOnly(String markRollbackOnly)
      Mark the transaction for rollback only (cannot be overruled to commit)
    • getMarkRollbackOnlyLast

      public String getMarkRollbackOnlyLast()
    • setMarkRollbackOnlyLast

      public void setMarkRollbackOnlyLast(String markRollbackOnlyLast)
      Mark only last sub transaction for rollback only.

      When using sub transactions (if the transaction manager support this)