[ 
https://issues.apache.org/jira/browse/GEODE-4366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16399387#comment-16399387
 ] 

Bruce Schuchardt commented on GEODE-4366:
-----------------------------------------

We can't make this change until the old deprecated way of creating a client 
cache is removed.  Changing isClient() to behave in the way suggested causes 
methods such as createRegion() and createRegionFactory() to throw 
UnsupportedOperationException if a Pool has been created.  These APIs are 
marked as deprecated but they do not function if isClient() returns true.  A 
large swath of unit tests failed when I did a precheckin run with this change.  
All of these tests will need to be modified to use the new ClientCacheFactory 
and clientRegionFactory mechanisms.

> GemFireCacheImpl.isClient should be implemented like GemFireCacheImpl.hasPool
> -----------------------------------------------------------------------------
>
>                 Key: GEODE-4366
>                 URL: https://issues.apache.org/jira/browse/GEODE-4366
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>            Reporter: Darrel Schneider
>            Priority: Major
>
> I think you can have a "client" that does not create its cache using 
> ClientCacheFactory. Instead it can use PoolManager to create a client 
> connection pool and then use CacheFactory and configure client regions to use 
> its pools.
> If this is done then the code that calls "isClient" will return false 
> indicating that we are not a client. But if you have a pool then you are a 
> client. I think the more proper implementation of "isClient" is this:
>     return this.isClient || !getAllPools().isEmpty();
> which is the current implementation of "hasPool".
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to