Sunday, October 26, 2014

Confrontation with Terrorist - Part 2

Continuing from the last episode of facing the terrorist head on....

Removed my shirt(this really adds to the courage… try it out), stepped into the room and closed the 
room from inside. The room had one cupboard attached to wall, A Refrigerator, 2 gas cylinders, A set of Bed and bed sheets on the floor on one corner and 2 brooms near the door.  As mentioned earlier a steel pipe connecting from one wall to the shirt hanger at the opposite side. I reckoned our terrorist should have made his way to his hiding through the window and through the steel pipe.

I created a plan in 5 seconds. I decided that I would use 2 brooms to the fullest possible extent as a weapon to kill the terrorist. I closed all the escape routes for terrorist(and even me) to outside. The only possible place where he could have gone was to the place where bed and cylinders were kept. I decided come what may, I would kill him. I put my mobile into silent mode(not to lose concentration). I could have blasted cylinder, but why would someone take a bath if his hands are unclean. J J I decided against that as a foolish idea.

I didn’t know about his plans. He was in a much higher position than me, and could have jumped on me at any time. I decided to use one of my cricketing shots (hook) to the best possible extent to prevent the attack.( you should have seen my shot in world cup 2003 against Andrew Caddick – The ball went out of the ground and Believe me this would have.. twice the distance.. I was that angry)

I started executing the plan…. I held 2 brooms in both hands and from one I started slowly removing shirts from hangers …. One by one. I removed them gently and placed them on floor and made sure that our terrorist wasn’t there in that. After 5 minutes of  hard work, I saw his Tail hanging from a pocket of my favorite shirt. I could have hit him there itself, but I didn’t want to lose the shirt.
So, slowly and steadily removed the shirt from hanger and placed it on floor, tempted terrorist to come out of the pocket. He ran, ran like the ball cover driven by me…(you must have seen many),


But this time, instead of follow through/Watching in admiration I had to stop it and I had to kill that “ball like terrorist”. I put the right hand broom into work. Using all  my strength, I gave a shot at him. Tried hitting him as hard as I could. But, thanks to local broom manufacturers, the broom fell apart, the sticks scattered all around. But, Terrorist was unscathed. 

Saturday, October 25, 2014

Manage JMS queues on IBM Websphere 7.1 using JACL

We observe sometimes that, the JMS Messages go into a infinite processing mode,  where the same messages gets repeatedly processed by the MDB, and the only way to stop it - is by removing the message from the JMS Queue.

The IBM Websphere interface for removing the message from queue is not so user friendly. It can be done either through the python script or the JACL.

Below are the simple steps to be followed to manqage JMS Queues in Websphere -

To get depth of all queues -

# List all queues/Depth of queues
set qpoint "WebSphere:*,type=SIBQueuePoint"
set queues [$AdminControl queryNames $qpoint]

foreach q $queues { set identifier [$AdminControl getAttribute $q identifier];set size [$AdminControl getAttribute $q depth];puts "$identifier size: $size messages";puts [$AdminControl getAttributes $q] }


To get depth of a particular queue - 

#List number of Messages in a Queue
./wsadmin.sh -user system -password password -conntype SOAP -port 10505

set qpoint "WebSphere:type=SIBQueuePoint,SIBMessagingEngine=TestNode01.server-server_ILS_QUEUE_CONNECTOR.sib,name=app_DEFAULT_JMS_DLQ,*"
set queues [$AdminControl queryNames $qpoint]
set identifier [$AdminControl getAttribute $queues identifier]
set size [$AdminControl getAttribute $queues depth]
puts "$identifier size: $size messages"
puts [$AdminControl getAttributes $queues]

To clear all JMS Messages from a queue -

#Delete messages from Queue
set qstring "WebSphere:type=SIBQueuePoint,SIBMessagingEngine=TestNode01.server-server_ILS_QUEUE_CONNECTOR.sib,name=app_DEFAULT_JMS_DLQ,*"
#set qobject [$AdminControl makeObjectName $qstring]
#set null [java::null]
set queriedobject [$AdminControl queryNames $qstring]
set params [java::new {java.lang.Object[]} 1]
$params set 0 false
$AdminControl invoke $queriedobject deleteAllQueuedMessages $params

Command for Admin Control - 

http://publib.boulder.ibm.com/infocenter/wsdoc400/v6r0/index.jsp?topic=/com.ibm.websphere.iseries.doc/info/ae/ae/rxml_admincontrol.html