-
1. Re: Reusing options in PojoCache
jason.greene Oct 31, 2007 5:41 PM (in response to brian.stansberry)Thanks for the heads up. I checked and 2.0 doesn't make this mistake. I will take a look at patching the 1.4 branch.
-
2. Re: Reusing options in PojoCache
brian.stansberry Oct 31, 2007 5:58 PM (in response to brian.stansberry)FYI, Manik's going to have to respin 1.4.1.SP6 due to JBCACHE-1209, so you might want to get the change in the respin.
-
3. Re: Reusing options in PojoCache
mircea.markus Nov 1, 2007 12:14 PM (in response to brian.stansberry)if we do not want the users to reuse the option, wouldn t it be a good idea to enforce this through a runtime exception (if possible)? Perhaps we can do this when the user changes the option after being used (an Option method to throw an exception). Or perhaps when the option is passed to the cache
-
4. Re: Reusing options in PojoCache
manik Nov 1, 2007 1:16 PM (in response to brian.stansberry)I guess the InvocationContextInterceptor could mark all options as used on the way out, so that it barfs if it is reused/passed back in without being reset(). Does cause a problem with nested calls though.
-
5. Re: Reusing options in PojoCache
brian.stansberry Nov 1, 2007 1:23 PM (in response to brian.stansberry)Perhaps clone the Option in InvocationContext.setOptionOverride()?
(Above is only a suggestion if "document the issue to tell people not to do this" is consider insufficient.)