Announcement Announcement Module
No announcement yet.
setter method called twice for extended FixedLengthTokenizer Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • setter method called twice for extended FixedLengthTokenizer

    I customized the FixedLengthTokenizer and included a property for it. if there is any exception arise in the setter method it is calling twice.

    Here is my code Snippet
    public class ExtendFixedTokenizer extends FixedLengthTokenizer {
    	private String formatFile;
    	public void setFormatFile(String formatFile) throws Exception {
    		this.formatFile = formatFile;
                    //calling a method which throws exception
    if there is any exception in the method the bean is loading again after it register the status in the jobRepositary. Also let me know if further details required

    Please advice if any thing wrong in this.

  • #2
    I think you have to be a bit more specific about how the method is being called, and by whom. Did the exception occur during a Step execution (e.g. because of a StepScope component including the tokenizer)? If so, I can imagine the Step might be executed again if your Job is configured that way, but we don't really know enough to guess. Or did it fail on start up of the application context?