Websphere 7 SIB Queue: how to access queue depth from Java?

The answer, for those that care is SOAP. Ok, so I've not managed to get the API used by WSADMIN to work, but I've used SOAP direct into websphere to ask it about the queues. Note: Default port is 8880 import java.util.

Iterator; import java.util. Map; import java.util. Properties; import java.util.

Set; import java.util. TreeMap; import javax.management. ObjectName; import org.apache.

Log4j. Logger; import com.ibm.websphere.management. AdminClient; import com.ibm.websphere.management.

AdminClientFactory; Properties connectProps = new Properties(); connectProps. SetProperty(AdminClient. CONNECTOR_TYPE, AdminClient.

CONNECTOR_TYPE_SOAP); connectProps. SetProperty(AdminClient. CONNECTOR_HOST, "127.0.0.1"); connectProps.

SetProperty(AdminClient. CONNECTOR_PORT, "8880"); AdminClient adminClient = null; try { adminClient = AdminClientFactory. CreateAdminClient(connectProps); Set s2 = adminClient.

QueryNames(new ObjectName("WebSphere:*"), null); if (!s2.isEmpty()) { Iterator I = s2.iterator(); while (i.hasNext()) { ObjectName on = i.next(); String type = on. GetKeyProperty("type"); if ("SIBQueuePoint". Equals(type)) { String queueName = on.

GetKeyProperty("name") ; int currentDepth = ((Integer) adminClient. GetAttribute(on, "depth")).intValue(); int maxSize = ((Integer) adminClient. GetAttribute(on, "highMessageThreshold")).intValue(); LOG.Info("Queried SIB queue: Queue: " + queueName + " Size =" + currentDepth + " highMessageThreshold:"+maxSize+""); } } } else { System.out.

Println("MBean was not found"); } } catch (Exception e) { LOG. Error("Error finding SIB queue details, message:" + e.getMessage(), e); }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions