Author: Steve

WLST script to take thread dumps

Quick wlst script to take thread dumps inside the running container… connect (‘weblogic’,’welcome1′,’t3://localhost:7001′) counter = 0 sleepTime = 5000 for counter in range(10): serverName = ‘AdminServer’ java.lang.Thread.sleep(sleepTime) fileName = ‘dump’ + serverName + counter + ‘.dmp’ threadDump(‘true’, fileName, serverName)

Where does ActiveMQ store subscriber information?

After subscribing, you will see an entry in the ACTIVEMQ_ACKS table… SQL> select container,client_id from esb.activemq_acks; CONTAINER CLIENT_ID —————————————- —————————————- topic://testTopic me topic://testTopic mysubscriber topic://testTopic mysubscriber2 SQL> Once unsubscribe has been run on the subscriber… ConnectionFactory connectionFactory=new ActiveMQConnectionFactory(“admin”, “admin”, “tcp://localhost:61616”);…

Simple camel project with full maven instructions

Generate maven project stub directory… mvn archetype:generate -DgroupId=com.yourcompany.it.arch.poc.esb -DartifactId=esbpoc -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false …then create the single class in our POC… package com.yourcompany.it.arch.poc.esb; import javax.jms.ConnectionFactory; import org.apache.activemq.*; import org.apache.camel.*; import org.apache.camel.builder.*; import org.apache.camel.component.jms.*; import org.apache.camel.impl.*; public final class App { public static…

Printing java command line flags

Just a quickie as I often forget this for some reason. If you need to obtain a particular switch, whether the default or as configured in a running process, what is below will get it for you. Normally, outside of…

Parsing ODI logs for scenario run time

Pretty random, but I needed this earlier this morning to troubleshoot a heap sizing issue in the ODI domain. This will print the scenario, the tid associated (needed if the same scenario is run more than once concurrently), and the…

Creating a barcode in java

Nice little library to do this is located at http://www.barcodelib.com/java_barcode/main.html… import com.barcodelib.barcode.*; public class MyBarCode { public static void main (String args[]) throws Exception { Linear barcode = new Linear(); barcode.setType(Linear.UPCA); java.util.Random r = new java.util.Random(); String str = new…

Managing F5 load balancers with the python bigsuds library

Connecting to a GTM from bigsuds import * b = BIGIP(hostname = ‘GTM_Name_orIP’, username = ‘your_username’, password = ‘your_password’) for pool in b.GlobalLB.Pool.get_list(): for member in b.GlobalLB.Pool.get_member([pool]): for i in range(len(member[0])): print “Pool =”, pool, \ “, IP”,member[i][‘member’][‘address’], \ “listens…

Birthday paradox in python

I love things like this. Earlier, we produced a working example of the Monte Hall problem. In this post, we show something similar for the birthday paradox… c:\Python27>type c:\Users\showard\bday.py from random import randint cnt = 0 for k in range(2000):…