[infinispan-dev] ISPN-1797 MongoDB cachestore - pending question

Mircea Markus mmarkus at redhat.com
Tue May 21 09:21:24 EDT 2013


On 20 May 2013, at 22:12, Guillaume SCHEIBEL <guillaume.scheibel at gmail.com> wrote:

> Hi Sanne,
> 
> You probably missed the notification but there is still one pending question I asked you for the pull request:
> 
> @Sanne, I would like the MongoDBCacheStoreConfig constructor to return an exception if the port is not properly set (between 1 and 65535) but how to handle it in the caller ? 
The port validation is not mandatory as the user would notice the problem when trying to connect to the mongodb instance, i.e. at start up time vs configuration time (if you throw the exception). If anything I think the validation should be moved in MongoDBCacheStoreConfigurationBuilder.validate (override from AbstractStoreConfigurationBuilder) method which would trow an (runtime) ConfigurationException.

> I can't rethrow it from adapt() so ?
> 
> Thanks 
> 
> Guillaume
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

Cheers,
-- 
Mircea Markus
Infinispan lead (www.infinispan.org)







More information about the infinispan-dev mailing list