Home » Archives for Ondrej Mihalyi

Author Archives: Ondrej Mihalyi

Ondrej is a lecturer and consultant inventing and evangelizing new approaches with already proven Java tooling. As a Scrum Master and expert in Java EE ecosystem, he helps companies to build and educate their developer teams, improve their development processes and be flexible and successful in meeting client requirements.

INTRODUCTION TO CONCURRENCY AND THREADS IN JAVA WEB APPS

Threads, concurrency, or synchronization are not very easy to understand concepts. When some concurrency is involved in our applications it’s pretty hard to avoid making mistakes. Although Java provides mechanisms to deal with parallel programming, sometimes there are just too many options. And often some essential options are missing. For web applications, Jakarta EE provides a simplified programming model to ...

Read More »

Get logged-in user info in Jakarta EE – the simplest way

java-interview-questions-answers

The security before Java EE 8 / Jakarta EE 8 used to be a bit complicated and confusing. Every specification provided its own way to retrieve information about the logged-in user. The situation greatly improved with the introduction of the Security API that provides a unified way to do that – simply inject the SecurityContext CDI bean. There’s still a small catch ...

Read More »

How to properly inject CDI beans into JAX-RS sub-resources

java-interview-questions-answers

Jakarta REST (JAX-RS) defines it’s own dependency injection using the @Context annotation. REST resources also support CDI injection if you enable CDI on the REST resource class (e.g. using a bean-defining annotation like @RequestScoped). But injection doesn’t work out of the box on JAX-RS sub-resources. How to create sub-resources so that both injection mechanisms work also in sub-resources? I’ll show you, it’s very easy. How to ...

Read More »

Possible ways to use Arquillian in Jakarta EE TCKs

Recently, we had a discussion how to create a standalone Jakarta Batch test kit (TCK). For most of the committers, it’s pretty natural to use Arquillian to abstracts tests away from how they are executed on an implementation. But Romain proposed an intriguing idea to use plain JUnit5 that got me thinking. And it didn’t stop with thinking. After a ...

Read More »

New features between Java 8 and Java 14

Since version 9, Java has new features every 6 months and it’s very hard to keep track of these new changes. Most of the information on the internet describes changes between the last 2 Java versions. However, if you’re in a similar situation as me, you’re not using the last Java version but a version several releases older. Then it’s ...

Read More »

Speed Up Services With Reactive API in Java EE 8

java-interview-questions-answers

Services can often be optimized with asynchronous processing even without changing their behavior towards the outside world. The reason why some services aren’t efficient is that they need to wait for other services to provide a result to continue further. Let’s look how to call external REST services without waiting for them and also do multiple parallel calls independently and ...

Read More »

Configure passwords in Payara Server and GlassFish

java-interview-questions-answers

Answeriing Stackoverflow questions provides a great feedback for finding out gaps in the official documentation of my favourite opensource tools. One of the questions which I answered here was how to change Payara Server master password in docker container. Obviously, in a standard server installation, this is simple – just use the  asadmin change-master-password  command, then type the old and ...

Read More »

So, Oracle killed java.net

Well, not yet…but they announced to shutdown java.net and kenai by May 2017. I have been interviewed about this for an ADTmag article The ‘Sunsetting’ of Kenai and java.net by John K. Waters. As Oracle provided little information to what will happen to critical projects that are already hosted on java.net, most of what was written in the article is ...

Read More »

JPQL Enhancements in JPA 2.1 and Java EE 7 (part 1 – JOIN ON)

java-interview-questions-answers

Java EE 7 is around for a few years already, and provides several very useful and long-awaited features, like entity graphs and better support for stored procedures and results mapping. For an overview, have a look at Thorben Janssen’s blog post. However, I’d like add a more detailed summary about features in the JPA query language. All of them are ...

Read More »