Blog Posts

Another useful tool from Zeroturnaround – Xrebel

Some time ago I signed up for a beta testing of a new tool from Zeroturnaround : Xrebel. I have been waiting a bit impatiently for a testing program to start. Finally I have got an information about availability of 1.0.0 version of the tool for download. Without much hesitation I have started tests. What does the tool do? As you may expect, based on previous Zeroturnarond tools, generally speaking it is intended to improve quality of Java developer every

Continue Reading

Hibernate + 2nd level cache bug

Recently, I have come across a nasty bug. When Hibernate executes a cacheable query and applying a ResultTransformer on a result of that query, java.lang.ClassCastException is thrown. [crayon-5b51b987eda27613888998/] It seems that the ResultTransformer is applied on the result before putting it into cache. Cache expects Object list but it receives transformed results (in this case RateDTO list). It cannot deal with it and as a result exception is thrown. The bug is present in Hibernate 3.6.6.Final version. One of the workarounds

Continue Reading

Java enums + template method design pattern

Let’s consider the following code snippets: [crayon-5b51b987edeea139394730/]   [crayon-5b51b987edeee192192869/] How often do we see much the same scenario? It is not completely wrong since there is a try to use enums so it is not entirely “string driven” programming. However there is still a space to do some refactoring. What about doing such stuff more in the object-oriented way? Enums are very powerful Java feature but for most of the cases there are only used in the simplest possible way.

Continue Reading

Java application performance monitoring

I am going to present quick overview of useful tools which can be helpful when you trying to troubleshoot application in case of performance issues. Describing each tool, some overview is provided, the way the tool is installed, free/paid info, inclusion in the JDK and the information if it can be used in production environment. logs application logs, application server logs, database logs no installation free included with JDK can be used in production application server monitoring administration console provided

Continue Reading

JPA EntityManager operations order

I have run into interesting issue recently. I use in the project JPA + Hibernate + EJB. The issue concerns saving and deleting entities in the same transaction. Database table which is used has an unique constraint defined on two columns. What I have done was removing entity calling [crayon-5b51b987ee146729899542/] then the new entity has been added with the same values in two properties associated with columns used in the unique constraint but different values in other properties using: [crayon-5b51b987ee14b580144074/]

Continue Reading

Grails + Axon = CQRS (part II)

 As promised in one of the previous posts, I carry on series concerning Groovy, Grails and Axon framework in this case.  In Part I a few words have been written about Grails, CQRS and Axon. In this part, the sample application using mentioned technologies and architecture is presented. he application is developed in Grails. CQRS architecture is implemented with Axon framework support. There are two simple use cases in the application: entering new credit card transaction canceling created credit card transaction

Continue Reading

Jira – issue not visible on the agile board

JIRA agile, formerly known as GreenHopper (GreenHopper->JIRA Agile) has lots of nice features supporting agile planning during software development. This post involves th problem I have met using that feature. During my everyday duties concerning Jira from time to time I come across the following concern. When adding issue to the Jira it does not appear on the agile board. Specifically on the board describing sprint backlog or product backlog.It must be say that each agile board has corresponding filter

Continue Reading

Grails + Axon = CQRS (part I)

I continue series of posts regarding Groovy and Grails. In the previous post there were some starter information about Groovy programming language. In this one and the next one I would like to present sample application built with Grails and Axon which demonstrates a basic usage of CQRS architecture. Grails Grails is a rapid application development framework for the JVM. It is largely built on top of the Spring framework, and in particular, a lot of it is built on

Continue Reading

Groovy – Getting Started

As promised in the previous entry I am continuing series of Groovy posts. Starting from simple introduction we are moving to intermediate and advanced topics in the future posts. What is Groovy’s origin? Everything started in 2003 when James Strachan (official Groovy creator) wrote to Bob McWhirter: Wouldn’t it be “groovy” if we could have native syntax for lists, maps and regexs in Java like in most scripting languages? Wouldn’t it by “groovy” if we could have duck typing in

Continue Reading

Groovy – first time in Tiobe TOP 20

Idea about writing something about Groovy programming language came to my mind when I looked at Tiobe Programming Community Index for October 2013. Here is the index:   Firstly, I would like to write a few words summarizing how the index is produced. Tiobe takes into consideration programming languages fulfilling the following two criteria: language should have an own wikipedia page clearly saying that it concerns a programming language the programming language must be Turing complete The rating itself is

Continue Reading
Skip to toolbar