Sat, Sep 19, 2015
This article will be about multiple joins in Hibernate model during super class fetch in JOINED inheritance mapping strategy, and generally how I significantly improved our system performance using some simple patterns. There’s a lot of stuff on internet about this (usually wrong approach), so here I’ll present my working solution for this problem.
Fri, Aug 28, 2015
Few days ago I was asked to implement charts with some finance data using JS charting library, in the application working on Postgres database. There’s a lot of finance stuff in the database stored every minute and I just needed to show this data on charts.
OK, but charts are nice if you can restrict amount of your data returned from the server to some limited number of items. Returning 1000 items would both - make chart very heavy and unreadable and consume a lot of net traffic. I assumed 50 as the average number of items that are nicely displayed on such charts and are also acceptable from the traffic point of view.
Sat, Jun 20, 2015
This catching title will be not about distributed hibernate search, but something really close :)
The case I’ve recently solved was a quite different. I have a frontend application that uses hibernate database and hibernate search, and then I needed to add additional application - let’s call it an integration server, which exposes some API webservices for the overall system. Integration server uses the same database as the frontend application, and enables clients to put data to the database using its webservices. Both applications exist on two different physical servers, as well.
Thu, Dec 25, 2014
In previous BIRT versions there were three ways to use BIRT with your Hibernate datasource:
- Just plain SQL on Hibernate database.
- Scripting data source.
- Hibernate ODA data source.
Mon, Oct 27, 2014
In the current project we faced the problem of concurrent changes to database, for the data that should be accessed sequentially. Imagine you have the customer’s bank account where he can withdraw the money. If the customer is not a person, but company, and if he can have multiple users accessing the bank application, without any locks there’s a chance for situation where two or more users depute transfers, that exceed the account balance, but because data is accessed concurrently, they both can make payoff.
Sun, Jul 27, 2014
Here I’d like to describe another interesting case I’ve been struggling with for recent few days. This involves the following use case: enable asynchronous events support for Tomcat/Spring multi-tenancy SaaS application, that can be pushed to listening client groups. To be specific, the event should be channeled to following groups: to specific user, to all users of specific tenant and to all users.
Thu, Oct 24, 2013
JCA can be really tricky to perform simple, common tasks. After latest usage of java cryptography I’d like to present below the simplest usage of cryptography methods, involving mainly symmetric (AES) and asymmetric (RSA/DSA) encryption plus some helper methods.
Fri, Oct 18, 2013
Apache Tika has a wonderful feature, that can transform source document (PDF, MSOffice, Open Office etc.) into HTML during content extraction, what can be used for example to make document preview directly on webpage without involving any third-party components. Sound pretty simple, but I’ve dug through a lot of google search results and I can’t find a simple working example anywhere.
Wed, Oct 16, 2013
Today I was playing a little about Play Framework. This is very nice lightweight application framework for Java and Scala. I was trying to make an app and deploy to Heroku, which is a PaaS platform where you can host you Play applications for free (with some limitations of course).
Mon, Oct 7, 2013
This article describes some complementation for Open Session In View pattern for Java/Spring. But first I want to show just my point of view about the pattern itself. Many people consider this as an anti-pattern and tell that it never should be used. I think exactly opposite, and here are some explanations.