Quantcast
Channel: Magnus K Karlsson
Browsing all 526 articles
Browse latest View live

Enable JMX Remote in Tomcat 7

IntroductionRemote monitoring is essential in a IT infrastructure. Sadly is the standard Java JMX based on port range. Here I will show you to overcome that in Tomcat 7.InstallationDownload...

View Article


CSRF and Character Encoding Filter in Tomcat 7

In Tomcat 7 there are several interesting filter, which are ready to be used:CsrfPreventionFilter (Cross-Site Request Forgery), for details about CSRF, see OWASP CSRF.SetCharacterEncodingFilter, for...

View Article


Image may be NSFW.
Clik here to view.

Eclipse Top Download Plugins

Eclipse is maybe the most used IDE for java developers, but you also need some plugins to be even more productive. Here are the most downloaded.Subversive / Subclipse - SVN plugins! Who installs it...

View Article

Image may be NSFW.
Clik here to view.

Gang of Four (GoF) Design Pattern

The old book of Gang of Four (GoF) Design Pattern by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides never get to old. And if you are not familiar with it. Read it!Here is a good site with...

View Article

Java EE 6 Deployment Descriptors

Contexts and Dependency Injection for Java (CDI) 1.0[META-INF/beans.xml|WEB-INF/beans.xml]Java Persistence API (JPA) 2.0META-INF/persistence.xmlEnterprise JavaBeans (EJB) 3.1META-INF/ejb-jar.xmlJBoss...

View Article


Hibernate Best Practise, JPA 2.0 and Second Level Cache with Infinispan

IntroductionThe technique of using ORM has been becoming the defacto standard, when developing new application, but after passed the level of school books example, the usage of using ORM is not so...

View Article

Maven RPM Plugins

There are two major maven rpm plugins.rpm-maven-plugin The Codehaus mojo plugin is good and holds good quality as almost all mojo plugins, but has one big disadvantage. It requires rpmbuild linux tool,...

View Article

How to Install Tomcat 6 on RHEL 6

A good and accurate guide exists on http://oracle-base.com/articles/linux/apache-tomcat-installation-on-linux.php

View Article


Puppet IDE Geppetto

When writing puppet modules I would recommend using an IDE when writing puppet code. The IDE from puppetlab is the most mature - Geppetto. Geppetto is fine, but one warning when installing it.DO NOT...

View Article


Crontab Expression

I do not write contab scheduling expression every day, so I tend to forget the expression syntax. Below is a good site for generating such expressions.http://www.crontab-generator.org/

View Article

Good intro to AngularJS

Good intro to AngularJS, is built up with examples and short theory introduction.https://github.com/curran/screencasts/tree/gh-pages/introToAngular

View Article

How to Create a Bootable USB for Linux ISO

IntroductionThe most generic way to create a bootable USB with a Linux ISO file, is to use the dd command.PrerequisiteOn RHEL/CentOS/Fedora# yum install syslinuxOn Ubuntu/Debian$ sudo apt-get install...

View Article

Use YubiKey for 2 Factor Authentication on Ubuntu 14.04

To increase the security for your Google Account you can use 2 factor authentication with SMS. But also you can use YubiKey. To get that to work on Ubuntu 14.04 follow the instruction here...

View Article


Why EJB?

When people think of Java EE, they think in first hand of EJB, even though the EE specification contains much than EJB. For example Rod Johnson (founder of Spring) pointed out in the Expert One-on-One...

View Article

JUnit testing CDI and EJB with Mockito, OpenEJB and Arquillian

IntroductionUnit testing EE have previously been hard, but since EE 6 and onward the EE specification has been improved on the test front.Since EE 6 the following has been...

View Article


Using Hamcrest with JUnit 4

IntroductionThe latest JUnit 4 comes with a transitive dependency of hamcrest. What hamcrest brings to the table is to increase the readability of the test code. This is important because codes are...

View Article

Getting Started with Mockito

IntroductionTo create effective unit test, they should be fast. But also you might need to mock object out to be able to write unit tests. The most common library to use for mocking is mockito.Example:...

View Article


Image may be NSFW.
Clik here to view.

What is Docker and Why is it Hot?

What is Docker?It is the possible replacement for Virtualization.What is the Difference between Virtualization and Docker? Below is a good picture from https://www.docker.com/whatisdocker. So the...

View Article

How to Log SQL Statements, Parameters and Cache in Hibernate?

IntroductionCurrent implementation of Hibernate are:Hibernate 4.2 implements JPA 2.0 (EE 6)Hibernate 4.3+ implements JPA 2.1 (EE 7)LoggingDo not set logging level in persistence.xml...

View Article

Fast Scala Compilation with Maven and Zinc

If you need faster scala compilation, see http://hohonuuli.blogspot.se/2012/11/fast-scala-compilation-with-maven.html.

View Article
Browsing all 526 articles
Browse latest View live