You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Mark Struberg <st...@yahoo.de> on 2009/01/18 11:30:03 UTC
get() to a inactive Context
Houston, we have a problem:
There is a TCK test in ContextTest which checks for this spec part:
> 9.1. The Context interface
> At a particular point in the execution of the program a scope may
> be inactive with respect to the current thread. When a
> scope is inactive, any invocation of the get() from the current
> thread upon the Context object for that scope results in a
> ContextNotActiveException.
But we currently use a completely different logic for handling the Context as RI does. So we do 'activate' the Context 'on invocation' if I read this correctly.
see ContextTest#testGetContextWithNoActiveContextsFails()
LieGrue,
strub
Re: get() to a inactive Context
Posted by Gurkan Erdogdu <gu...@yahoo.com>.
Hi;
I corrected the Context semantic. But in the below test expected exception is written as
expectedExceptions={IllegalArgumentException.class} in the test case.
But in the final specification in chapter 9.6, it must throw IllegalStateException
Thanks;
/Gurkan
________________________________
From: Mark Struberg <st...@yahoo.de>
To: openwebbeans-dev@incubator.apache.org
Sent: Sunday, January 18, 2009 12:30:03 PM
Subject: get() to a inactive Context
Houston, we have a problem:
There is a TCK test in ContextTest which checks for this spec part:
> 9.1. The Context interface
> At a particular point in the execution of the program a scope may
> be inactive with respect to the current thread. When a
> scope is inactive, any invocation of the get() from the current
> thread upon the Context object for that scope results in a
> ContextNotActiveException.
But we currently use a completely different logic for handling the Context as RI does. So we do 'activate' the Context 'on invocation' if I read this correctly.
see ContextTest#testGetContextWithNoActiveContextsFails()
LieGrue,
strub