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.
Previously we discovered the advantages of repositories compared to classic DAO layer. We saw that repositories supported both native SQL and JPQL queries. But do they support other features of JPA, as Criteria API ? Yes, and we'll see it in this article.
Spring Expression Language (SpEL) est is used often in Spring Security project. But Spring Data also supports it.
Querying database with JPQL queries is quite simple. But a main drawback of this solution is its static character. To create dynamic queries, a more adapted solution exists, JPA Criteria.
Entity modeling looks like the most important and the single meta data associated with a Java class in JPA. But it's not alone. Static metamodels are a meta data describing entity too. Unless, they are used in different purposes.
Synchronous events have one major drawback: they're natively executed in the calling thread. If the listener handling on of synchronous events takes 5 seconds to respond, the final user won't able to see the response within at least 5 seconds. However, one alternative solution is proposed to this problem - asynchronous events.
Native Java offers a lot of possibilities to create thread pools, retrieve task results as Future instances. But Spring isn't worse and with its scheduling package allows to work with threads executed in background.
In one of previous articles we saw that Google Guava provides a listenable futures which are able to invoke callback methods. But it's not theirs single feature.
Like some other programming languages, Java is also commonly called "compiled language". However sometimes you may be confused when somebody tells you that Java is JIT compiled.
Until now we've working with filters belonging to Spring Security project. However we can also add our own custom filters which must only follow some basic rules.
Spring Security is based on filter chain. Every filter can be invoked for appropriate request and executed to provide supplementary layer of protection. But one important thing must be respected - filters order.
In Spring we can configure dependencies in several ways: with XML files or directly in Java using annotations. This first way is usual considered as clearer and simpler to maintain. And if you're working with it, you certainly met some of Spring XML namespaces, as those one for Spring Security or Spring MVC projects. In this article we'll focus on this aspect of Spring.
In the previous article about JPA we discovered how to create Java objects inheritance tree directly from a single database table with discriminator annotations. In this occasion we discovered also another interesting annotation, used to define inheritance type - @Inheritance.
Sometimes database data can be simply reflected in Java objects. But in other situations, when for example one database table stores several types of Java objects, it can be more difficult. And for these situations JPA uses discriminators.
Temporal information is very precious for all marketing purposes, as birthday e-mailing or several other reminders. JPA has specific annotation to handle this type - @Temporal.
In some situations @Entity annotation can be useless and we can still need to use Java objects as objects managed by JPA provider. In these cases we can use embeddable objects, representing by @Embedded and @Embeddable annotations.
With more and more data to send, enterprise integration applications can become less and less usable if code and architecture don't evolve. Beside these two key elements to improve growing system performances, Spring Integration provides another one, called messages splitting and aggregation.
Beside static-looking XML configuration, Spring Integration provides some dynamic mechanisms. One of them is routing which allows one message to be received by dynamically resolved message channel.
In one from first articles about Spring Integration we discovered the idea of conversion service. However, it's not only one element which can change message from one format to another one. The second element is message transformer, in integration world known also as message translator.
New concept described in this article will be chaining. Exactly as in another domain of life, chaining in Spring Integration allows to group together a set of elements. At this occasion we'll also discover some of elements which can be defined inside chains: filters and header enrichers.
This time we'll cover more core concepts of Spring Integration: messages and another concept with 'message' in the name, message handlers..