camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject [DISCUSS] - Fix 2 pain issues with camel-bindy for Camel 2.9
Date Mon, 14 Nov 2011 12:10:12 GMT

There are two pain issues I see we have with camel-bindy that I would
like to address. However as at least 1 of them is non backwards
compatible, we have previously targeted that for Camel 3.0. But that
was back in the start of the year when Camel 3.0 was more around the

Now that Camel 2.9 is a sort of big release I would suggest to move
the following two improvements forward to be fixed for Camel 2.9.0.

The bindy data format, requires you to define a package name, where
bindy will then scan recursively in the package for any bindy model
classes (eg annotated with eg @CsvRecord etc.).

The problem is that this doesn't work well as you cannot have 2+ model
classes in the same package + sub packages.
As you cannot explicit define that you marshal to XXX class.

So I suggest to remove the package name, and mandate the end user to
specify a class type

For example to marshal to a Car class

Then you can have 2+ model in the same package,

The output of the unmarshal operation is also confusing, as its a
List<Map<String, Object>>
The List is okay as that would be an entry for each entry. However the
Map represents a row.

So I suggest to make it simpler and what end users would expect
Where T is the class type, such as List<Car>, List<Train> etc.

For example from an unit test where my T is WheatherModel I need this ugly code

  Map map = (Map)
        WeatherModel model = (WeatherModel) map.values().iterator().next();

        assertEquals(123, model.getId());
        assertEquals("Wednesday November 9 2011", model.getDate());
        assertEquals("Central California", model.getPlace());

Instead of just

  WeatherModel model = (WeatherModel)

We have a number of JIRA tickets and end users mailings on the @user
about issues with Bindy.
I think if we address these 1+2 here we solve the two major pain
points people have when getting started with Bindy.

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message