Java

A Simple Guide To Tomcat Logging

Posted on

https://www.mulesoft.com/tcat/tomcat-logging Some additional info: http://mrhaki.blogspot.ru/2011/02/configure-log4j-on-tomcat.html An Overview of Tomcat Logging As of Tomcat 5.5, Apache’s Java Commons Logging (JCL) technology is used throughout Tomcat.  JCL is a lightweight API for Java applications that allows hierarchical logging to be supported across all log levels, independent of logging implementation.  This means that rather being limited to a […]

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 […]

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} […]