Jeroen van Wilgenburg

Scala ORM with Squeryl – A simple getting started guide

Jeroen van Wilgenburg

Since my pet project (I will eventually blog about that) is in desperate need of a database and I’m doing enough Java on my day job I decided to give a Scala ORM framework a shot.
I have to warn you that I’m kind of a Scala hacker. I abuse it like a scripting language and usually grab some examples, put them together and wait for my colleagues to say “You don’t want that” or “You’re doing it wrong”. So don’t hesitate to correct me, maybe I’ll learn something too ;-)

 Read more

Annoyed by traffic lights? – Solve it with a gps logger, Scala, GeoTools and qGis

Jeroen van Wilgenburg

I live in Utrecht, a city where it seems the municipality tries to annoy car drivers as much as possible. Public transport isn’t an option, even despite the traffic jams it’s slower, less reliable and don’t get me started on the attitude of bus drivers. When you want to travel from one place in Utrecht to another it’s often a good idea to find the nearest highway, it might be much longer, but often much quicker. Instead of complaining (which will stop now ;) ) there might be a solution. I have a theory that a trip is much faster when you avoid traffic lights and use the highway as much as possible. To prove that theory, test my new (Android 2.2) phone, fresh up my Scala knowledge and have a cool pet project I started logging my trips.

In this article I will show you how to collect the data, parse and convert it to a usable format and show it on a map. This is just a first prototype and proving my theory will probably take a lot more time which I don’t have because I’m in traffic jams all the time ;) .
If you don’t like all the technical mumbo jumbo, just scroll to the maps, they’re cool to look at.
 Read more

Websockets from scratch – Results from a short techrally

Jeroen van Wilgenburg

Last friday we had a techrally at Xebia. We could pick our subject: MongoDB or Websockets or Canvas. I teamed up with Albert. There also was another websockets team consisting of Mischa, Ron and Frank.
We decided to use Jetty for websockets. No particual reason to pick Jetty, we both heard it did something with websockets and in the end it was an easier solution than the other team picked (jWebSocket).
Since we only had a few hours we were in quite a hurry, but in the end it was so simple we had time to write a blog, listen to Dan North and Albert even redid everthing and more in Python. Read more

Unleashing the power of geospatial indexing with Scala and MongoDB

Jeroen van Wilgenburg

Right now I’m following some geospatial tweets and came across an interesting one about a new option to add a geospatial index to a MongoDB. Since I’ve done some stuff with Scala recently I decided to insert the data into MongoDB with Scala using scamongo. Unfortunately the scamongo Scala driver for MongoDB gave me too much trouble, so I switched to the java driver.

 Read more

Java callout on the Oracle / AquaLogic Service Bus – Invoking static methods in any jar file

Jeroen van Wilgenburg

Sometimes a service bus is not sufficient for the job at hand. You can use EJB’s and JMS queues, but that might be overkill. That’s where a java callout might come to the rescue. This article will show you how to do a callout with ‘complex’ objects. On the bus you can pass around java objects or use them on the bus (this requires a small transformation step). I used the AquaLogic service bus version 10.2, but I think it should work any version that supports java callouts. The only difference can be the version of xmlbeans (AL 10.2 uses version 1.0.3)
 Read more

Installing Oracle Service Bus 10gR3 on Mac Os X

Jeroen van Wilgenburg

Last week I installed WebLogic and the AquaLogic Service Bus on a Mac. There is no Mac-download on the download page, but by using the HP-UX version everything works fine, you just have to add some command line parameters.

 Read more

Unit testing a Stripes ActionBean wired with Spring Beans

Jeroen van Wilgenburg

Last friday I spent quite some time to figure out how to initialize my Spring beans when unit-testing some Stripes ActionBeans. There wasn’t any Spring context at all and you really need that for integration testing.
 Read more

Sorting and pagination with Hibernate Criteria – How it can go wrong with joins

Jeroen van Wilgenburg

Lately I ran into an annoying problem with Hibernate. I tried to do pagination on a query result which was doing an SQL-JOIN under the hood. The query before paging returned about 100 results. When I turned on paging (with 20 results per page) all the pages had less than 20 results!
The reason for this is that with a JOIN there can be duplicate results and those results are filtered out after pagination is done. In this blog I will explain how to solve those problems and it also a cleaner way to build your Criteria queries.
 Read more

Readable url’s in Wicket – An introduction to wicketstuff-annotation

Jeroen van Wilgenburg

Have you ever tried to pronounce a url generated by Wicket? It’s quite a tedious job and often end users want to have understandable url’s (even when that url has no meaning).

It’s is quite easy to get normal url’s in Wicket. In this article I’ll show you several solutions, the first two with plain Wicket and the final solution is with wicketstuff-annotations.

 Read more