Home Blog

Blog

This is the first post from a series I plan to write; this series of posts will be about design patterns - those described by GoF (Gang of Four). Design patterns described by GoF in their book (https://en.wikipedia.org/wiki/Design_Patterns) are divided into 3 types: Creational (create objects for...
https://speakerdeck.com/vitalieb/efficient-logs-with-elastic-stack Demo code available at https://github.com/vitalieb/ElasticStackPresentation
Introduction Channels are used for routing messages to endpoints. Channels do the routing and endpoints perform the operations. Spring Integration (SI) provides numerous adapters for communication between different systems. SI uses 3 types of components to construct its messaging architecture:
Advanced class design: Anonymous classes are implicitly final and it can never be static. static method > default method default method > abstract method default method > default method (re-declared with different implementation) default method > static method static method > non-static method non-static method > static method Static methods can never be abstract. Static interface methods must be invoked using the interface name instead of reference variable - otherwise...
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 does REST stand for? REST stands for REpresentational State Transfer. What is a resource? Anything that can be named is a resource. Usually that nouns that define our model. What are safe REST operations? Safe operations are operations that don't change things. These are:  GET HEAD OPTIONS What are idempotent operations? Why is idempotency important? Idempotent operations are operations that always return the same result....
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...