Wednesday, November 26, 2008

How to use the upcoming agent download in Jopr + RHQ

Mazz has recently written code that the agent can use to auto-upgrade itself and has blogged about it. This code is in the RHQ trunk - so if you want to try it, you need to install RHQ from source.

This feature is also good for an initial agent install:

Get the agent code from the Jopr server:

$ wget http://pickeldi:7080/agentupdate/download -O agent.jar

Option -O sets the name of the local file which otherwise would be 'download'. Next you need to run the downloaded jar file to extract the agent from it

$  java -jar agent.jar --install
Wed Nov 26 15:33:14 CET 2008
[header-for-install] [echo]
Installing Agent To: .
Version: 1.2.0-SNAPSHOT
Build Number: 2125
Jar File: /home/hrupp/agent.jar
[install] [unjar] Expanding: /home/hrupp/agent.jar into /home/hrupp
[install] [unzip] Expanding: /home/hrupp/ into /home/hrupp
[install] [delete] Deleting: /home/hrupp/
[install] [echo] Agent version 1.2.0-SNAPSHOT (build number=2125) has been installed to .
$ ls rhq-agent
bin conf lib plugins

Starting java -jar without any other option will show some online help about the available options.

On Unix you still need to set the permissions

$ chmod +x rhq-agent/bin/

Now that this is done, you can start the agent as usual:

$ cd rhq-agent/
$ bin/

Try this feature and give us feedback.

Sunday, November 23, 2008

First snow this year

Yesterday we had the first snow this year. Orlando was very excited and directly went outside before breakfast to remove the snow from out car (there was not enough on the sidewalk to wipe it). During the day the snow melted.

When we woke up this morning, the roofs were again white. And in the evening we sort of had a snow storm. This would have been cool to watch from inside, but we had to drive around and then it was less fun.

Lets see how this continues, as this is already more snow than what we had last winter. Perhaps we can even drive to the Schwäbische Alb, which is not too far to go skiing or snowboarding.

Saturday, November 15, 2008

Eclipse 3.4, OS X and Subversion - *rant* and success

IntelliJ has SVN support out of the box, Netbeans has SVN support out of the box (by calling the svn binary) - only Eclipse doesn't. For my Eclipse 3.3 install I have a working combination, which is old, but working (and dog slow).

When Ganymede (3.4) was out, I was trying to use it, but failed due to problems installing SVN support.

Yesterday, when looking at the x2svg sources again, I wanted to update the Findbugs plugin just to find out that Eclipse reports my configuration is borked and I can't upgrade findbugs.

I decided to give Ganymede another try and even found a 3.4.1 release. But still no SVN support in it :-( Googling around led me to this post, that gave some hope.
When I went to the upgrade pages in Eclipse, I saw another provider for SVN listed, so I tried it, installed the stuff, but at the end the situation was as before.
Ok, started to install the plugin from tigris (there is a newer version available than the one listed in the blog post).
Then I installed java hl support from mac ports

sh-2.05b# port install subversion-javahlbindings

which also first failed - mostly because some of my installed ports were not up to date.

After all this was done I was finally able to see the SVN section in preferences and the javaHL connector selected.

But wth does the Team context menu not show any option like commit or update? Do I need to add the SVN repository on the SVN repository explorer tab? I did so, but no immediate change.

Ah, there was this one last trick: Go to $workspace/.metadata/ and remove basically everything below it and then re-import all projects again. And all of a sudden I had SVN support in Ganymede. It would probably have been ok to remove just the entry for this one old svn plugin -- but which one is the right one?)

I mean, it is no rocket science, why can't Eclipse get this right out of the box?
I spent over 3 hours to get it to work.
The only good thing is that comparing the on-disk state with a remote version is much faster than what I previously had in 3.3.

Friday, November 14, 2008

X2svg: how to create diagrams (in the XSD parser)?

For some simple stuff it is easy to create diagrams with x2svg - here is an example from the test suite:

$ sh -c :pdf test-src/resources/sample.xsd root

This creates a PDF version of sample.xsd along with a SVG one (technically speaking, it creates a SVG version and converts it to PDF afterwards), where the root of the tree is the element root. There are no limits, so the whole tree with all its children is shown.


But how to tackle more complex things?

The XSD-Parser has some options that we will have a look at:

  • -d n: this limits the depth of the tree to n, where a depth of 0 means the root element only and 1 means one level of children:


  • -st : This option tells the parser that the given root element is not an element, but a type.

  • -lt : If this element is given, then elements of an given type are not filled with the content of the type, but the type name is specified:

    $ sh -c :png test-src/resources/inheritance.xsd parent-type -lt


    Note, that there is currently a little display bug.

Those options allow you to create already good quality structural content from your schema files - see e.g. Part 2 and Part 4 of my RHQ plugin development series.

Wednesday, November 12, 2008

Review of yesterdays talk about RHQ&Jopr (with pictures)

Yesterday I've been talking about RHQ at the Swiss Java Users Group in Zürich. This was a good session with around 50 people.

While Zürich is not far away from Stuttgart, it took me nevertheless some time to get there. With the current issues around ICE wheels, the train wasn't able to go as fast as desired and we arrived 25mins later than expected -- luckily I've taken one train earlier anyway.

View over the shoulder of the train driver when leaving Stuttgart main station

Rheinfall in Schaffhausen as seen from the train

When you look at the date, it was 11/11 which is also start of the so called 5th season, carnival. So at the main station, there were already groups of Guggen-music playing in their costumes. Later on I saw them throughout the city at various places. It's great fun to listen to them, as they are full of energy. Even as they are playing the same instruments as the boring (German only?) brass bands, it is not the same at all.

Guggen music in Zürich main station

I went to my hotel (Limmathof, close to the main station), checked in, deposited my bag and then strolled around a bit. When I wanted to take the tram to the Technopark I had to find out that the ticket dispenser only accept swiss coins. So I had find an ATM, get some swiss money (I am no longer really used to get some other currency when traveling in Europe, as I never make it to UK and in so many other countries, the Euro is happily accepted). After I had to buy something as the note to coin exchanging machine did not accept 50 SFr notes. But after all I succeeded. So if you go there, make sure to get at least 10SFr in coins as soon as possible.

The talks in the Technopark were held in a room called "Fortran" - how strange for Java related talks :) When setting up the Laptop I had to find out that the German Schuko plug would not fit the existing outlets. Luckily someone had an adapter and we found an outlet that accepted this adapter.

In my talk I was first showing some slides about what RHQ is, where it comes from, how it relates to Jopr and JBoss ON, then showing some bits about resources and the subsystems. Then I was demoing the live application. I wanted to show that monitoring the thermometer chip would also be possible, but this failed at the demo (later I found out, that libusb was missing in my agents lib/ directory. When I added it to the running agent and did a restart of the plugin container, it worked like a charm).
After this demo, I briefly showed the bits about plugin development. Unfortunately one can show and tell sooooo much around RHQ and Jopr that the time was already up.

I think my talk was well received, I saw some people taking notes and also had people asking questions and making suggestions. I guess I will get some more feedback from the organizers, as they've distributed some feedback forms for the attendees to fill in.

Next after my talk and a short break, Bela Ban was giving a talk about how to tune a web application that is clustered and that uses JGroups and JBossCache for replication purposes. Bela first presented some baseline figures and then tweaked replication of the session versus attributes, buddy replication versus total replication and also replication on access of getters versus setters. Bela was also showing some architectural set ups for clusters that have been proven to work well.

End of story was that with some tweaking and possibly some small application code changes one can gain a big lot of performance.

Bela's session

Bela was also talking about the new mod_cluster from JBoss. If you haven't heard about it, check out its web page. Basically mod_cluster tries to solve the configuration issues that exist around mod_jk. Configuration of mod_cluster is done on the JBossWeb side where nodes announce themselves to the frontend httpds. Also the JBossWeb instances can send their load information to the apaches who react upon it. The computation of the load is pluggable.
Another cool thing is that JBosWeb can tell the apaches that a web application is going down, so the apaches know no longer to serve this node.

After the talk we had an apéro in a room called "Pascal", where I also met with Thomas and Galder from the Neuchâtel office. Unfortunately Fady did not make it as well and Thomas directly had to leave afterwards again.

After the apéro, Bela, Galder, Silvano from the Jugs and I went to an Italian restaurant (Il Gallo at Escher-Wyss-Platz) where we had some good discussions and good food too.

After I have dropped my laptop off at the hotel, I strolled around the city some more - really great. This morning I took the ICE back to Stuttgart and am now back at my desk :) Here are some more impressions of Zürich.

Polybahn as seen from my hotel window

Zürich and Limmat river by night

Vending machine that not only dispenses sweets, but also fuses(!)

Arrival of the ICE in Zürich for my way back to Stuttgart

Monday, November 10, 2008

Deep Purple in Rock

Last saturday we've been at the Deep Purple concert here in Stuttgart in the Schleyerhalle. The Schleyerhalle was nearly sold out. After Gotthard as opener (they played 1:15h), Deep Purple started fast and furious with some tracks that I did not know (probably some newish :-) stuff).

But there have been enough 'classics' too and it was a great concert again. Don Airey is a good replacement for John Lord, but I missed the Organ-Guitar question and answer game, that John Lord and Richie Blackmoore were doing.

Deep Purple played 1:30h and then again 30 minutes.

It was a great concert and I would go there again.

Monday, November 03, 2008

About blog postings ...

There once was a developer

Who was working on JBoss' Jopr

He wrote some lines of code

And took a larger note

But forgot to write on Blogger

YouTube - Macintosh Virus Discovered

This is a way cool video about a virus for Mac OS X:

YouTube - Macintosh Virus Discovered: ""

It's probably not suitable for small children :-)