[ 
https://issues.apache.org/jira/browse/GEODE-9049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Martin updated GEODE-9049:
-------------------------------
    Description: 
While writing a simple application, I found that the ClientCache.close() method 
did not respond the way that was expected according to the Javadocs.

 

The application code was:

 
{code:java}
public static void main(String[] args) {
 ClientCache cache = new ClientCacheFactory().addPoolLocator("127.0.0.1", 
10334).create();

  System.out.println(cache.getDefaultPool().getLocators());

  cache.close();
 
  System.out.println("Cache.close() called.");
  
System.out.println(cache.getDefaultPool().getLocators());
}
{code}
The output was:
{code:java}
[/127.0.0.1:10334]
Cache.close() called.
[/127.0.0.1:10334]
{code}
According to the Javadocs for the [cache.close() 
|https://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/client/ClientCache.html#close-boolean-]method,
 it seems that after calling cache.close() when a user calls 
cache.getDefaultPool().getLocators() the user should receive a 
*CacheClosedException,* instead of the locator address.

This can be found in the Javadocs under *Interface ClientCache* -> *close*

  was:
While writing a simple application, I found that the ClientCache.close() method 
did not respond the way that was expected according to the Javadocs.

 

The application code was:

 
{code:java}
public static void main(String[] args) {
 ClientCache cache = new ClientCacheFactory().addPoolLocator("127.0.0.1", 
10334).create();

  System.out.println(cache.getDefaultPool().getLocators());

  cache.close();
 
  System.out.println("Cache.close() called.");
  
System.out.println(cache.getDefaultPool().getLocators());
}
{code}
The output was:
{code:java}
[/127.0.0.1:10334]
Cache.close() called.
[/127.0.0.1:10334]
{code}
According to the Javadocs for the cache.close() method, it seems that after 
calling cache.close() when a user calls cache.getDefaultPool().getLocators() 
the user should receive a *CacheClosedException,* instead of the locator 
address.

This can be found in the Javadocs under *Interface ClientCache* -> *close*


> ClientCache.close() functionality doesn't seem to match the Javadoc
> -------------------------------------------------------------------
>
>                 Key: GEODE-9049
>                 URL: https://issues.apache.org/jira/browse/GEODE-9049
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>    Affects Versions: 1.15.0
>            Reporter: John Martin
>            Priority: Major
>
> While writing a simple application, I found that the ClientCache.close() 
> method did not respond the way that was expected according to the Javadocs.
>  
> The application code was:
>  
> {code:java}
> public static void main(String[] args) {
>  ClientCache cache = new ClientCacheFactory().addPoolLocator("127.0.0.1", 
> 10334).create();
>   System.out.println(cache.getDefaultPool().getLocators());
>   cache.close();
>  
>   System.out.println("Cache.close() called.");
>   
> System.out.println(cache.getDefaultPool().getLocators());
> }
> {code}
> The output was:
> {code:java}
> [/127.0.0.1:10334]
> Cache.close() called.
> [/127.0.0.1:10334]
> {code}
> According to the Javadocs for the [cache.close() 
> |https://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/client/ClientCache.html#close-boolean-]method,
>  it seems that after calling cache.close() when a user calls 
> cache.getDefaultPool().getLocators() the user should receive a 
> *CacheClosedException,* instead of the locator address.
> This can be found in the Javadocs under *Interface ClientCache* -> *close*



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to