[webbeans-dev] [TCK] ContextTest#testGetContextWithTooManyActiveContextsFails

Mark Struberg struberg at yahoo.de
Thu Feb 26 11:42:20 EST 2009


Hi!

I have a question on the 
ContextTest#testGetContextWithTooManyActiveContextsFails()

The spec says that 2 _active_ contexts may not be registered at the same time. 

However, you assume an IllegalArgumentException to be thrown if two active contexts exists while calling the addContext() function (btw cannot find this in the Spec).

On the other hand, the Spec requests to throw an IllegalStateException for the getContext() if two active contexts exist.

Can we harmonise this?
Or if ok the way it is, explain the background?
This imho seams to interfere with the 'general rules' of jsr-299 Exceptions you (or Gavin) mentioned in a post a few months ago

txs and LieGrue,
strub




      




More information about the weld-dev mailing list