Here in the company I’m currently working as contractor we usually
play soccer once a week. This week I took my t-shirt with the
inscription “Spanish SEX instructor. First lesson free” (sex in very
big letters). So I put it on in the restrooms of the company,
out of the office, and called the elevator. The surprise was when going
out of the elevator was the CEO of the company, but luckily with my
fast reflexes I turned and was able to hide the message. uffff.
That remembers me other great conversations performed by me or coworkers like:
After the buying of the company I was working for:
- what do you guys do?
- we’re contractors, and you, are you in sales team?
- no, I’m the CEO of xxx (the company that just bought ours)
In the elevator
- what do you guys do?
- we are in the xxx project
- cool, how is it going?
- it’s going ok (here I paid the price of my not so good english)
- only ok! here in this company we expect the best!!
- and what do you do? are you in marketing team?
- no, I’m the CEO
In relation to my last post about maven and Perforce
this is a better solution that will work with both maven 1.0.x and 1.1.
The previous one doesn’t work under maven 1.1 because the bundled ant
version was updated to 1.6, that doesn’t include the optional perforce
This time you’d need:
- oro and ant-apache-oro as a dependency in your project.xml.
<!-- you don't need the root classloader if
only running under maven 1.1 -->
Another option to avoid defining each one of the tasks is creating a properties file in the classpath and load it with
And the contents of the properties file is
# Perforce tasks available
Note that you can’t use the properties file bundled with ant because it includes all optional tasks, wich would force you to include all ant-*.jar files in the classpath.
I can list a lot of people I wish they read this essay: What Business Can Learn from Open Source, by Paul Graham.
So, you wanna run only some of your tests because they take too
long? check this as a sample to avoid running dao tests (provided that
you use some naming convention, as calling them *Dao*Test):
<!-- test configurations -->
<j:set var="testmatchpattern" value="**/*Test.*"/>
<j:set var="testnotmatchpattern" value="**/Abstract*,**/*Dao*Test.*"/>
The only drawback is that you need the latest maven test plugin (1.7). You can just add this dependency to your project.xml.
One of the drawbacks of JMX is the lack of cluster support, you have
to invoke the operation in each one of the servers. The solution? use a
JMX client that does that for you, as jManage.
You setup the servers as in any other administration console and then
you can group them in clusters, allowing you to see the value of the
properties in each one of the servers in the cluster and invoke operations
in all of them getting the results of each server in a single page.
Download jManage version 0.5.3.
Go to jmanage-0.5.3/modules/jboss and copy there the following jars from jboss installation.
Start JBoss servers with the java option -Djava.rmi.server.hostname=hostname (you can set JAVA_OPTS environment variable)
Run jManage with jmanage-0.5.3/bin/startup.sh, you’ll be asked for a password (123456 by default). Then you can login at http://localhost:9090 with username/password admin/123456
When working at a client site we decided to enable Hibernate
statistics, so we can access all this information about cache
hits/misses, transactions, entities,… and all kind of cool stuff
through a JMX interface at runtime, allowing runtime configuration
changes and monitoring.
But seems that not many people is using this feature, because we
got the frustrating NullPointerException. After debugging a bit through
the Hibernate sources (if you have ever tried you know that it’s a PITA) I found the errors, same exception in two places,
and told JBoss support (the client was paying for it). Anyway I fixed them
locally while they fixed them in CVS, see the cvs diff or the JIRA issue. This bugs are present in hibernate 3.0.5 when using TreeCache.
Now we can get a lot of useful information at runtime, through a JMX console, I really like jManage,
mostly due to it’s cluster support, but you’ll need some tricks to make
it run with JBoss 4, that I’ll post in a separate entry.