Skip to main content

[jsr352-public] Re: ChunkTests#testChunkSkipMultipleExceptions question

  • From: Michael Minella < >
  • To: " " < >
  • Subject: [jsr352-public] Re: ChunkTests#testChunkSkipMultipleExceptions question
  • Date: Fri, 20 Sep 2013 13:14:58 -0500

Scott,

Where does the spec support this interpretation?  The ant file analogy is
too simplistic in to apply to this case because file systems don't have
inheritance.

My issue is that with the interpretation you're providing, that means that
include elements can be ignored even though a developer is explicitly
stating that an exception should be included.  It also prevents you from
excluding only parts of an exception hierarchy.  In the TCK's example, if
you wanted to configure to skip MyParentException, don't skip
MyChildException, but skip MyGrandchildException, how would that be done?

Michael

Thanks,
Michael Minella

http://www.michaelminella.com


On Fri, Sep 20, 2013 at 1:06 PM, Scott Kurz 
< >
 wrote:

> Michael,
>
> It is NOT the case that this gets interpreted as: skip (include) all
> MyParentException  except (exclude) all MyChildException except (include
> now) all MyGrandchildException.
> We realized this was confusing which is why we have this TCK test to
> clarify.
>
> This test is designed to enforce the spec implication that this:
>
>
> <skippable-exception-classes>
>   <include class="com.ibm.jbatch.tck.artifacts.reusable.MyParentException"
> />
>   <include class=
> "com.ibm.jbatch.tck.artifacts.reusable.MyGrandchildException"/>
>   <exclude class="com.ibm.jbatch.tck.artifacts.reusable.MyChildException"
> />
> </skippable-exception-classes>
>
>
> ends up equivalent to this:
>
>
>
>
> <skippable-exception-classes>
>   <include class="com.ibm.jbatch.tck.artifacts.reusable.MyParentException"
> />
>   <exclude class="com.ibm.jbatch.tck.artifacts.reusable.MyChildException"
> />
> </skippable-exception-classes>
>
> Ordering does not matter.   We can simply state:
> 1) skip an exception if is an instance of any include (or subclass)
>    UNLESS
> 2) it is an instance of any exclude (or subclass), and then don't skip.
>
> In the RI, see *com.ibm.jbatch.container.impl.SkipHandler.*
>
> I believe this is how include/excludes work with Ant fileset(s), for
> example.
>
> Hope that clears things up,
> ------------------------------------------------------
> Scott Kurz
> WebSphere Batch / Compute Grid Development
> T/L 295-5649;
> External Phone 845-435-5649
> 
> --------------------------------------------------------
>
> [image: Inactive hide details for Michael Minella ---09/20/2013 11:22:01
> AM---The test ChunkTests#testChunkSkipMultipleExceptions() exe]Michael
> Minella ---09/20/2013 11:22:01 AM---The test
> ChunkTests#testChunkSkipMultipleExceptions() executes a job that is
> configured to skip exce
>
> From: Michael Minella 
> < >
> To: 
> " "
>  
> < >,
> Date: 09/20/2013 11:22 AM
> Subject: [jsr352-public] ChunkTests#testChunkSkipMultipleExceptions
> question
> ------------------------------
>
>
>
> The test ChunkTests#testChunkSkipMultipleExceptions() executes a job that
> is configured to skip exceptions as follows:
>
> <skippable-exception-classes>
>   <include class="com.ibm.jbatch.tck.artifacts.reusable.MyParentException"
> />
>   <include class=
> "com.ibm.jbatch.tck.artifacts.reusable.MyGrandchildException"/>
>   <exclude class="com.ibm.jbatch.tck.artifacts.reusable.MyChildException"
> />
> </skippable-exception-classes>
>
>
> When executed, the job throws a MyParentException and a
> MyGrandchildException.  The test expects the first exception
> (MyParentException) to be skipped but the MyGrandchildException to be not
> be and the job to fail.  However, with the given configuration, I would
> expect that it should complete.  I would expect that the above
> configuration translates into "skip all MyParentExceptions and it's
> children except MyChildException and it's children except
> MyGrandchildException and it's children".  The spec doesn't state that
> there is any precedence between include and exclude (from what I can tell)
> and this interpretation allows for the exclusion of ranges of a class
> hierarchy.  For example, I'd expect to be able to configure the following:
>
> <skippable-exception-classes>
>   <include class="java.lang.Exception"/>
>   <include class="java.util.ConcurrentModificationException"/>
>   <exclude class="java.lang.RuntimeException"/>
> </skippable-exception-classes>
>
>
> I would expect this configuration to skip all checked exceptions and
> ConcurrentModificationException and fail for any others
> (ConcurrentModificationException extends RuntimeException).  Am I missing
> something?  Any insight is appreciated.
>
> Thanks,
> Michael Minella*
> ** *
>  
> < >*
> **http://www.michaelminella.com* ;<http://www.michaelminella.com/>
>
>

Attachment: graycol.gif
Description: GIF image



[jsr352-public] ChunkTests#testChunkSkipMultipleExceptions question

Michael Minella 09/20/2013

[jsr352-public] Re: ChunkTests#testChunkSkipMultipleExceptions question

Scott Kurz 09/20/2013

[jsr352-public] Re: ChunkTests#testChunkSkipMultipleExceptions question

Michael Minella 09/20/2013

[jsr352-public] Re: ChunkTests#testChunkSkipMultipleExceptions question

Scott Kurz 09/20/2013

[jsr352-public] Re: ChunkTests#testChunkSkipMultipleExceptions question

Michael Minella 09/20/2013

[jsr352-public] Re: ChunkTests#testChunkSkipMultipleExceptions question

Scott Kurz 09/20/2013

[jsr352-public] Re: ChunkTests#testChunkSkipMultipleExceptions question

Michael Minella 09/20/2013

[jsr352-public] Re: ChunkTests#testChunkSkipMultipleExceptions question

Scott Kurz 09/20/2013
 
 
Close
loading
Please Confirm
Close