Problem:
- Product Name: VisiBroker for Java
- Product Version: 6.0
- Product Component: Event Service
- Platform/OS Version: All
This is in reference to the product example "events". When running an event service, when a push supplier is started, a connection is made to the event service. When the disconnect call is made to the event service before the quit call, a socket is never closed and remains in the CLOSE_WAIT state. Instead, if the quit call is made without making a disconnect call, then the socket is closed.
Resolution:
When a push supplier makes a disconnect call, then that particular connection is closed, but another connection is created which is the one that remains in the CLOSE_WAIT state.
This connection is created in the PushModelChannel to make a disconnect_push_supplier() callback invocation on the PushModel whenever the PushModel call pushConsumer.disconnect_push_consumer() when the menu option "d" is entered. So, if option "d" is not entered, no callback is made and so no connection is created to make an invocation and hence, the problem is not seen.
The callback invocation is to comply with the OMG Event Service Specification version 1.2. Specifically, the section "2.1.1 The PushConsumer Interface", following is the excerpt from it,
"The disconnect_push_consumer operation terminates the event communication; it
releases resources used at the consumer to support the event communication. The
PushConsumer object reference is disposed. Calling disconnect_push_consumer
causes the implementation to call the disconnect_push_supplier operation on the
corresponding PushSupplier interface (if that interface is known)."
Hence, the resolution to this issue is to set the property "vbroker.ce.iiop.ccm.connectionMaxIdle" property on the event service.
Related Articles
[[knowledge_base: VBJ - How to close the client connection programmatically]]
#VisiBroker
#Security




