Category Archives: FriFinans

Today I start at my new job at [Avaleo][1].

The reason I change is not that I’m in any way unhappy with my former employer.
[Casalogic][2] is a really cool company, which specialises in Open Source
consultancy. Thank you Casalogic for all the fun we’ve had and all the knowledge
that I’ve gained.

What about [FriFinans][3]? One of my main responsibilities at [Casalogic][2]
were the development and some project management of there Open Source project,
[FriFinans][3]. Now that I’m not working there anymore things are of cause going
to change. I will not be managing the project anymore, but that doesn’t keep me
from committing patches, functionality from time to time.

My main task at [Avaleo][1] is to be a part of a team which develops a
healthcare system. For information about this, look at [Avaleo's website][1].
We only use Open Source Java software like: [Spring][4], [Wicket][5],
[Hibernate][6], [Eclipse][7] etc.

[1]: http://www.avaleo.net/
[2]: http://www.casalogic.com/
[3]: http://www.frifinans.org/
[4]: http://www.springframework.org/
[5]: http://www.wicketframework.org/
[6]: http://www.hibernate.org/
[7]: http://www.eclipse.org/

### New demo ###############

Based on the work by [Hardz][1], [FriFinans][2] now has some debtor/creditor management. I have compiled a new demo which can be viewed here:

[FriFinans demo][3]

Also included in this demo is the little websplash which I created some while ago. It is deployed on the [JBoss server][4] and when the user enter the [IP address][5] or [hostname][6] in the [webbrowser][7], it is presented to them. It has one function: To enable the user to start the FriFinans client in an easy way, using webstart.

[][3]

### Performance ##########

I have begun the development of a client proxy, which takes care of the server communication. This way the client will seem faster because the user doesn’t have to wait for the server to finish storing the changes. I will also take a look at the server to see how it can be faster processing the requests from the client. Great things are ahead.

[1]: http://www.hardz.com/
[2]: http://www.frifinans.org/
[3]: http://demo.frifinans.dk/
[4]: http://www.jboss.org/
[5]: http://en.wikipedia.org/wiki/IP_address
[6]: http://en.wikipedia.org/wiki/Hostname
[7]: http://en.wikipedia.org/wiki/Web_browser

FriFinans has got a new issue tracking and project management tool. We have choosen [Jira][1] because of it’s flexibility, easy to understand and power. Jira can be reached at:

[bugs.frifinans.dk][2]

Atlassian supports our efforts by contributing their bug tracking and issue tracking application, JIRA, to our project.

Atlassian is an innovative Australian software company providing enterprise software solutions to the world’s leading organisations. Atlassian’s leading software product, JIRA is a bug tracking and issue tracking application developed to track and manage the issues and bugs that emerge during a project. JIRA customers include departments from NASA, Boeing, Cisco, JP Morgan, 3M, BP, Sony and more. [Try it][1] for yourself today.

[][1]

[1]: http://www.atlassian.com/c/NPOS/10160
[2]: http://bugs.frifinans.dk/

The [FriFinans][ff] workshop at [LinuxParty][1] was not very productive. As you can see at the picture, the only there were my collegue [Jacob][2], which is the original founder of [FriFinans][ff]. There were 17 at the [LinuxParty][1] and not one of them attended our workshop. :(

![All the attendencies for the FriFinans Workshop][3]

Better luck next year.

[1]: http://www.linuxparty.dk/LinuxPartyRoskilde
[2]: http://emcken.dk/weblog/
[3]: /wp-content/LinuxPartyRoskilde2005_450×300.jpg
[ff]: http://www.frifinans.dk/

On Saturday 29. oktober, I will hold 3 workshopsessions, where we will work on [FriFinans][1]. Each session is 3 hours and at the beginning of each session I will introduce myself, the project, the system etc. There will be different tasks for both developers, translaters and administrators.

The workshop will be held at this year [LinuxParty][2] at Roskilde Handelsskole. For more information about the workshop, take a look at the [workshop description][3] (Danish).

[1]: http://www.frifinans.dk/
[2]: http://wiki.linuxparty.dk/LinuxPartyRoskilde
[3]: http://wiki.linuxparty.dk/FriFinans

I will speak at the Danish [LinuxForum BoF day 2005][1], together with other Danish/intl. Open Source accounting systems. The other projects are [SQL Ledger][2] and [SQL Finans][3] (Danish). If you live in Denmark (or just want to attend), please come by oct. 8 at:

Symbion Science Park
Fruebjergvej 3
DK-2100 København Ø
Denmark

[The program for the day.][4]

[1]: http://bof.linuxforum.dk/2005/
[2]: http://www.sql-ledger.org/
[3]: http://www.sqlfinans.dk/
[4]: http://bof.linuxforum.dk/2005/bofs/

I recently had to change some usernames into another one in our [CVS repository][1]. I couldn’t find any information about it using [Google][2], so I tried to figure out how the usernames are stored in CVS on the different commits. [Luckily][3] the usernames are stored in clear text at top of each CVS file. It only took a simple command, to search/replace all usernames with another.

find ./ -type f -exec sed -i ’s/author OLDUSERNAME;/author NEWUSERNAME;/g’ {} \;

The reason I search for “auther USERNAME;” is that this are almost unique. If I’d just search for USERNAME I could have replace important words if the username were generic enough (like replace username ‘ac’ with another one DO couse a lot of trouble, take my word ;-) )

[1]: http://cvs.frifinans.dk/
[2]: http://www.google.com/
[3]: http://en.wikipedia.org/wiki/Luck

While I was searching google for some helpful information about the many [Exception I've tend to get these days][1], I stumble apon this [helpful blogentry][2] about [JBoss][3] and Performance. It said, that by adding a single line in a configuration fil, the performance would increase dramtically. “Yeah right” I thought, and tried it out anyway:

JBOSS_HOME/server/CONFIGURATION/conf/log4j.xml:

into:

JBOSS_HOME/server/CONFIGURATION/conf/log4j.xml:

And the effect was there right after a shutdown/start of the JBoss server. Is was very much faster! Very nice.

After thinking about it, it also made sence. JBoss enables debug logging as default. All the IO required to save this log information uses up A LOT of the performance.

This actually fixes one of my tasks for [FriFinans 0.2][4] :D

[1]: http://billen.dk/2005/08/04/new-jboss-ejb3-release/
[2]: http://fishbowl.pastiche.org/2005/04/19/fun_with_jboss_performance
[3]: http://www.jboss.org/
[4]: http://wiki.frifinans.dk/Roadmap#Version_0.2

I have upgraded my development environment to [JBoss EJB3 RC1][1]. This is apparently more strict and correct according to the [EJB3 spec][2]. This is great, because it helps fixing all that “ugly code ™”. In the next couply of posts I’ll be addressing some of the funny little Exceptions, which I receive while converting the existing [FriFinans][3] code into shiny pebbles ;-) .

The first one is

org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session

at org.frifinans.server.stateless.UserSettingsBean.get()Lorg.frifinans.server.entity.LedgerUserSetting;(Unknown Source)

This one has a simple solution. I was trying to cascade persist an object, which was already persisted. This is a little piece of the [UserSettingsBean][4] SessionBean, which tried to persist:

public LedgerUserSetting get () {
    LedgerUserSetting lus = new LedgerUserSetting ();

    CommonUser user = ur.getCurrent ();
    if (user != null) {
        // Find user setting
        LedgerUserSetting l = null;
        try {
             l = (LedgerUserSetting) manager.
                    createQuery (
                    "FROM " +
                    "   LedgerUserSetting lus " +
                    "WHERE " +
                    "   lus.user = :user ").
                    setParameter ("user", user).
                    getSingleResult ();
        }
        catch (EntityNotFoundException e) {
            // Ok
        }

        if (l != null) {
            lus = l;
        }
        else {
            lus.setUser (user);
            manager.persist(lus);     // < --- Try to persist (this is ok)
        }
    }

    return lus;
}

The problem was in the [LedgerUserSetting][5] EntityBean, where this following code caused the Exception:

@OneToOne (cascade = CascadeType.PERSIST)   // We shouldn't cascade
@JoinColumn (name = "username")
public CommonUser getUser ()  {
    return user;
}

Remove the cascade option and we end up with:

@OneToOne  // Thats more like it.
@JoinColumn (name = "username")
public CommonUser getUser ()  {
    return user;
}

[1]: https://sourceforge.net/project/showfiles.php?group_id=22866&package_id=132063&release_id=346762
[2]: http://www.jcp.org/en/jsr/detail?id=220
[3]: http://cvs.frifinans.dk:8080/viewrep/FriFinans/frifinans
[4]: http://cvs.frifinans.dk:8080/viewrep/FriFinans/frifinans/src/org/frifinans/server/stateless/UserSettingsBean.java?r=1.6
[5]: http://cvs.frifinans.dk:8080/viewrep/FriFinans/frifinans/src/org/frifinans/server/entity/LedgerUserSetting.java?r=1.5

I have installed [FishEye CVS browser][1] on our [CVS server][2]. FishEye is a product from [Cenqua][3], which also develops [Clover][4], a neet code coverage tool. I first tried the trial version, but I liked it so much I applied for a free licence, which they donate to Open Source projects. Next day I got one, so now we use FishEye.

[Browse the FriFinans CVS code][2]

[![Alt text][5]][1]

[1]: http://www.cenqua.com/fisheye/
[2]: http://cvs.frifinans.dk:8080/viewrep/FriFinans
[3]: http://www.cenqua.com/
[4]: http://www.cenqua.com/clover/
[5]: http://www.cenqua.com/images/fisheyed2.gif