Re: [Proposal] add isBound() to CacheServer API

2018-05-03 Thread Bruce Schuchardt
The serverSocket is bound to an address in AcceptorImpl's constructor.  If you want to wait until accept() is invoked you'll need to add some other state that can be checked. On 5/3/18 12:03 PM, John Blum wrote: Kirk- Please see your other email thread and my response [1] to that as 1

Re: [Proposal] add isBound() to CacheServer API

2018-05-03 Thread John Blum
Kirk- Please see your other email thread and my response [1] to that as 1 potential way to handle this situation. As I mentioned, I use this in the Spring Session client/server integration tests as a way to mitigate the NoSubscriptionsServersAvailableException. -j [1]

Re: [Proposal] add isBound() to CacheServer API

2018-05-03 Thread Bruce Schuchardt
That smells like a bug to me.  We don't have to be in accept() though - we just need to have the serversocket open and with sufficient backlog to queue the connection requests.  Adding a check for whether the socket is open in isRunning() might be good enough. On 5/3/18 11:26 AM, Kirk Lund

Re: [Proposal] add isBound() to CacheServer API

2018-05-03 Thread Kirk Lund
Looks like the problem is in QueueManagerImpl initialization so my suggestions won't fix the problem. Caused by: org.apache.geode.cache.NoSubscriptionServersAvailableException: Could not initialize a primary queue on startup. No queue servers available. at

[Proposal] add isBound() to CacheServer API

2018-05-03 Thread Kirk Lund
The method CacheServer.isRunning() is actually invoked from within the AcceptorImpl.accept(): while (isRunning()) { ... try { socket = serverSock.accept(); So we can't modify isRunning() to check serverSock.isBound(). We would have to introduce a new User API on