Welcome

Reassociated object has dirty collection reference

This is something really weird Hibernate error you may come up in several situations. When I first googled around, I found some sites commenting the source of error as “trying to attach a transient entity with the session, or entity with a collection not in type of PersistentCollection etc.” However, none of those cases maches […]

Adding New Permission Types to Spring Security ACL

Domain object level security is probably least used feature of Spring Security compared to url based and method level security features for enterprise Java web applications. However, when you have a security requirement something like “I want to restrict some operations which is allowed for some roles based on criteria that can be obtained from […]

Allowing roles without defining them in intercept-url element

Spring Security Framework has lots of authentication and authorization features, and almost all of them can be customized and extended according to your own needs. One of the common requests I come up with is that developers don’t want to explicitly define roles which have administrative priviledges in intercept-url elements like below; <intercept-url pattern=”/secured/*” access=”ROLE_ADMINISTRATOR,ROLE_USER,ROLE_EDITOR”/> […]

If Your Eclipse Hangs…

Recently, my STS installation started to freeze during “initializing java/spring tooling” step. As a first attempt, I suspended all validations from window>preferences>validation, however it didn’t help much. Whenever you experience a hang or freeze in your Eclipse installation, it is always a good habit to look inside of .metadata/.log file in Eclipse workspace folder. Most […]

Reusing Persistent Token Mechanism of Spring Security

Spring Security Framework exists in my enterprise application development tool suite for ages. Over years it has evolved a lot and become a much more reusable and extendable framework for various security needs. Recently, one of my clients came up with an interesting requirement. They are developing a mobile client for their enterprise web application, […]

A Criteria Builder Idiom for Hibernate Queries

This simple idiom continuingly appears in our search/find use cases, and several other ones, which have parts, in which we find some data to act on it, according to some specific condition. In search/find use cases, users enter some data pattern, select some options, enter date ranges to narrow or broaden the result of those […]

First Impression Is Really Important

I have attended a 3 day workshop for Oracle Coherence Product. Altough I am a veteran Eclipse user, we used JDeveloper 11g Technology Preview 3 during our lab sessions. During those lab sessions, I noticed an ugly thing related with JDeveloper. JDeveloper provides some IDE mechanism to generate equals and hashCode methods for your classes. […]

Spring Way of Implementing Abstract Factory Pattern

In my current work, I am responsible for developing a platform to ease web application development using several JEE technologies such as JSF, SWF, Spring, and JPA/Hibernate or Toplink. One main consideration of our management is to keep platform as flexible as possible in terms of which ORM tool is used. Every web application that […]