Wednesday, June 29, 2005

Bodington as an Institutional VLE

Open source software for elearning mentions that Bodington isn't scalable as one of the reasons for not deploying it at Manchester Metropolitan University. While it may have some issues scalability doesn't seem to be one that we hit here at Oxford University where is deployed as an institutional VLE.

Tuesday, June 21, 2005


After Paul mentioned Technorati to me at work I though I had better have a look. So now I have signed up and have a Technorati Profile. The link is to to prove to Technorati that I do actually own this blog. With Bodington having such a unique name it makes a technorati feed nice and easy. If you ever have a chance of naming a product, pick something that doesn't get many google hits, it will make marketing on the net easier and the domain name cheaper.

Sunday, June 19, 2005

Java 1.5, Ant 1.6 and rmic

I've just been compiling Bodington on Java 1.5 and I noticed that the rmic task was always running. After a bit of googling I came across a post on an ant developers blog which explained what was going wrong and led me to the bug report. I've committed a fix to WebLearn HEAD and will probably push this fix across to Bodington HEAD next week.

Saturday, June 18, 2005

Java DatabaseMetaData.getDriver()

In common with other parts of the Bodington system the mapping of Java objects onto a relational database (O/R mapping) is done by some custom code[1]. This code needs to know which database product it is connecting to so that it can work correctly (JDBC API and SQL are almost there but not quite). Now normally this is done by looking at the JDBC class name and setting the flags accordingly ("org.postgresql.Driver" is the PostgreSQL driver). When Bodington is making the JDBC connection itself this is not a problem as it knows the driver class. However I have recently been allowing it to use a JNDI database connection pool supplied from Tomcat. Now when you get your pooled connection from Tomcat you don't know what database product you are connected to. I was hoping that I would be able to do something like:
which would return me the class that is being used as the driver from which I could work out how to configure the database mapping. But no, this call doesn't exist. I can find out the display name of the driver, the version, but not the class. This means that if you are using JNDI to get your database connection you will have to tell Bodington the flavour of database it is connecting to which is unneccessary configuration as you have already given this information to Tomcat and just leads to situations where you are connecting to PostgreSQL but Bodington is configured to talk to Oracle. [1] - The reason for this is that it was written a long time (around 1999) before product like Hibernate and iBatis became the established way of doing this.

Friday, June 17, 2005


String text = "1234";
text.substring(4).startsWith("5"); // is false but works.
text.charAt(4) == '5'; // NullPointerException
I came across this suttle difference in the String class when chasing a bug in Bodington where we were getting a NullPointerException exception from attempts to split up a URL (don't ask). I'd guess that the charAt is faster (substring creates a new string object) but unless your software is doing 1000s of tests like this it probably doesn't matter.

Tuesday, June 14, 2005

Shibboleth and Groups

In the world of Shibboleth when you have been authenticated and visit a resource various bits of information can be released to the provider of that resource to help in the decision about whether to allow you access to that resource. One bit of information that people keen on mentioning when talking about this situation is the groups that you are a member of so that an provider can have a rule such as "only allow in people from Hull University who are studying Maths" but how does the provider know which group represents the people studying Maths? Does the group include staff members as well? Is seems that in the world of Shibboleth there needs to be a group discovery mechanisms so that a resource provider can discover which group provides the appropriate set of people.

Bodington Date Formatting

In quite a few places in Bodington dates are formatted and displayed to the user. All these dates are formatted according to the default locale of the java platform which is normally picked up from the system settings. On Linux/UNIX the way to change the date formatting (and the system locale) is to set the LANG environmental variable before starting the servlet container. To have dates formatted for the UK use something like: export LANG=en_GB.UTF-8 I'm not so sure about Windows but I'm guessing that is you change your settings in the control panel Java should pick them up.

Monday, June 13, 2005

Book for Programmers

If you write any amount of code then I would recommend you read Code Complete. I would give it a glowing review here but many people on Amazon have already done so. I've only ready 100 pages so far but am really enjoying it and realising how much I have to learn.

Shell Trick

From the Debian planet I found a really nice shell trick.