Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
A NullPointerException can be thrown on client side if the application executes a function on a pool that has been destroyed.
The following code reproduces the issue:
ClientCache clientCache = new ClientCacheFactory().create(); PoolManager.createFactory().addLocator(InetAddress.getLocalHost().getHostName(), locator.getPort()).create("poolOne"); Region region = clientCache.createClientRegionFactory(PROXY).setPoolName("poolOne").create("TestRegion"); PoolManagerImpl.getPMI().unregister(PoolManager.find("poolOne")); FunctionService.onRegion(region).execute(testFunction).getResult();
The problem is that we don't verify whether the Pool is currently being used or not within the unregister method. The following should be done:
- Don't allow the user to unregister the pool when at least one region is associated to it.
- Throw a meaningful exception if the pool can't be found before executing the function.
Attachments
Issue Links
- links to