[infinispan-dev] Throwing an IllegalStateException subclass when cache/cachemanager stopping/stopped Re: ISPN-4717

Galder Zamarreño galder at redhat.com
Thu Sep 11 10:51:02 EDT 2014


Re: https://issues.jboss.org/browse/ISPN-4717

While investigating [1], I discovered that when clients send operations to terminated/terminating caches, these are not recovered from. To make this easier to handle, I’d like to change cache/cachemanager from throwing IllegalStateException to throwing a new exception that extends IllegalStateException, e.g. CacheStopping/StoppedException or similar. By making it IllegalStateException, it should create minimal disruption for anyone expecting IllegalStateException, although I don’t think this is documented per se. This, together with a HR error code that accompanies it, should make it easier for clients to deal with it and retry.

A new error code will also be added for suspected caches since these are still propagated to clients. Up until know, this has been dealt with by checking the error message, but that could break easily, so again, the later stages of HR 2.0 protocol implementation is good moment for implement these two things.

If anyone has any objections, speak up :)


[1] https://issues.jboss.org/browse/ISPN-4707
Galder Zamarreño
galder at redhat.com

More information about the infinispan-dev mailing list