EJB Singleton Beans were introduced by the EJB 3.1 specification and are often used to store cached data. This means, we try to improve the performance of our application by using a Singleton. In general, this works quite well. Especially if there are not too many calls in parallel. But it changes if we ignore
CDI Are you familiar with CDI events? Really? Well, then you might skip the beginning of the article You think you know everything about CDI events… Think again! by Antoine Sabot-Durand. He gives a great overview about how CDI events work and their (current) drawbacks. And he gives a small sneak peak at the changes we
This post was written together with +Aslak Knutsen (@aslakknutsen). JPA Attribute Converters provide an easy way to define how an entity attribute gets persisted to the database. You can use them to implement lots of different features, e.g. to encrypt your data as I showed in a previous post: How to use a JPA Attribute Converter to
A few days ago, I read an interesting article by Bear Giles about Database encryption using JPA listeners from 2012. He discusses his requirements for an encryption solution and provides a code example with JPA listeners. His main requirements are: provide transparent encryption that does not affect the application, be able to add the encryption
This is my second post on Entity Graphs. The first post described the usage of named entity graphs. These can be used to define a graph of entities and/or attributes at compile time that shall be fetched with a find or query method. Dynamic entity graphs do to the same but in a dynamic way. This
Last friday (2014-04-04) I visited the JUG Saxony Day 2014 in Dresden, Germany. It was the first event organized by the JUG Saxony and to make it short, it was great! The event was well organized and had lots of interesting talks. But let’s get into more details … The conference offered 4 tracks with
Lazy loading is often an issue with JPA. You have to define at the entity if you want to use FetchType.LAZY (default) or FetchType.EAGER to load the relation and this mode is always used. FetchType.EAGER is only used if we want to always load the relation. FetchType.LAZY is used in almost all of the cases
Encrypting the communication between client and server provides improved security and privacy protection for your system. This can be an important requirement by the customer, especially if client or server need to work in an unprotected network. This article shows you how to setup SSL encrypted EJB calls in JBoss AS 7.