Uncategorized

Default log4j initialization procedure

Posted on

  The default initialization algorithm is invoked when the LogManager class is loaded into memory. This class is guaranteed to be loaded before any logger can be used. The exact initialization algorithm is defined as follows: If the log4j.defaultInitOverride system property is set to any other value then “false”, the default initialization procedure (this procedure) […]

Uncategorized

Docker container networking modes

Posted on

https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach Note on docker container networking modes Docker offers different networking modes when running containers. Depending on the mode you choose you would connect to your MySQL database running on the docker host differently. docker run –net=”bridge” (default) Docker creates a bridge named docker0 by default. Both the docker host and the docker containers have an IP address on […]

Uncategorized

Стратегии загрузки коллекций в JPA

Posted on

https://dou.ua/lenta/articles/jpa-fetch-types/ Стратегии загрузки коллекций в JPA Понимание стратегий загрузки коллекций в JPA и Hibernate является ключевым для производительности приложения, использующего ORM. Отношениям один-ко-многим или многие-ко-многим между таблицами реляционной базы данных в объектном виде соответствуют свойства сущности типа List или Set, размеченные аннотациями @OneToMany или @ManyToMany. При работе с сущностями, которые содержат коллекции других сущностей, возникает проблема известная как «N+1 selects». Первый запрос выберет только корневые сущности, а каждая […]

Uncategorized

Http Message Converters with the Spring Framework

Posted on

http://www.baeldung.com/spring-httpmessageconverter-rest 1. Overview This article describes how to Configure HttpMessageConverter in Spring. Simply put, message converters are used to marshall and unmarshall Java Objects to and from JSON, XML, etc – over HTTP. 2. The Basics 2.1. Enable Web MVC The Web Application needs to be configured with Spring MVC support – one convenient and very customizable way to do […]

Linux

Linux multihome host with rule based routing

Posted on

http://jensd.be/468/linux/two-network-cards-rp_filter rp_filter Since RHEL 6 (and CentOS 6), asymmetric routing doesn’t work anymore out of the box. The cause of the issue is a change in the default value for kernel parameter rp_filter. Rp_filter stands for reverse path filtering. The reverse path filter will check if the source of a packet that was received on a certain interface […]

Uncategorized

Connecting services and hosts in Icinga2

Posted on

To minimize overall configuration text it might be convenient to list all host services in the same block where the host is defined. The “apply for ” construct allows to di such thing. For example:   object Host “myhost.com” { import “generic-host-template” address = “myhost.com” vars.ipmi_address = “myhost-mgmt.com” vars.ipmi_config = “/usr/local/etc/freeipmi/ipmi_myhost.cfg” vars.service.https[“Myhost web”] = {port=8443} […]

Unix

Battery learning on LSI controller

Posted on

https://web.archive.org/web/20130729085738/http://inside.godaddy.com/learning-deal-learning/ Many RAID controllers, like our Dell PERC cards, go through a battery learning cycle which calibrates the capacity of the battery to ensure it does not unexpectedly fail. For us, this cycle occurs every 90 days. When a battery learning cycle begins, it fully charges, discharges, and then charges again, realigning the true capacity of the […]