Java service to find the Broker Queue Length on SSL'ed Broker


I’m trying to write a java service to find the Broker queue Length and the developed service works great for the Non-SSL’ed Broker. For SSL’ed Broker it doesn’t work.I managed to found that we should use BrokerConnectionDescriptor method when connecting to a client. So, i have also defined the BrokerConnectionDescriptor method with all the required Certificate details and the Compilation was successful but at the runtime, the service throws "error message: No Permission (109-1370): Cannot create or reconnect to client on Broker ‘brB2B01’ on host ‘a-wmbr04-d:14820’. Permission is denied." As per the Error message, the brB2B01’s ACL settings restrict the Integration server to connect to the Particular client but I have already added the IS and Broker Server’s username to the Broker server, and also the Broker’s Client Group. Even then I’m still getting the “Permission Denied” Exception.

Anybody experienced this problem before?
Please let me know what are the places, i have to check to solve this Permission issue.
Please find attached the Java code with this Note.

brokerQueueLength_v1.txt (2.21 KB)