I have a requirement to limit the number of incoming connections, and if another connection is initiated as the limit is reached to send an XML response. This is for JBoss EAP 6, but a general standard servlet solution would work. How should I handle this? We don't exactly know the remote destinations for the inbound connections.
My first thought was to a develop a filter, but I have no idea how I would find out the number of open connections to a path.