Thursday, July 26, 2007

grubby - a quick and dirty data generation tool

Over the past few weeks I've been open sourcing code from the last few projects I've worked on. It's firstly a set of classes providing random generation utilities plus some handy utility methods. These are available in a 0.1 release from the project website and you can use them now.

Building upon this, next I'll be working on a set of "data beans". The idea is that these will be simple POJO representations of a row in a database or a CSV file, capable of toString'ing themselves to CSV or a SQL insert statement and stored in collections which are self iterating (think ruby). If this sounds like your common or garden data model beans with a little extra functionality, you'd be right. Ideally, this component can leverage a from-schema generation tools based upon EJB 3.0/JPA 1.0 (such as Netbeans) so you don't have to write these yourself. These can be edited so they extend the grubby data beans abstract classes which provides the extra grubby functionality. To use, all you need to do is generate your beans, fill them with random data using the aforementioned generation utilities and then get them to toString themselves to the data upload file type of your choice - SQL or CSV.

Beyond this I plan to create a set of annotations to use so you can simplify the definition of the allowed values for an attribute and also specify the relationships between beans with ease. In addition, there will be a config engine so users can specify where input and output files are located and a set of common builders to reduce the need to implement some common elements entirely (e.g. Addresses).

So, if it sounds like this is something you might find useful, please go to the site and take a look. If you want the javadoc and other information, checkout the project source and generate the maven site (run the "maven site" goal). If you want to help, check out the code and have a look. If you have some comments, suggested changes or a patch, send me a mail. Enjoy.

Wednesday, July 18, 2007

Setting Trace Logging Levels in WAS 6.0 with JACL

I've recently had to change the trace logging levels in a WAS instance without the aid of the web UI. Here is the wsadmin JACL script which I used to do it:
# NOTE: Edit the following two variables for your environment
# They can be discerned from the path to your instance's bin directory
# The following shows the deployment manager ("dmgr") in the "myCell" node
set node myCell
set server dmgr

# Get up the variables required by the rest of the script
set svr [$AdminConfig getid /Node:$node/Server:$server/]
set ts [$AdminConfig list TraceService $svr]

# Modify the trace settings
# NOTE: Edit this settings string to reflect the settings you require
$AdminConfig modify $ts {{startupTraceSpecification *=warning=enabled:SystemErr=all=enabled}}

# Make the changes permanent
$AdminConfig save
To run it just save it as a file called set_trace_levels.jacl and run with the command:
./wsadmin.sh -port [SOAP port] -user [myWASAdminUID] -password [myPassword] -f set_trace_levels.jacl
NOTE: If you're on Windows, change "wsadmin.sh" to "wsadmin.bat"

Thursday, July 12, 2007

Overheard in I.T: "I am not a Number!"

Consultant #1: "We're a team. But we're a team of ... individuals..."
Consultant #2: ?!?!

-- Wardour Street, Soho, London

Apologies to Overheard in New York