JAXB can be a real time saver when working on a project that uses XSD to describe interfaces implemented in Java. Sometimes, however, the generated code is not up to standard. I ran into a problem that seems very common and found a very elegant solution to it on the web.
(more...)
Tags: jaxb, Maven, xjb plugin, XmlElemetWrapper
Filed under Maven, jaxb | 3 Comments »
For my current project we use Kettle to process data from a number of sources and store it in a shared database. Kettle has great support for parsing data from a variety of sources, transforming it and writing it to a variety of destinations. One problem that often arises when inserting data in a relational database is the need for a syntactic, unique key that will be generated when a new row is inserted and later in the process used for other rows that refer the primary row. There are many solutions for this problem, both in the RDBMS and in the Java space. This blog reports on a search through several code bases to come up with a good solution in kettle which, unfortunately, still evades me.
(more...)
Tags: generated keys, Hibernate, hsqldb, kettle, postgresql
Filed under kettle | 2 Comments »
Apache Hadoop promises "a software platform that lets one easily write and run applications that process vast amounts of data". Sure enough, when reading the documentation, descriptions like:
(input) <k1, v1> -> map -> <k2, v2> -> combine -> <k2, v2> -> reduce -> <k3, v3> (output)
Are simple enough to read and understand, but how do you apply MapReduce to a problem you face in a real-life project?
This blog tries to give some insight into how to apply MapReduce with Hadoop.
Tags: hadoop, mapreduce
Filed under hadoop | 2 Comments »
In this blog I'll talk about a new language feature proposed for Java7 by project coin and the problems I see with it.
Maybe it is time to buy those Scala books and take a deep dive...
(more...)
Tags: Indexing access syntax for Lists and Maps, jdk7, project coin
Filed under Java | 29 Comments »
Say you want to build a web application and you want to use Seam for integrating standard technologies like JSF and EJB. Furthermore, you want to use the power of Maven to build your project for different environments, on different systems (like you continuous build system) and use its' rich reporting features to get an overview of the code quality of your project. And of course you want to use a good IDE, like Eclipse with JBoss tools to aid you in development. How does one go about setting up all these things?
(more...)
Tags: configuration, Eclipse, eclipse:eclipse, eclipse:m2eclipse, jboss tools, Maven, Maven archetype, maven-eclipse-plugin, Seam
Filed under Eclipse, Maven, Seam, jboss tools | 8 Comments »
Hibernate is a sophisticated ORM framework, that will manage the state of your persistent data for you. Handing over the important but difficult task of managing persistent state of your application to a framework has numerous advantages, but one of the disadvantages is that you sort of lose control over what happens where and when. One example of this is the dirty checking feature that Hibernate provides. By doing dirty checking, Hibernate determines what data needs to be updated in your database. In many cases, this feature is quite useful and will work without any issues, but sometimes you might find that Hibernate decides to update something that you did not expect. Finding out why his happened can be a rather difficult task.
(more...)
Tags: dirty checking, Hibernate, StaleObjectStateException, versioning
Filed under Hibernate | 7 Comments »
When you use Hibernate for ORM and come across some functionality that requires multi threading, there are many pitfalls that might make life difficult for you. This blog will focus on those problems. Conclusion is: don't use hibernate managed objects in multiple threads.
(more...)
Tags: lazy initialization exception, lost update, multi threading, transaction
Filed under Hibernate | 7 Comments »
Working abroad has been a wish of mine for some time now. Xebia offers me the opportunity to live and work in India. Through this blog series I will keep you informed of the progress and challenges of this project.
When moving to India it is almost inevitable to become an employer. One of my colleagues predicted that this would be one of the most enjoyable advantages of living in India and I have to say that so far he has been right. In our case we employ a cook, a cleaning lady and a driver. We are very satisfied with their services.
Filed under Moving to India | 4 Comments »
This second part on Spicefactory will delve into the details of writing a Grails plug-in for this framework. Be prepared to read a lot of code!
Tags: AS3 EntityManager, grails-flex-webtier plug-in, grails-spicefactory plug-in, JPA EntityManager, pimento, spicefactory
Filed under Flex, Grails, Hibernate | No Comments »
In my article on InfoQ I've looked into how Grails and Flex can be combined to create a rapid application development platform. I think this is one of the most promising combinations for RIA development at the moment. The Flex space is very happening and there are many initiatives going on. A few days ago I encountered this one on the web: http://www.spicefactory.org/. Apart from the funny name, I think it is a very interesting initiative, because it brings some new concepts to the Flex remoting mix.
Tags: cinnamon, EntityManager, Flex, flex integration, flex remoting, Grails, Hibernate, JPA, parsley, pimento, spicefactory
Filed under Flex, Grails | 6 Comments »