Simple and fast refactoring of your database model is one of the most important things in order to implement flexible business requirements. Learn the basics of continuous database integration with liquibase. Liquibase supports tracking, managing and applying database schema changes. Feel the power and simplicity of liquibase.
Long running transactions might be killed by the App Server's Transaction Reaper. I have implemented a litte helper to programmatic handle such kinds of exceptions.
For long running transactions sometimes we wish to commit a kind of intermediate result to the database. This sounds pretty simple – however, if we do not want to commit the current transaction, you may run into deadlock situations. In my current project I implemented a nice solution using JPA and EJB.
In my current project we decided to use JBoss Drools 6, mainly for mapping data. It turned out to come in quite handy. However, when I tried to unit test my rules I was astonished how clumsy and cumbersome that was. Therefore I wrote a little library containing a JUnit-Runner that hides the needed boiler plate code and just lets you focus on the important thing: testing the rules.
Janine Eichler (guest author)
I’ve always wanted to attend a Java conference this big. This year I finally had the chance to participate for one day. I was too enthusiastic to concentrate on one specific topic. Therefore, I had quite a wide range of subjects like Elasticsearch, Continuous Documentation and Internet of Things.
On the second day of this year’s JAX we dived into subjects like Spring, HTTP/2, Cloud and Performance.
Altering a MongoDB index cannot be done out-of-the-box. If you are tired of dropping and creating indices by hand, have a look at this little hack.
A common way to estimate user stories is the planning poker. In planning poker every team member plays a card to estimate a story. The number of this card stands for the story points. I had a look at different tools which support this classical estimation technique in a digital way.
When invoking a method of an EJB we get features like transactions, security or monitoring for free. However, this only works when the method call is intercepted by the container. So, method calls within the same bean do not enjoy this benefits. There is a nice hack to solve this problem.
Recently I used hazelcast in several projects. Especially in an Application Server environment using the hazelcast JCA connector it is pretty easy to use hazelcast with only a few lines of code. Unfortunately, Hazelcast.getAllHazelcastInstances() returns an empty set in unit tests. So, what we need to do is to mock our HazelcastFactory somehow.
When using Hibernate as JPA provider you need to tell the application which database vendor you are using. The classic approach is to set the property "hibernate.dialect". This works in most cases. However, I often have to cope with different database vendors serving the same datasource - depending on the current environment. A solution to this problem is to use a DialectResolver that dynamically detects the needed Hibernate dialect to talk to the database.