Looking for something else? Check the categories of Java:
Class loading Garbage Collection Google Guava Hibernate Java Java 8 Java bytecode Java collections Java concurrency Java I/O Java Instrumentation Java memory model JPA JUnit Maven Monitoring Off-heap Play Framework Spring Data JPA Spring framework Spring Integration Spring security Spring Web MVC Tomcat
If not, below you can find all articles belonging to Java.
Almost every time we use auto increment keys (or serial in PostgreSQL). But Hibernate allows three more choices to handle primary key generation of entity objects. This article will show it.
In two previous articles we saw some of design patterns implemented in Spring framework. This time we'll discover 3 new patterns used by this popular framework.
The last time we talked about design patterns in Spring, we discovered 3 creational and 1 behavioral patterns. This time we'll focus more on structural and behavioral ones.
When a website is liked by search engine crawlers, it has more chances to be liked (or only known) by real users. However, some server configurations doesn't work well with crawlers activity. And it's the case of Tomcat 7 and its sessions. But one solution exists - crawler session manager valve.
Producer-consumer services can be very quickly realized with native Java features. One of them, arrived with the 7th version of Java, is CompletionService.
Synchronized blocks are only one of methods to handle concurrent access to Java's objects. Another one are the implementation of classes included in java.util.concurrent.locks package.
Spring integration is a Spring-family project illustrating well the idea of enterprise integration patterns. To understand better this Spring project, we'll write some test cases to show how they work. This article will introduce the basic concepts of Spring Integration.
Design patterns help to follow good practices of programming. Spring framework, as one of the most popular web frameworks, also uses some of them.
Sometimes you will need to share properties values through multiple configuration files. They can, for example, have the same authentication information about database user, but, they can use different databases. In Spring we can resolve this problem with properties placeholders.
Events, and generally callback idea, are very popular in technologies associated to GUI (JavaScript, Swing). On the server side of web applications they're less popular. However it doesn't mean that we can't implement one event-oriented architecture on it. Above all when we're working with Spring.
Annotations in Java let us, programmers, to transfer some of configuration from configuration files into Java classes. For example, in Spring, we can configure URL mapping directly inside the controllers thanks to @RequestMapping annotation. But it couldn't be possible without several utilitary classes, like AnnotationUtils, described here.
Google Guava as a set of libraries used in Google projects couldn't not contain some worries about concurrency.
One of most "speaking" objects in Java is String. However, to achieve some operations we need to implement own methods. With Google Guava String support, operations on chain of characters are easier.
In the previous articles we were working with Hibernate's specific elements as Session or SessionFactory. But they are not the only possible choices. We can too opt for working with Hibernate's implementation of JPA specification.
When multiple operations must be processed at once, it's better to do it automatically. This type of operations is called batch (do not confuse with bash which is a command language).
Classes synchronization in Java multi-threading environment can be done thanks to many classes from java.util.concurrent package. But it can also be achieved thanks to some traditional methods, as monitors.
In multi-threading languages as Java, a memory model is mandatory to be able to determine correctly code behavior on concurrent tasks execution.
If you're following well the article about authentication and authorization in Play Framework, you could see that @Authorize annotation is accompanied by another annotation, @With. Thanks to it, the @Authorized is evaluated with the class specified inside @With annotation.
We've already discovered the bean post processor factory in Spring. However, they left one similar concept to explain, bean post processors.
Spring allows us to make a lot of operations with beans. We can decide if they should be unique instance on container (singleton) or not (prototype). We can also make some of operations "in the fly", thanks to bean factory post processors.