Java Trip
JMX, OSB and JMS all went on a pleasant little trip.
Author: Tony K.
Published: March 4, 2020
The article details an exercise in programmatically deleting messages from a JMS error queue within a WebLogic-managed Oracle Service Bus (OSB) cluster using Java Management Extensions (JMX).
Key Steps Covered:
- Connecting: Utilized the WebLogic client JAR via standard protocols (
t3,t3s,http,https,iiop,iiops). - Navigating: Traversed the hierarchical WebLogic MBean tree structure to locate the target queue.
- Inspecting & Invoking: Used MBean operations to inspect messages. (Note: The original article includes an uncaptioned reference image here).
- Deleting Messages: Rather than using a non-existent singular delete method, the process requires invoking
deleteMessagescombined with a SQL-like message selector:
connection.invoke(
jmsDestination,
"deleteMessages",
new Object[] {"JMSMessageID='XXX'"},
new String[] {"java.lang.String"}
);
For the complete, unedited text and original formatting, please refer to the source article on LinkedIn.