Looking for something else? Check the categories of JVM:
Akka 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 Scala async Scala collections Scala core Scala functional Scala OOP Scala syntax Scala tests Scala types Spring Data JPA Spring framework Spring Integration Spring security Spring Web MVC Tomcat
If not, below you can find all articles belonging to JVM.
Testing view part of web applications in Spring isn't a simple task. But to simplify it, you can use libraries as HtmlUnit, a kind of command-line browser written in Java. And Spring Test MVC HtmlUnit allows to integrate this library inside Spring test cases and to write more complex test cases.
Previously we discovered how to setup test environment in Play Framework. Now we can focus on more pragmatic aspect, test writing.
Sometimes when you want to write a code "proof of concept", you can define classes without names, inside methods. It's for example the case of very common new Thread(new Runnable() {}).start() which launches new Java's thread. In this article we'll focus on these classes, called anonymous inner classes.
Last time we discovered the very basic elements of Java's bytecode, as methods or fields representations. This time we will treat more advanced subject, methods in general.
When you're learning Java concurrency, you surely hear very often about barriers. These barriers are expressed explicitly in bytecode, a intermediary form between code wrote by human and interpreted by machine. In this article we'll begin to learn the interpretation of bytecode to understand better what happen with it after, when machine uses it.
Java's collection framework is a very large subject. We can find there collections sorted by natural key name, containing only single element of given value, able to be extended thanks to no-fixed size needed at initialization. We can find there also collections considered as navigable.
Working with databases implies the respect of ACID principle. One of "tools" used to ensure this respect are transactions.
Google Guava provides a lot of programming shortcuts. It contains a simplified version of String and primitives management. These features seem a little bit basic. However, Google's library simplifies also the work with more complex stuff as cache.
Working with files in Java, and more precisely, reading file streams, was always a little bit complicated. It's the reason why each new version of Java contains some improvements for that. And Google Guava, once again, appears as an alternative.
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.