Home Blog

Blog

Checked InterruptedException in Java is a constant source of pain for many of us; here is my understanding of how it should be handled. Source: What Do You Do With InterruptedException?
I want to share with you my Spring Core Certification notes I took. Here they are:
What is Spring Boot? Spring Boot is a set of preconfigured framework that works on top of Spring Framework and simplifies configuring a Spring application. What are the advantages of using Spring Boot? Most important advantage is easy configuration of Spring application. Additional to this it provides something more: Integrated web containers that allow for easy testing Starters - sets of dependencies that help...
What is the delegating filter proxy? Delegating filter proxy is a servlet filter registered with the web container that delegates the requests to a Filter implementation on the Spring context side. That is there a 2 places servlet filters are attached to: Web container  Spring context As of Spring Security all requests pass through delegating filter proxy that is registered with the container...

Hibernate notes

Hibernate is an ORM framework that implements Java Persistence API (JPA). For Hibernate to work we need 3 things: Hibernate configuration (hibernate.properties or hibernate.cfg.xml) Mapping metadata (XML or annotation-based) - info for instructing Hibernate on how the entities have to be mapped to DB tables Session from SessionFactory for being able to invoke persistence methods Hibernate is accessible from: Maven repo ...
What is the difference between checked and unchecked exceptions? Checked exceptions are exceptions that are checked at compile time - that fact enforces the developer to either catch it and handle or declare as being thrown and it will be propagated in call stack. Unchecked exceptions are not checked at compile time. Why do we (in Spring) prefer unchecked exceptions? Spring prefers...
MVC is an abbreviation for a design pattern. What does it stand for and what is the idea behind it? MVC stands for Model-View-Controller. The idea is to separate these three concepts rather than mixing them - as it is very hard to work when you have a view mixed with a controller and you need to change some details of...
What is the concept of AOP? Which problem does it solve? Aspect Oriented Programming (alias AOP) is a concept of separating cross-cutting parts of an application. For example suppose you want to add logging or some security functions to different elements of your application. Usually you would add some code to each element you want to add that functionality to....

Fast Logback

I've been reading Logback documentation today and found an interesting moment about its speed of logging. Assuming we have set a logging level higher than DEBUG (INFO, WARN or ERROR) and then we try to log something like: This approach takes long time to calculate because independent of the fact that log statement may be disabled that calcualtion of String value...

The lost camel

There is something interesting about Camel Routes. Usually they are defined in the beginning and assumed to have the same endpoints. But today I had a situation when depending on the .process() execution the result endpoint had to be dynamic. So after consulting with one of my colleagues I found the following solution: BUT THIS DOES NOT WORK ... the problem is about...