Affects Version/s: 2.3.4
Fix Version/s: 2.3.6
Currently GrizzlyService.removeNetworkProxy takes NetworkListener.name (id) as parameter for removing.
There are two issues:
1) If more than one NetworkListener instances with the same name were added by GrizzlyService.createNetworkProxy(NetworkListener listener) (that is valid operation), then removeNetworkProxy can delete only 1 of them.
2) And also we have no way to delete a specific NetworkListener among those with same name.
JMS might create more NetworkListener instances which are bound to the same LazyServiceInitializer for inbound requests handling, so the listerners must have the same name to achive this according to current Grizzly implementation (Refer to com.sun.enterprise.v3.services.impl.ServiceInitializerFilter.handleAccept(final FilterChainContext ctx) for details).
1) Add identifier id for NetworkListener. For example, new NetworkListener(String id).
2) Add a method removeNetworkProxy(String name, String id) to GrizzlyService, which will remove the listener with both name and id matched.
3) Change method GrizzlyService.removeNetworkProxy(String id) to removeNetworkProxy(String name), which should remove all listeners with the name.