Thursday, November 18, 2010

Devoxx 2010

Only one day at devoxx 2010 because I'm in between clients. Two days at the new client, one day devoxx and two days at the old client, a nice compromise.

My feelings of the first conference day were:
JavaSE7 will be released mid 2011 and does not include that much (since 6 is from december 2006 ...), the most interesting being project coin and DynamicInvoke. The rest of the features as project lambda and jigsaw will have to wait till 8.
The "State of the web" presentation gave great insights about what the web needs. An app store as the one mozilla is preparing would be nice and HTML5 being a real standard instead of a grouping of features which is different for every browser.

A lot of new stuff but most of it was already in some form in Hibernate so it just seems to me I will be using less hibernate specific things. The pessimistic locking, I didn't know about and seems to be interesting for the cases where database locking is needed. Something to remember when the need arrises ...

An interesting data grid but I don't seem to be using those. I wonder who does but didn't get an answer on that.

A great Server side RIA based on top of GWT. Because of the number of components, you won't need much else. I would use it if I needed a desktop like app in the browser. Another thing to remember if that use case pops up.

Spring (3.1 and caching)
Two sessions that I can combine. The first one a nice overview of 3.0 (already available) and 3.1 (Spring 2011 - would also be a nice name!). I like the annotations a lot. I depends on what you prefer but having the code and the configuration in one place is very important for me.
The last session was about the cache abstraction that will be available in 3.1. Spring is only a mediator between your application and the actual caching provider and allows you to determine what to cache (with what key) and what to evict. Putting the @Cachable annotation will make you think about what it means to have that cached. Apparently cache misses are something to be feared!

Friday, February 19, 2010

Mocking properties in struts using mockrunner

I didn't find any example on how to use com.mockrunner.struts.MapMessageResourcesFactory class. So here we go:

Map<string, string> resources = new HashMap<string, string>();
resources.put("TEST", "TEST_MESSAGE");
resources.put("TEST2", "TEST_MESSAGE2");

The last line makes sure that when the message resources are loaded using


that the given map is used to represent the resource bundle.

Tuesday, January 5, 2010

Hibernate validation

While using dbunit for unit testing, we disabled the database constraint validation, making it possible to create the database rows in the wrong order or not filling in fields if they are not needed for the test. I would recommend dbunit to anyone who wants to run tests with a database (the long-running kind of tests you want to include in your nightly build, not the continuous).

Then we ran into the problem that hibernate does its own validation based on for example a @NotNull annotation you placed inside your model giving one of the following exceptions:
org.hibernate.PropertyValueException: not-null property references a null or transient value: your.domain.Object.nonNullField
org.hibernate.validator.InvalidStateException: validation failed for: your.domain.Object

This can be fixed by disabling this kind of checks in the persistence unit using the following properties:

<property name="hibernate.validator.apply_to_ddl" value="false"/>
<property name="hibernate.validator.autoregister_listeners" value="false"/>

Thursday, November 19, 2009

Devoxx Day Five and summary

Last day already. First about the sessions I followed:
  1. "BPM on a SOA environment" The difference I noticed earlier between BPM & BPEL, has a name, the difference between managed and unmanaged process. The presentation tackled the problems between reality and how to reflect in BPM (don't forget the error handling!) At total architecture, you can read more about it.
  2. "Towards a universal VM" The JVM start to integrate features in its JIT compilation, not for the Java language but for dynamic languages on top of it. The presented feature was invokedynamic.
  3. Archimate tries to bridge between the free format boardroom type models and very specific UML models. It focused on Enterprise Architects and integrating different high level views.
For me the main topics where cloud computing and service-orientation (don't say SOA anymore). Both are still not there yet but further maturing.

Devoxx Day Four - part 2

The "JavaFX in the enterprise" session showed a lot of the JFXtras project which is a step in the right direction but I think still a lot of work has to be done to make JavaFX usable in the enterprise.

The iBeans framework offers easy integration without using a full SOA. Simplifies the development of a small app/widget with integrates a lot. I found it a bit annotation heavy.

Glassfish v3 I saw already the previous time at Devoxx. Still an impressive application server, I will surely check it out when it comes out 10/12/2009. Before the demo, Roberto Chinnci explained a bit the extensability of JavaEE 6 at servlet level through ServletContainerInitializer subclasses and the dependency injection through an Extension implementation. I won't go into details but basically, you can by adding a jar to your classpath, dynamically add servlets, servlets and beans when the app starts up. Very powerful and a blessing for the common developer onces the frameworks start using this. No more configuration but pure magic.

Last session performance. I have to agree with the speaker which is from IBM Support Assistant. Performance is only an issue when it's bad. The techniques explained for finding CPU, I/O, memory of lock problems often involved some sort of tool. Still experience in understanding the returned data is often more important than the used tool.
The opinions expressed in this blog are those of Jeroen Wyseur and may not reflect the opinion of his employer or any customer of said employer.