A Java geek

Nicolas Fränkel's blog

  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Sep 2, 2012 validation xml

XML validation with imported/included schemas

Recently, I tried to help a teammate design a WSDL file. I gently drove him toward separating the interface itself in the WSDL file and domain objects in a XML Schema file. One thing leading to another, I also made him split this XSD into two separate files, one including another for design purposes. Alas, tests were already present, and they failed miserably after my refactoring, complaining about a type in the included file not being found.

Nicolas Fränkel
Aug 25, 2012 maven test

Re-use your test classes across different projects

Sometimes, you need to reuse your test classes across different projects. These are two use-cases that I know of: Utility classes that create relevant domain objects used in different modulesDatabase test classes (ans resources) that need to be run in the persistence project as well as the integration test project Since I’ve seen more than my share of misuses, this article aim to provide an elegant solution once and for all.

Nicolas Fränkel
Aug 20, 2012 envers spring data spring security

Spring Data, Spring Security and Envers integration

Spring Data JPA, Spring Security and Envers are libraries that I personally enjoy working with (and I tend to think they are considered best-of-breed in their respective category). Anyway, I wanted to implement what I consider a simple use-case: entities have to be Envers-audited but the revision has to contain the identity of the user that initiated the action. Although it seem simple, I had some challenges to overcome to achieve this. This article lists them and provide a possible solution.

Nicolas Fränkel
Jul 29, 2012 inversion of control method injection

Method injection with Spring

Spring core comes out-of-the-box with two scopes: singletons and prototypes. Singletons implement the Singleton pattern, meaning there’s only a single instance at runtime (in a JVM). Spring instantiate them during context creation, caches them in the context, and serves them from the cache when needed (or something like that). Prototypes are instantiated each time you access the context to get the bean.

Nicolas Fränkel
Jul 22, 2012 ejb3 spring transaction

Transaction management: EJB3 vs Spring

Transaction management is a subject that is generally left to the tender care of a senior developer (or architect). Given the messages coming from soem actors of the JavaEE community that with newer versions of JavaEE you don’t need Spring anymore, I was interested in some fact-checking on how transaction management was handled in both technologies. Note: these messages were already sent one year and a half ago and prompted me to write this article.

Nicolas Fränkel
Jul 8, 2012 css maven

Empower your CSS in your Maven build

People who know me also know I’ve interest in the GUI: that means I’ve sometimes to get my hands dirty and dig deep into stylesheets (even though I’ve no graphical skill whatsoever). When it happens, I’ve always questions regarding how to best factorize styles. In this regard, the different CSS versions are lacking, because they were not meant to be managed by engineers.

Nicolas Fränkel
Jul 1, 2012 jpa persistence spring data

Easier JPA with Spring Data JPA

Database access in Java went through some steps: pure Java DataBase Connectivity, proprietary frameworks, standards such as EJB Entities and Java Data Objects, OpenSource frameworks such as Hibernate and EclipseLink (known as TopLink at the time).

Nicolas Fränkel
Jun 24, 2012 envers hibernate persistence

How to test code that uses Envers

Envers is a Hibernate module that can be configured to automatically audit changes made to your entities. Each audited entity are thus associated with a list of revisions, each revision capturing the state of the entity when a change occurs. There is however an obstacle I came across while I was 'unit testing' my DAO, and that’s what I want to share to avoid others to fall in the same pit.

Nicolas Fränkel
Jun 17, 2012 cms devops drupal

Vagrant your Drupal

In one of my recent post, I described how I used VMWare to create a Drupal I could play with before deploying updates to morevaadin.com. Then, at Devoxx France, I attended a session where the talker detailed how he set up a whole infrastructure for after work formations with Vagrant. Meanwhile, a little turn of fate put me in charge of some Drupal projects and I had to get better at it…​ fast. I put my hands on the Definitive Guide to Drupal 7 that talks about Drupal use with Vagrant.

Nicolas Fränkel
Jun 3, 2012

Ways of comparing Date objects in Java

Let’s face it, compairing Date objects in Java is complex and as well as error-prone. This is the case in standard code, but this is also the case in testing code, where we regularly need to create Date objects that point at specific instant in time, to be our reference in comparison. The good ol' deprecated way In test code, I’ve no qualms about using deprecated methods.

Nicolas Fränkel
« Newer Posts Page 67 of 83 Older Posts »
A Java geek © 2008-2026
v. bc04c88300c3ec997ce8470fbff5395dc9e518b1/13264050981
Latest Posts