<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Java on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/java/</link>
    <description>Recent content in Java on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Thu, 02 Jul 2026 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/java/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Orchestrator Agent with Parallel Sub-Agents in Kiro CLI</title>
      <link>https://www.hascode.com/orchestrator-agent-with-parallel-sub-agents-in-kiro-cli/</link>
      <pubDate>Thu, 02 Jul 2026 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/orchestrator-agent-with-parallel-sub-agents-in-kiro-cli/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;kiro-cli-orchestration-cover.png&#34; alt=&#34;kiro cli orchestration cover&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. kiro orchestrator agents&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_overview&#34;&gt;Overview&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Kiro CLI allows us to configure an orchestrator agent that executes specialized sub-agents in parallel.
Each sub-agent has its own tools, permissions, and MCP servers – the parent’s trust settings are &lt;strong&gt;not&lt;/strong&gt; inherited.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_architecture&#34;&gt;Architecture&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;kiro-orchestrator-agents.svg&#34; alt=&#34;kiro orchestrator agents&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 2. Agents flow&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_step_1_define_specialized_agents&#34;&gt;Step 1: Define Specialized Agents&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We give each sub-agent its own JSON configuration under &lt;code&gt;.kiro/agents/&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;&lt;code&gt;.kiro/agents/code-agent.json&lt;/code&gt;&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;{
  &amp;#34;name&amp;#34;: &amp;#34;code-agent&amp;#34;,
  &amp;#34;description&amp;#34;: &amp;#34;Implements features and writes code&amp;#34;,
  &amp;#34;prompt&amp;#34;: &amp;#34;You are an experienced Kotlin/Java developer. Write clean, tested code.&amp;#34;,
  &amp;#34;tools&amp;#34;: [&amp;#34;read&amp;#34;, &amp;#34;write&amp;#34;, &amp;#34;shell&amp;#34;, &amp;#34;code&amp;#34;, &amp;#34;grep&amp;#34;],
  &amp;#34;allowedTools&amp;#34;: [&amp;#34;read&amp;#34;, &amp;#34;code&amp;#34;, &amp;#34;grep&amp;#34;],
  &amp;#34;toolsSettings&amp;#34;: {
    &amp;#34;write&amp;#34;: {
      &amp;#34;allowedPaths&amp;#34;: [&amp;#34;./src/**&amp;#34;, &amp;#34;./tests/**&amp;#34;],
      &amp;#34;deniedPaths&amp;#34;: [&amp;#34;./.env&amp;#34;, &amp;#34;./secrets/**&amp;#34;]
    },
    &amp;#34;shell&amp;#34;: {
      &amp;#34;allowedCommands&amp;#34;: [&amp;#34;mvn test&amp;#34;, &amp;#34;mvn compile&amp;#34;],
      &amp;#34;autoAllowReadonly&amp;#34;: true
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>CVE Scanning and Guided Remediation with OSV Scanner</title>
      <link>https://www.hascode.com/cve-scanning-and-guided-remediation-with-osv-scanner/</link>
      <pubDate>Fri, 28 Mar 2025 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/cve-scanning-and-guided-remediation-with-osv-scanner/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;osv-scanner-cover.webp&#34; alt=&#34;osv scanner cover&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. OSV Scanner&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Security is a critical aspect of software development, and staying ahead of vulnerabilities is essential for us application developers. Google’s OSV Scanner is a powerful tool that helps detect vulnerabilities in open-source dependencies.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This article will guide us through setting up and using OSV Scanner to secure our projects, scan for invalid licenses, scan OCI images and finally how to fix findings via guided remediation.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Messaging with NATS and Java</title>
      <link>https://www.hascode.com/messaging-with-nats-and-java/</link>
      <pubDate>Tue, 26 Nov 2024 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/messaging-with-nats-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;nats-messaging.svg&#34; alt=&#34;nats messaging&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. NATS Architecture Component Diagram&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;NATS is a high-performance messaging system that offers simplicity, speed, and scalability. It is particularly suited for building distributed systems and microservices.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This article demonstrates how to integrate NATS with Java, showcasing the essential steps to set up, connect, and publish/subscribe to messages.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Before diving in, we should ensure to have the following installed:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Java Development Kit (JDK) 11 or later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Maven or Gradle for dependency management.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Docker (optional).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Object Audit with Java and Javers</title>
      <link>https://www.hascode.com/object-audit-with-java-and-javers/</link>
      <pubDate>Mon, 18 Sep 2023 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/object-audit-with-java-and-javers/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;object-audit-javers-cover-image.webp&#34; alt=&#34;object audit javers cover image&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Object Audit with Java and Javers&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
Just a quick snippet
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_integration&#34;&gt;Maven Integration&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependency&amp;gt;
  &amp;lt;groupId&amp;gt;org.javers&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;javers-core&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;${javers.version}&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_calculate_changes_in_object_graph&#34;&gt;Calculate Changes in Object Graph&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package io.hascode;

import org.javers.core.Changes;
import org.javers.core.Javers;
import org.javers.core.JaversBuilder;
import org.javers.core.diff.Diff;

public &amp;lt;T&amp;gt; Changes diff(T snapshot, T latest) {
  Javers javers = JaversBuilder.javers().build();
  Diff diff = javers.compare(snapshot, latest);
  return diff.getChanges();
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_resources&#34;&gt;Resources&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://javers.org/&#34;&gt;Javers Website&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Forwardings Requests to static content in Spring Boot Webflux</title>
      <link>https://www.hascode.com/forwardings-requests-to-static-content-in-spring-boot-webflux/</link>
      <pubDate>Tue, 16 Aug 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/forwardings-requests-to-static-content-in-spring-boot-webflux/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following &lt;code&gt;WebFilter&lt;/code&gt; redirects incoming requests for &lt;code&gt;/&lt;/code&gt; to a static HTML file, &lt;code&gt;index.html&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;ToIndexPageRedirection.java&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.tutorial;

import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono;

@Component
public class ToIndexPageRedirection implements WebFilter {
    @Override
    public Mono&amp;lt;Void&amp;gt; filter(ServerWebExchange exchange, WebFilterChain chain) {
        if (exchange.getRequest().getURI().getPath().equals(&amp;#34;/&amp;#34;)) {
            return chain.filter(
                exchange.mutate().request(
                    exchange.getRequest().mutate().path(&amp;#34;/index.html&amp;#34;).build()
                ).build()
            );
        }

        return chain.filter(exchange);
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Ressources:&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/server/WebFilter.html&#34;&gt;JavaDocs WebFilter&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Single Class Java HTTP Client with Proxy and SSL/TLS Keystore Settings</title>
      <link>https://www.hascode.com/single-class-java-http-client-with-proxy-and-ssl/tls-keystore-settings/</link>
      <pubDate>Tue, 02 Aug 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/single-class-java-http-client-with-proxy-and-ssl/tls-keystore-settings/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes this is useful for the diagnosis of configuration and network problems of ones Java application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This is our single-class HTTP client example without the need for external dependencies:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;HttpTest.java&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ProxySelector;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpRequest.BodyPublishers;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.UnrecoverableKeyException;
import java.security.cert.CertificateException;
import java.time.Duration;
import java.time.temporal.ChronoUnit;

public class HttpTest {
    public static void main(String[] args)
        throws URISyntaxException, NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException, IOException, CertificateException {
        String bodyPayload = &amp;#34;&amp;#34;&amp;#34;
            ourpayload, json, xml, ...
            &amp;#34;&amp;#34;&amp;#34;;

        String keyStorePath = &amp;#34;/opt/keystore.jks&amp;#34;;
        String keyStorePassword = &amp;#34;ABCDEFG&amp;#34;;

        String proxyHost = &amp;#34;ourproxy.proxy&amp;#34;;
        String uriString = &amp;#34;https://some-service/api&amp;#34;;
        int proxyPort = 8080;
        int timeoutInSeconds = 60;

        KeyStore keyStore = KeyStore.getInstance(&amp;#34;JKS&amp;#34;);
        keyStore.load(new FileInputStream(keyStorePath), keyStorePassword.toCharArray());

        KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(&amp;#34;PKIX&amp;#34;);
        keyManagerFactory.init(keyStore, null);

        TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(&amp;#34;PKIX&amp;#34;); // using same keystore for both
        trustManagerFactory.init(keyStore);

        SSLContext sslContext = SSLContext.getInstance(&amp;#34;TLS&amp;#34;);
        sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);

        HttpClient client = HttpClient.newBuilder()
                                      .proxy(
                                          ProxySelector.of(new InetSocketAddress(proxyHost, proxyPort)))
                                      .sslContext(sslContext)
                                      .build();
        URI uri = new URI(uriString);
        HttpRequest request = HttpRequest.newBuilder(uri)
                                         .POST(BodyPublishers.ofString(bodyPayload))
                                         .timeout(Duration.of(timeoutInSeconds, ChronoUnit.SECONDS))
                                         .build();
        System.out.printf(&amp;#34;Sending POST request to %s, timeout: %ds%n&amp;#34;, uri, timeoutInSeconds);
        try {
            HttpResponse response = client.send(request, BodyHandlers.ofString());
            System.out.println(&amp;#34;Response received...&amp;#34;);
            System.out.printf(&amp;#34;\tResponse-Status: %d%n&amp;#34;, response.statusCode());
            System.out.printf(&amp;#34;\tResponse-Body: %s%n&amp;#34;, response.body());
            System.out.println(&amp;#34;-------------------------------------%n&amp;#34;);

        } catch (IOException e) {
            System.err.printf(&amp;#34;IOException caught: %s%n&amp;#34;, e.getMessage());
            e.printStackTrace(System.err);
        } catch (InterruptedException e) {
            System.err.printf(&amp;#34;IOException caught: %s%n&amp;#34;, e.getMessage());
            e.printStackTrace(System.err);
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Spring Boot Kafka Increase Message Size Limit</title>
      <link>https://www.hascode.com/spring-boot-kafka-increase-message-size-limit/</link>
      <pubDate>Thu, 09 Jun 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/spring-boot-kafka-increase-message-size-limit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Let’s say we would like to increase the limit t 10MB …​&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_broker_configuration&#34;&gt;Broker Configuration&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apply the new limit either by modifying the &lt;code&gt;server.properties&lt;/code&gt; like this…​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;max.message.bytes=10485760&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;olist lowerroman&#34;&gt;
&lt;ol class=&#34;lowerroman&#34; type=&#34;i&#34;&gt;
&lt;li&gt;
&lt;p&gt;or apply it to a specific topic using&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kafka-configs.sh --bootstrap-server localhost:9092 \
    --entity-type topics  \
    --entity-name thetopic \
    --alter \
    --add-config max.message.bytes=10485760&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_producer_configuration_for_spring_boot&#34;&gt;Producer Configuration for Spring Boot&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We simply need to add the following line to our &lt;code&gt;application.properties&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;spring.kafka.producer.properties.max.request.size=spring.kafka.producer.properties.max.request.size&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following proof-of-concept demonstrates that without the property, sending a large message fails, with the property it succeeds:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Embedded Kafka for Spring Boot Testing without using Docker</title>
      <link>https://www.hascode.com/embedded-kafka-for-spring-boot-testing-without-using-docker/</link>
      <pubDate>Wed, 25 May 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/embedded-kafka-for-spring-boot-testing-without-using-docker/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes it is nice to set up an embedded Kafka broker for testing without the need to have Docker installed (e.g. for using testcontainers-lib).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following snippet shows, how to set up an embedded Kafka instance for testing for a Spring Boot project.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven, this is our Spring Boot project with dependencies needed:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34;
         xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34;
         xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&amp;#34;&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
    &amp;lt;parent&amp;gt;
        &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;spring-boot-starter-parent&amp;lt;/artifactId&amp;gt;&lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
        &amp;lt;version&amp;gt;2.6.4&amp;lt;/version&amp;gt;
        &amp;lt;relativePath/&amp;gt; &amp;lt;!-- lookup parent from repository --&amp;gt;
    &amp;lt;/parent&amp;gt;

    &amp;lt;groupId&amp;gt;com.hascode.tutorial&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;kafka-testing&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;

    &amp;lt;properties&amp;gt;
        &amp;lt;project.build.sourceEncoding&amp;gt;UTF-8&amp;lt;/project.build.sourceEncoding&amp;gt;
        &amp;lt;project.reporting.outputEncoding&amp;gt;UTF-8&amp;lt;/project.reporting.outputEncoding&amp;gt;
        &amp;lt;java.version&amp;gt;17&amp;lt;/java.version&amp;gt;
        &amp;lt;maven.compiler.source&amp;gt;${java.version}&amp;lt;/maven.compiler.source&amp;gt;
        &amp;lt;maven.compiler.target&amp;gt;${java.version}&amp;lt;/maven.compiler.target&amp;gt;
        &amp;lt;kafka.version&amp;gt;3.1.0&amp;lt;/kafka.version&amp;gt;&lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;
    &amp;lt;/properties&amp;gt;

    &amp;lt;dependencies&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-boot-starter&amp;lt;/artifactId&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.kafka&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-kafka&amp;lt;/artifactId&amp;gt;&lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;(3)&lt;/b&gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-boot-starter-test&amp;lt;/artifactId&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.kafka&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-kafka-test&amp;lt;/artifactId&amp;gt;&lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;(4)&lt;/b&gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;&lt;i class=&#34;conum&#34; data-value=&#34;5&#34;&gt;&lt;/i&gt;&lt;b&gt;(5)&lt;/b&gt;
            &amp;lt;groupId&amp;gt;org.junit.jupiter&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;junit-jupiter-api&amp;lt;/artifactId&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.junit.jupiter&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;junit-jupiter-engine&amp;lt;/artifactId&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.junit.platform&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;junit-platform-launcher&amp;lt;/artifactId&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;
        [..]
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Bean Mapping with MapStruct</title>
      <link>https://www.hascode.com/java-bean-mapping-with-mapstruct/</link>
      <pubDate>Thu, 31 Mar 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-bean-mapping-with-mapstruct/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://mapstruct.org/&#34;&gt;MapStruct&lt;/a&gt; is a nice tool to generate mappers for converting one Java bean into another
e.g. for projections, data-transfer-objects and so on …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As long as fields in source and target beans do match, the mapper is able to generate the data setting automatically ..
else we may specify which source fields to map into which target fields or to register custom converters with ease.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven, we need to add dependencies and plugin integration to our &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Configuring Spring Boot WebserviceTemplate to sign WSS SOAP Requests</title>
      <link>https://www.hascode.com/configuring-spring-boot-webservicetemplate-to-sign-wss-soap-requests/</link>
      <pubDate>Wed, 30 Mar 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/configuring-spring-boot-webservicetemplate-to-sign-wss-soap-requests/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes when accessing SOAP APIs, our SOAP client needs to sign the request.
How this can be achieved using Spring Boot’s WebserviceTemplate within a few steps is the scope of this short article.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This snippet only deals with the client side not with the security configuration on the server side.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Also it assumes, that you have already set up your keystore/truststore and that you’re loading these with your Spring Boot application’s startup without errors.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Converting XML Schema (XSD) to Protocol Buffers (Protobuf)</title>
      <link>https://www.hascode.com/converting-xml-schema-xsd-to-protocol-buffers-protobuf/</link>
      <pubDate>Wed, 02 Feb 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/converting-xml-schema-xsd-to-protocol-buffers-protobuf/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes one needs to derive a Google Protocol Buffers schema from an XML schema .. e.g. from an Enterprise Architect Export.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Tool used here: &lt;a href=&#34;https://github.com/entur/schema2proto/&#34;&gt;schema2proto (GitLab project)&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Download &lt;code&gt;schema2proto-lib&lt;/code&gt; from the global Maven repository: &lt;a href=&#34;https://search.maven.org/search?q=schema2proto&#34; class=&#34;bare&#34;&gt;https://search.maven.org/search?q=schema2proto&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run &lt;code&gt;Schema2Proto&lt;/code&gt; against a give XSD schema file and with a given output directory:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre&gt;java -jar schema2proto-lib-1.53.jar Schema2Proto --outputDirectory=src/main/protobuf input.xsd&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A yaml config file may be given instead of cli parameters:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;java -jar schema2proto-lib-1.53.jar Schema2Proto ----configFile=config.yaml input.xsd&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Kafka Java Quickstart with Docker</title>
      <link>https://www.hascode.com/kafka-java-quickstart-with-docker/</link>
      <pubDate>Sat, 29 Jan 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/kafka-java-quickstart-with-docker/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Setup Kafka and Zookeeper with Docker and docker-compose&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a message consumer and producer in Java&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_kafka_setup&#34;&gt;Kafka Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re using &lt;code&gt;docker-compose&lt;/code&gt; to set up our message broker, zookeper and other stuff using &lt;code&gt;confluent-platform&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This is our &lt;code&gt;docker-compose.yaml&lt;/code&gt; config file from Confluent’s following
&lt;a href=&#34;https://github.com/confluentinc/cp-all-in-one/blob/7.0.1-post/cp-all-in-one-community/docker-compose.yml&#34;&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;docker-compose.yaml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;---
version: &amp;#39;2&amp;#39;
services:
  zookeeper:
    image: confluentinc/cp-zookeeper:7.0.1
    hostname: zookeeper
    container_name: zookeeper
    ports:
      - &amp;#34;2181:2181&amp;#34;
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000

  broker:
    image: confluentinc/cp-kafka:7.0.1
    hostname: broker
    container_name: broker
    depends_on:
      - zookeeper
    ports:
      - &amp;#34;29092:29092&amp;#34;
      - &amp;#34;9092:9092&amp;#34;
      - &amp;#34;9101:9101&amp;#34;
    environment:
      KAFKA_BROKER_ID: 1
      KAFKA_ZOOKEEPER_CONNECT: &amp;#39;zookeeper:2181&amp;#39;
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
      KAFKA_JMX_PORT: 9101
      KAFKA_JMX_HOSTNAME: localhost

  schema-registry:
    image: confluentinc/cp-schema-registry:7.0.1
    hostname: schema-registry
    container_name: schema-registry
    depends_on:
      - broker
    ports:
      - &amp;#34;8081:8081&amp;#34;
    environment:
      SCHEMA_REGISTRY_HOST_NAME: schema-registry
      SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: &amp;#39;broker:29092&amp;#39;
      SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081

  connect:
    image: cnfldemos/kafka-connect-datagen:0.5.0-6.2.0
    hostname: connect
    container_name: connect
    depends_on:
      - broker
      - schema-registry
    ports:
      - &amp;#34;8083:8083&amp;#34;
    environment:
      CONNECT_BOOTSTRAP_SERVERS: &amp;#39;broker:29092&amp;#39;
      CONNECT_REST_ADVERTISED_HOST_NAME: connect
      CONNECT_GROUP_ID: compose-connect-group
      CONNECT_CONFIG_STORAGE_TOPIC: docker-connect-configs
      CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
      CONNECT_OFFSET_FLUSH_INTERVAL_MS: 10000
      CONNECT_OFFSET_STORAGE_TOPIC: docker-connect-offsets
      CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
      CONNECT_STATUS_STORAGE_TOPIC: docker-connect-status
      CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
      CONNECT_KEY_CONVERTER: org.apache.kafka.connect.storage.StringConverter
      CONNECT_VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
      CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry:8081
      CONNECT_PLUGIN_PATH: &amp;#34;/usr/share/java,/usr/share/confluent-hub-components&amp;#34;
      CONNECT_LOG4J_LOGGERS: org.apache.zookeeper=ERROR,org.I0Itec.zkclient=ERROR,org.reflections=ERROR

  ksqldb-server:
    image: confluentinc/cp-ksqldb-server:7.0.1
    hostname: ksqldb-server
    container_name: ksqldb-server
    depends_on:
      - broker
      - connect
    ports:
      - &amp;#34;8088:8088&amp;#34;
    environment:
      KSQL_CONFIG_DIR: &amp;#34;/etc/ksql&amp;#34;
      KSQL_BOOTSTRAP_SERVERS: &amp;#34;broker:29092&amp;#34;
      KSQL_HOST_NAME: ksqldb-server
      KSQL_LISTENERS: &amp;#34;http://0.0.0.0:8088&amp;#34;
      KSQL_CACHE_MAX_BYTES_BUFFERING: 0
      KSQL_KSQL_SCHEMA_REGISTRY_URL: &amp;#34;http://schema-registry:8081&amp;#34;
      KSQL_PRODUCER_INTERCEPTOR_CLASSES: &amp;#34;io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor&amp;#34;
      KSQL_CONSUMER_INTERCEPTOR_CLASSES: &amp;#34;io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor&amp;#34;
      KSQL_KSQL_CONNECT_URL: &amp;#34;http://connect:8083&amp;#34;
      KSQL_KSQL_LOGGING_PROCESSING_TOPIC_REPLICATION_FACTOR: 1
      KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE: &amp;#39;true&amp;#39;
      KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE: &amp;#39;true&amp;#39;

  ksqldb-cli:
    image: confluentinc/cp-ksqldb-cli:7.0.1
    container_name: ksqldb-cli
    depends_on:
      - broker
      - connect
      - ksqldb-server
    entrypoint: /bin/sh
    tty: true

  ksql-datagen:
    image: confluentinc/ksqldb-examples:7.0.1
    hostname: ksql-datagen
    container_name: ksql-datagen
    depends_on:
      - ksqldb-server
      - broker
      - schema-registry
      - connect
    command: &amp;#34;bash -c &amp;#39;echo Waiting for Kafka to be ready... &amp;amp;&amp;amp; \
                       cub kafka-ready -b broker:29092 1 40 &amp;amp;&amp;amp; \
                       echo Waiting for Confluent Schema Registry to be ready... &amp;amp;&amp;amp; \
                       cub sr-ready schema-registry 8081 40 &amp;amp;&amp;amp; \
                       echo Waiting a few seconds for topic creation to finish... &amp;amp;&amp;amp; \
                       sleep 11 &amp;amp;&amp;amp; \
                       tail -f /dev/null&amp;#39;&amp;#34;
    environment:
      KSQL_CONFIG_DIR: &amp;#34;/etc/ksql&amp;#34;
      STREAMS_BOOTSTRAP_SERVERS: broker:29092
      STREAMS_SCHEMA_REGISTRY_HOST: schema-registry
      STREAMS_SCHEMA_REGISTRY_PORT: 8081

  rest-proxy:
    image: confluentinc/cp-kafka-rest:7.0.1
    depends_on:
      - broker
      - schema-registry
    ports:
      - 8082:8082
    hostname: rest-proxy
    container_name: rest-proxy
    environment:
      KAFKA_REST_HOST_NAME: rest-proxy
      KAFKA_REST_BOOTSTRAP_SERVERS: &amp;#39;broker:29092&amp;#39;
      KAFKA_REST_LISTENERS: &amp;#34;http://0.0.0.0:8082&amp;#34;
      KAFKA_REST_SCHEMA_REGISTRY_URL: &amp;#39;http://schema-registry:8081&amp;#39;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Logback and Spring Boot - Change Log Level to custom format</title>
      <link>https://www.hascode.com/logback-and-spring-boot-change-log-level-to-custom-format/</link>
      <pubDate>Thu, 19 Aug 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/logback-and-spring-boot-change-log-level-to-custom-format/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_create_a_custom_converter&#34;&gt;Create a custom converter&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This class converts the well known log levels to a custom format&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;CustomLogLevelConverter.java&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode;

public class CustomLogLevelConverter extends ClassicConverter {
    @Override
    public String convert(ILoggingEvent event) {
        switch (event.getLevel().toInt()) {
            case Level.ERROR_INT:
                return &amp;#34;ERROR!!!&amp;#34;;
            case Level.WARN_INT:
                return &amp;#34;WARN!!&amp;#34;;
            case Level.INFO_INT:
                return &amp;#34;INFO!&amp;#34;;
            case Level.TRACE_INT:
                return &amp;#34;DEBUG&amp;#34;;
            default:
                return event.getLevel().toString();
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_register_the_converter&#34;&gt;Register the converter&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following Logback config includes some defaults and registers our custom converter.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>GitHub Release Pipeline for Java</title>
      <link>https://www.hascode.com/github-release-pipeline-for-java/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/github-release-pipeline-for-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Set up Maven build pipeline for a Java 11 app&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Release Maven artifact on GitHub using GitHub actions&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup_maven&#34;&gt;Setup Maven&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Assuming that we have a project named &lt;code&gt;sample-app&lt;/code&gt; released for my &lt;code&gt;hascode&lt;/code&gt; GitHub account:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re adding some release information to our project’s &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34;
  xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34;
  xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&amp;#34;&amp;gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
  &amp;lt;groupId&amp;gt;com.hascode&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;sample-app&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;bookmark-manager
  &amp;lt;name&amp;gt;sample-app&amp;lt;/name&amp;gt;
  &amp;lt;description&amp;gt;hasCode.com Bookmark Manager&amp;lt;/description&amp;gt;


  &amp;lt;scm&amp;gt;
    &amp;lt;developerConnection&amp;gt;scm:git:https://github.com/hascode/sample-app.git
    &amp;lt;/developerConnection&amp;gt;
  &amp;lt;/scm&amp;gt;


  &amp;lt;distributionManagement&amp;gt;
    &amp;lt;repository&amp;gt;
      &amp;lt;id&amp;gt;github&amp;lt;/id&amp;gt;
      &amp;lt;name&amp;gt;GitHub&amp;lt;/name&amp;gt;
      &amp;lt;url&amp;gt;https://maven.pkg.github.com/hascode/sample-app&amp;lt;/url&amp;gt;
    &amp;lt;/repository&amp;gt;
  &amp;lt;/distributionManagement&amp;gt;


  &amp;lt;properties&amp;gt;
    &amp;lt;java.version&amp;gt;11&amp;lt;/java.version&amp;gt;
    &amp;lt;project.scm.id&amp;gt;github&amp;lt;/project.scm.id&amp;gt;
  &amp;lt;/properties&amp;gt;

  [..]
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JUnit5 Java Maven Snippet</title>
      <link>https://www.hascode.com/junit5-java-maven-snippet/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/junit5-java-maven-snippet/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Use JUnit Maven BOM for version alignment&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add minimal dependencies for JUnit5 Java Projekt&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Excerpt from the &lt;a href=&#34;https://maven.apache.org&#34;&gt;Maven&lt;/a&gt; project’s &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependencyManagement&amp;gt;
  &amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.junit&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;junit-bom&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;5.7.1&amp;lt;/version&amp;gt;
      &amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt;
      &amp;lt;scope&amp;gt;import&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
  &amp;lt;/dependencies&amp;gt;
&amp;lt;/dependencyManagement&amp;gt;

&amp;lt;dependencies&amp;gt;
  &amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.junit.jupiter&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;junit-jupiter&amp;lt;/artifactId&amp;gt;
    &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
  &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JUnit5 does not work with older versions of the Maven Compiler Plugin and the Surefire Plugin used for test execution.
Setting their versions in the &lt;code&gt;pom.xml&lt;/code&gt; is done like this:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Package a Spring Boot App as RPM</title>
      <link>https://www.hascode.com/package-a-spring-boot-app-as-rpm/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/package-a-spring-boot-app-as-rpm/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Package a Spring Boot Service as RPM Package&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure systemd integration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add install/uninstall hooks to create users, directories etc.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_setup&#34;&gt;Maven Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34;
  xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34;
  xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&amp;#34;&amp;gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
  &amp;lt;parent&amp;gt;
    &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;spring-boot-starter-parent&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;2.4.2&amp;lt;/version&amp;gt;
    &amp;lt;relativePath/&amp;gt;
  &amp;lt;/parent&amp;gt;
  &amp;lt;groupId&amp;gt;com.hascode&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;sample-app&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;
  &amp;lt;name&amp;gt;sample-app&amp;lt;/name&amp;gt;

  &amp;lt;properties&amp;gt;
    &amp;lt;java.version&amp;gt;11&amp;lt;/java.version&amp;gt;
  &amp;lt;/properties&amp;gt;
  &amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;spring-boot-starter-web&amp;lt;/artifactId&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;spring-boot-starter-actuator&amp;lt;/artifactId&amp;gt;
    &amp;lt;/dependency&amp;gt;
  &amp;lt;/dependencies&amp;gt;

  &amp;lt;build&amp;gt;
    &amp;lt;plugins&amp;gt;
      &amp;lt;plugin&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
        &amp;lt;groupId&amp;gt;de.dentrassi.maven&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;rpm&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;1.5.0&amp;lt;/version&amp;gt;
        &amp;lt;executions&amp;gt;
          &amp;lt;execution&amp;gt;
            &amp;lt;goals&amp;gt;
              &amp;lt;goal&amp;gt;rpm&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
          &amp;lt;/execution&amp;gt;
        &amp;lt;/executions&amp;gt;
        &amp;lt;configuration&amp;gt;
          &amp;lt;packageName&amp;gt;sample-app&amp;lt;/packageName&amp;gt;
          &amp;lt;skipSigning&amp;gt;true&amp;lt;/skipSigning&amp;gt;
          &amp;lt;group&amp;gt;Application/Misc&amp;lt;/group&amp;gt;
          &amp;lt;requires&amp;gt;
            &amp;lt;require&amp;gt;java-11-openjdk-headless&amp;lt;/require&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;
          &amp;lt;/requires&amp;gt;
          &amp;lt;entries&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;(3)&lt;/b&gt;
              &amp;lt;name&amp;gt;/opt/sample-app&amp;lt;/name&amp;gt;
              &amp;lt;directory&amp;gt;true&amp;lt;/directory&amp;gt;
              &amp;lt;user&amp;gt;root&amp;lt;/user&amp;gt;
              &amp;lt;group&amp;gt;root&amp;lt;/group&amp;gt;
              &amp;lt;mode&amp;gt;0755&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;(4)&lt;/b&gt;
              &amp;lt;name&amp;gt;/opt/sample-app/log&amp;lt;/name&amp;gt;
              &amp;lt;directory&amp;gt;true&amp;lt;/directory&amp;gt;
              &amp;lt;user&amp;gt;sample-app&amp;lt;/user&amp;gt;
              &amp;lt;group&amp;gt;sample-app&amp;lt;/group&amp;gt;
              &amp;lt;mode&amp;gt;0750&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;5&#34;&gt;&lt;/i&gt;&lt;b&gt;(5)&lt;/b&gt;
              &amp;lt;name&amp;gt;/opt/sample-app/sample-app.jar&amp;lt;/name&amp;gt;
              &amp;lt;file&amp;gt;${project.build.directory}/${project.build.finalName}.jar&amp;lt;/file&amp;gt;
              &amp;lt;user&amp;gt;root&amp;lt;/user&amp;gt;
              &amp;lt;group&amp;gt;root&amp;lt;/group&amp;gt;
              &amp;lt;mode&amp;gt;0644&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;6&#34;&gt;&lt;/i&gt;&lt;b&gt;(6)&lt;/b&gt;
              &amp;lt;name&amp;gt;/usr/lib/systemd/system/sample-app.service&amp;lt;/name&amp;gt;
              &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/sample-app.service&amp;lt;/file&amp;gt;
              &amp;lt;mode&amp;gt;0644&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
          &amp;lt;/entries&amp;gt;
          &amp;lt;beforeInstallation&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;7&#34;&gt;&lt;/i&gt;&lt;b&gt;(7)&lt;/b&gt;
            &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/preinstall.sh&amp;lt;/file&amp;gt;
          &amp;lt;/beforeInstallation&amp;gt;
          &amp;lt;afterInstallation&amp;gt;
            &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/postinstall.sh&amp;lt;/file&amp;gt;
          &amp;lt;/afterInstallation&amp;gt;
          &amp;lt;beforeRemoval&amp;gt;
            &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/preuninstall.sh&amp;lt;/file&amp;gt;
          &amp;lt;/beforeRemoval&amp;gt;
          &amp;lt;license&amp;gt;All rights reserved&amp;lt;/license&amp;gt;
        &amp;lt;/configuration&amp;gt;
      &amp;lt;/plugin&amp;gt;
    &amp;lt;/plugins&amp;gt;
  &amp;lt;/build&amp;gt;

&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Implementing Reactive Client-Server Communication over TCP or Websockets with RSocket and Java</title>
      <link>https://www.hascode.com/implementing-reactive-client-server-communication-over-tcp-or-websockets-with-rsocket-and-java/</link>
      <pubDate>Sun, 25 Nov 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/implementing-reactive-client-server-communication-over-tcp-or-websockets-with-rsocket-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Reactive design or reactive architecture has an impact on how modern software systems are implemented. RSocket is a project that aims to adapt the benefits of the patterns described in the Reactive Manifesto and resulting tools like Reactive Streams or Reactive Extensions  to a formal new communication protocol.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;RSocket works with TCP, WebSockets and Aeron transport layers and offers additional features like session resumption.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’m going to demonstrate how to implement simple client-server communication over TCP and Websockets for different interaction models like request-response, request-stream, fire-and-forget and event subscription.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Capacity Planning using the Universal Scalability Law with Java and usl4j</title>
      <link>https://www.hascode.com/capacity-planning-using-the-universal-scalability-law-with-java-and-usl4j/</link>
      <pubDate>Sun, 30 Sep 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/capacity-planning-using-the-universal-scalability-law-with-java-and-usl4j/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Capacity planning is an important task when trying to anticipate resources and scaling factors for our applications.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The usl4j library offers us an easy abstraction for Neil J. Gunther’s Universal Scalability Law and allows us to build up a predictive model based on the parameters throughput, latency and concurrent operations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With a basic input set of two of these parameters, we are able to predict how these values change if we change one input parameter so that we can build our infrastructure or systems according to our SLAs.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Testing Java Applications for Resilience by Simulating Network Problems with Toxiproxy, JUnit and the Docker Maven Plugin</title>
      <link>https://www.hascode.com/testing-java-applications-for-resilience-by-simulating-network-problems-with-toxiproxy-junit-and-the-docker-maven-plugin/</link>
      <pubDate>Sun, 29 Jul 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/testing-java-applications-for-resilience-by-simulating-network-problems-with-toxiproxy-junit-and-the-docker-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When implementing distributed systems, client-server architectures and simple applications with network related functionalities, everything is fine when we’re in the development or in the testing stage because the network is reliable and the communicating systems are not as stressed as they are in production.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;But to sleep well we want to validate how resilient we have implemented our systems, how they behave when the network fails, the latency rises, the bandwidth is limited, connections time out and so on.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using jetstreamDB as in-memory Database for Java</title>
      <link>https://www.hascode.com/using-jetstreamdb-as-in-memory-database-for-java/</link>
      <pubDate>Sat, 30 Jun 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-jetstreamdb-as-in-memory-database-for-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JetstreamDB is a in-memory database engine for Java that claims to be built for ultra-high speed and the ability of managing complex data structures by storing real Java objects instead of serializing data structures to other database specific formats.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short example I would like to demonstrate how to create and read items from such a database by building a small article management sample app.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;jetstreamdb-intellij.png&#34; alt=&#34;Using jetstreamDB for Java&#34; width=&#34;520&#34; height=&#34;345&#34;/&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Analyzing Java Problems – Tools, Snippets and Workflows</title>
      <link>https://www.hascode.com/analyzing-java-problems-tools-snippets-and-workflows/</link>
      <pubDate>Mon, 30 Apr 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/analyzing-java-problems-tools-snippets-and-workflows/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When we need to investigate the cause for a dysfunctional Java application we have a plethora of tools available that on the one hand help us in gathering information, artifacts and statistics and on the other hand help us in processing this information and identifying possible problems.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following list of tools, snippets, workflows and information about specific artifacts could provide a starting point for analyzing such problems and covers topics like heap-dumps, thread-dumps, heap-histograms, heap-regions, garbage-collection-logs, hotspot-compiler/codecache-logs, debugging native-memory, tools for heap-dump-analysis, JVM unified logging and more..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Setting up Kafka Brokers for Testing with Kafka-Unit</title>
      <link>https://www.hascode.com/setting-up-kafka-brokers-for-testing-with-kafka-unit/</link>
      <pubDate>Wed, 28 Mar 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/setting-up-kafka-brokers-for-testing-with-kafka-unit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When writing test for applications that interact with Kafka brokers we often need to setup a decent environment including an instance of Kafka and ZooKeeper.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Though Kafka ships with some classes for testing, setting up a simple testing environment is quite easier with the kafka-unit library that offers JUnit test rule support or a fast programmatic setup within no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short example, I’d like to show how create a simple setup using Maven, Surefire and kafka-unit.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Implementing, Testing and Running Procedures for Neo4j</title>
      <link>https://www.hascode.com/implementing-testing-and-running-procedures-for-neo4j/</link>
      <pubDate>Tue, 27 Feb 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/implementing-testing-and-running-procedures-for-neo4j/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A lot of features are already included in the Neo4j graph database system but sometimes we want to extends its capabilities and implement functions and procedures by ourselves that we may reuse.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I will demonstrate how to implement a procedure for Neo4j, how to write and run tests using JUnit and an embedded graph database and last but not least how to setup Neo4j with Docker and our stored procedure installed in no time.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Software Architecture Exploration and Validation with jqAssistant, Neo4j and Cypher</title>
      <link>https://www.hascode.com/software-architecture-exploration-and-validation-with-jqassistant-neo4j-and-cypher/</link>
      <pubDate>Sun, 31 Dec 2017 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/software-architecture-exploration-and-validation-with-jqassistant-neo4j-and-cypher/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written about other software system analyzing and validation tools before but today I would like to introduce a new tool named jqAssistant that supports software architects, developers and analysts in a variety of tasks like analyzing given structures, validating architectural or quality constraints and generating reports.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Therefore jqAssistant analyzes given projects or artifacts and stores the gathered information – that is enriched by a variety of existing plugin-ins – in a Neo4j graph database.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Identity Management, One-Time-Passwords and Two-Factor-Auth with Spring Boot and Keycloak</title>
      <link>https://www.hascode.com/identity-management-one-time-passwords-and-two-factor-auth-with-spring-boot-and-keycloak/</link>
      <pubDate>Sun, 26 Nov 2017 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/identity-management-one-time-passwords-and-two-factor-auth-with-spring-boot-and-keycloak/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Communicating with  identity and access management systems is a common task for many web-applications exposing secured resources.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Keycloak is an open source software that provides not also such authorization services but also offers a lot of features from Single-Sign-On, Identity-Brokering, Social-Login, User-Federation, multiple client-adapters up to the administration console or support for protocols like OpenID, SAML, OAuth2, Kerberos and more.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I will demonstrate how to integrate a Spring Boot web application with Keycloak and configure an authentication flow that requires a two-factor-authentication with user credentials and also one-time-passwords.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Java Mission Control (JMC) and Flight Recorder (JFR)</title>
      <link>https://www.hascode.com/snippet-java-mission-control-jmc-and-flight-recorder-jfr/</link>
      <pubDate>Wed, 11 Oct 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-java-mission-control-jmc-and-flight-recorder-jfr/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Java Mission Control and the Java Flight Recorder allow us to capture run-time information from our Java applications without much overhead and aggregate profiling information.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written down the commands that I’m using the most when profiling a Java application with this tool chain in the following article.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;java-mission-control-reports-1024x629.png&#34; alt=&#34;java mission control reports 1024x629&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Java Mission Control - Report&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_running_java_mission_control_jmc&#34;&gt;Running Java Mission Control (JMC)&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We may start the JMC user interface shown above using the &lt;em&gt;jmc&lt;/em&gt; command that is shipped with Oracle’s JRockit or Java (since Java 7 update 40).&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Detecting Vulnerable Dependencies with Maven and the OWASP Dependency Check Plugin</title>
      <link>https://www.hascode.com/detecting-vulnerable-dependencies-with-maven-and-the-owasp-dependency-check-plugin/</link>
      <pubDate>Tue, 03 Oct 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/detecting-vulnerable-dependencies-with-maven-and-the-owasp-dependency-check-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;On the one hand adding dependencies to a project is easy, on the other hand securing a project and checking for vulnerable dependencies is way harder.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The OWASP dependency check plugin for Maven allows us to scan our project’s dependencies for know vulnerabilities.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I will demonstrate its usage in the following short example.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;vulnerabilities-report-1024x867.png&#34; alt=&#34;vulnerabilities report 1024x867&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. OWASP Vulnerability Report&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We just need to add one plugin-dependency to our &lt;a href=&#34;http://maven.apache.org&#34;&gt;Mavenized&lt;/a&gt; project’s &lt;em&gt;pom.xml&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Microbenchmarks with JMH / Java Microbenchmark Harness</title>
      <link>https://www.hascode.com/microbenchmarks-with-jmh-/-java-microbenchmark-harness/</link>
      <pubDate>Mon, 02 Oct 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/microbenchmarks-with-jmh-/-java-microbenchmark-harness/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Writing microbenchmarks for parts of our applications is not always easy – especially when the internals of the virtual machine, the just-in-time-compiler and such things are coming into effect.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Java Microbenchmark Harness is a tool that takes care of creating JVM warmup-cycles, handling benchmark-input-parameters and running benchmarks as isolated processes etc.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now following a few short examples for writing microbenchmarks with JMH.&lt;br/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;java-jmh-microbenchmark-in-intellij.png&#34; alt=&#34;java jmh microbenchmark in intellij&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Java JMH Microbenchmarks running in IntelliJ&lt;/div&gt;</description>
    </item>
    <item>
      <title>Downloading Maven Artifacts from a POM file programmatically with Eclipse Aether</title>
      <link>https://www.hascode.com/downloading-maven-artifacts-from-a-pom-file-programmatically-with-eclipse-aether/</link>
      <pubDate>Fri, 08 Sep 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/downloading-maven-artifacts-from-a-pom-file-programmatically-with-eclipse-aether/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes I need to resolve Maven dependencies programmatically. Eclipse Aether is a library for working with artifact repositories and I’ll be using it in the following example to read dependency trees from a given POM descriptor file and download each dependency from a remote Maven repository to a local directory.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;using-eclipse-aether.png&#34; alt=&#34;using eclipse aether&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Using Eclipse Aether.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re adding a bunch of dependencies to our project’s &lt;em&gt;pom.xml&lt;/em&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;properties&amp;gt;
    &amp;lt;aetherVersion&amp;gt;1.1.0&amp;lt;/aetherVersion&amp;gt;
    &amp;lt;mavenVersion&amp;gt;3.2.1&amp;lt;/mavenVersion&amp;gt;
&amp;lt;/properties&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using JUnit 5 Parameterized Tests, Argument Sources and Converters</title>
      <link>https://www.hascode.com/using-junit-5-parameterized-tests-argument-sources-and-converters/</link>
      <pubDate>Sat, 19 Aug 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-junit-5-parameterized-tests-argument-sources-and-converters/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With JUnit 5 the possibilities to write parameterized tests have changed and improved a lot.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short overview covers all new types of possible parameter sources for JUnit 5 tests as well as the new conversion API for test arguments.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition we’re showing how parameterized tests were written in JUnit 4.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;running-junit5-in-intellij-1024x721.png&#34; alt=&#34;Running JUnit5 in IntelliJ&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Running JUnit5 in IntelliJ&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_about&#34;&gt;About&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We will be covering all available types of parameter sources in the following sections – all that you need as a prerequisite is Java ™, &lt;a href=&#34;http://maven.apache.org&#34;&gt;Maven&lt;/a&gt; and a few minutes of your time.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Assuring Architectural Rules with ArchUnit</title>
      <link>https://www.hascode.com/assuring-architectural-rules-with-archunit/</link>
      <pubDate>Mon, 03 Jul 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/assuring-architectural-rules-with-archunit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Maintaining architecture rules and constraints for a specific software project or an application is not easy as textual documentation is easily forgotten after a while and hard to verify.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;ArchUnit is a testing library that allows developers and software architects to write down such rules as executable tests that may be run by the development teams and the integration servers.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following article I will demonstrate the basic features of this library by applying rules and constraints to an existing application.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Template Driven Test POJO Generation with Fixture Factory and Java</title>
      <link>https://www.hascode.com/template-driven-test-pojo-generation-with-fixture-factory-and-java/</link>
      <pubDate>Tue, 20 Jun 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/template-driven-test-pojo-generation-with-fixture-factory-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In our tests we often need to create a bunch of test-objects that are populated with random-data. This data needs to follow specific rules as identifiers need to be unique or must be incremented, string-properties must follow special conventions and so on. In the following short tutorial I will demonstrate how to generate such test data using the Fixture Factory library.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;fixture-factory-running-with-junit-in-intellij-1024x752.png&#34; alt=&#34;fixture factory running with junit in intellij 1024x752&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Fixture Factory and JUnit&lt;/div&gt;</description>
    </item>
    <item>
      <title>Distributed Authorization and Contextual Caveats for Java with Macaroons and jmacaroons</title>
      <link>https://www.hascode.com/distributed-authorization-and-contextual-caveats-for-java-with-macaroons-and-jmacaroons/</link>
      <pubDate>Wed, 31 May 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/distributed-authorization-and-contextual-caveats-for-java-with-macaroons-and-jmacaroons/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Google’s Macaroons are a mechanism to establish distributed authorization. The distinction to the classical bearer-token is their ability that they may be used to perform an action under certain restrictions and may then be used to create a new macaroon with stricter restrictions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short tutorial demonstrates how to create macaroons, serialize and deserialize them, add first- and third-party caveats and finally to verify them.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;jmacarons-in-intellij-1024x748.png&#34; alt=&#34;jmacarons in intellij 1024x748&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. jmacaroons example&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Java 9 Modules and JPMS</title>
      <link>https://www.hascode.com/snippet-java-9-modules-and-jpms/</link>
      <pubDate>Mon, 17 Apr 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-java-9-modules-and-jpms/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Playing around with the new module system in Java 9 I simply wanted to write down how to achieve the most basic tasks.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Therefore I created the following module how-to based upon a simple demonstration project consisting of two dependant modules.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;component-diagram.png&#34; alt=&#34;component diagram&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Modules Component-Diagram&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites_and_setup&#34;&gt;Prerequisites and Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We need an early access build of the Java ™ 9 JDK, available for download &lt;a href=&#34;https://jdk9.java.net/download/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition we should make sure, that our environment variable &lt;em&gt;JAVA_HOME&lt;/em&gt; is set to the corresponding directory and calling &lt;em&gt;java -version&lt;/em&gt; returns something similar to this:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Writing BDD-Style Webservice Tests with Karate and Java</title>
      <link>https://www.hascode.com/writing-bdd-style-webservice-tests-with-karate-and-java/</link>
      <pubDate>Thu, 06 Apr 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/writing-bdd-style-webservice-tests-with-karate-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There is a new testing framework out there called Karate that is build on top of the popular Cucumber framework.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Karate makes it easy to script interactions with out web-services under test and verify the results. In addition it offers us a lot of useful features like parallelization, script/feature re-use, data-tables, JsonPath and XPath support, gherkin syntax, switchable staging-configurations and many others.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’ll be writing different scenarios and features for a real-world RESTful web-service to demonstrate some of its features.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Integrating the Drools Business Rules Management System in 5 Minutes</title>
      <link>https://www.hascode.com/snippet-integrating-the-drools-business-rules-management-system-in-5-minutes/</link>
      <pubDate>Thu, 30 Mar 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-integrating-the-drools-business-rules-management-system-in-5-minutes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Drools is a slim Business Rules Management System (BRMS) solution with different integrations and tools available.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short snippet I’d like to demonstrate how to integrate a simple rule engine into an application using this library.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;example-drools-app-in-eclipse-ide-1024x792.png&#34; alt=&#34;example drools app in eclipse ide 1024x792&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Drools Example running in Eclipse IDE&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using &lt;a href=&#34;https://gradle.org/&#34;&gt;Gradle&lt;/a&gt; here we only need to add one dependency for &lt;em&gt;drools-compiler&lt;/em&gt; to our project’s &lt;em&gt;build.gradle&lt;/em&gt;. In addition, we’re adding a task to execute our application.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Resilient Architecture in Practice – Circuit Breakers for Java: Failsafe, Javaslang, Hystrix and Vert.x</title>
      <link>https://www.hascode.com/resilient-architecture-in-practice-circuit-breakers-for-java-failsafe-javaslang-hystrix-and-vert.x/</link>
      <pubDate>Tue, 14 Feb 2017 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/resilient-architecture-in-practice-circuit-breakers-for-java-failsafe-javaslang-hystrix-and-vert.x/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When dealing with remote services or APIs there is always the risk of latency issues, failures or connection losses. The worst thing to happen is when the remote service is down and our application hangs until the underlying protocol’s (e.g. TCP) connection timeout is reached and we’re receiving an exception. Until this moment is reached, our application might hang, memory is allocated for threads or bound objects and at last, our continuous requests might prevent the remote system from recovering.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Transforming JSON Structures with Java and JOLT</title>
      <link>https://www.hascode.com/transforming-json-structures-with-java-and-jolt/</link>
      <pubDate>Sun, 29 Jan 2017 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/transforming-json-structures-with-java-and-jolt/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When it comes to web-services (especially RESTful web-services), configuration files or other data-descriptors, the JavaScript Object Notation, short: JSON is often used as format of choice.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As the task arises to transform these JSON structures, I have seen a variety of different approaches from converting JSON into XML using JAX-B, applying XSLT,  transforming into JSON again on the one hand to loading JSON structures into Hash-maps of Hash-maps (..) and manually removing single elements from these collections on the other hand.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Handling System Properties, Environment Variables, STDOUT/STDERR in JUnit Tests with System Rules</title>
      <link>https://www.hascode.com/handling-system-properties-environment-variables-stdout/stderr-in-junit-tests-with-system-rules/</link>
      <pubDate>Mon, 19 Dec 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/handling-system-properties-environment-variables-stdout/stderr-in-junit-tests-with-system-rules/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When important data is written to STDIN/STDOUT and an application relies on specific system properties or environment variables, writing tests is getting more complicated.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;System Rules is a collection of JUnit rules that helps us writing Java tests for everything that deals with java.lang.System.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’d like to demonstrate how to deal with system properties, environment variables, STDOUT and STDERR and capturing both for testing e.g. for some golden master refactoring.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating Microservices with Bootique</title>
      <link>https://www.hascode.com/creating-microservices-with-bootique/</link>
      <pubDate>Sun, 18 Sep 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-microservices-with-bootique/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When it comes to writing microservices in Java, plenty of tools and frameworks exist. In the following tutorial, I’d like to demonstrate another minimalistic framework called Bootique by implementing a simple microservice exposing its functions either as a RESTful web-service or as a runnable command executed using the command line.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Bootique Command Line&lt;/div&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;bootique-command-line.png&#34; alt=&#34;bootique command line&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven here, we’re adding the following elements to our project’s &lt;em&gt;pom.xml:&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Bootiques Bill of Materials as dependency management: &lt;em&gt;bootique-bom&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bootique Jersey for our REST service: &lt;em&gt;bootique-jersey&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bootique Logback for logging: &lt;em&gt;bootique-logback&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://maven.apache.org/plugins/maven-shade-plugin/&#34;&gt;Maven Shade Plugin&lt;/a&gt; to assemble our fat-jar&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Elasticsearch Integration Testing with Java</title>
      <link>https://www.hascode.com/elasticsearch-integration-testing-with-java/</link>
      <pubDate>Tue, 23 Aug 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/elasticsearch-integration-testing-with-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When building up search engines, indexing tons of data into a schema-less, distributed data store, Elasticsearch has always been a favourite tool of mine.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition to its core features, it also offers tools and documentation for us developers when we need to write integration tests for our Elasticsearch powered Java applications.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to implement a small sample application using Elasticsearch under the hood and how to write integration-tests with these tools for this application afterwards.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Object Graph Mapping by Example with Neo4j OGM and Java</title>
      <link>https://www.hascode.com/object-graph-mapping-by-example-with-neo4j-ogm-and-java/</link>
      <pubDate>Mon, 18 Jul 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/object-graph-mapping-by-example-with-neo4j-ogm-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When integrating a Neo4j database into a Java application a developer often needs to map nodes and edges of the graph to corresponding Java classes of the domain model.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Neo4j OGM eases this work and allows us to map our domain objects to the graph database using simple annotations – similar to the Java Persistence API (JPA) for relational database management systems.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to use Neo4j OGM to build a simple train timetable planner and a permission system mapping between graph, nodes, edges and POJOs.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>LDAP Testing with Java: ApacheDS vs Embedded-LDAP-JUnit</title>
      <link>https://www.hascode.com/ldap-testing-with-java-apacheds-vs-embedded-ldap-junit/</link>
      <pubDate>Mon, 04 Jul 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/ldap-testing-with-java-apacheds-vs-embedded-ldap-junit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When writing applications that interchange information with LDAP directory services there is always the need to write integration tests for these components and services.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Therefore we need a the possibility to start-up an embedded LDAP server, fill it with test-data and control its life-cycle during the test-phases.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate two candidates that fulfil this purpose, the ApacheDS test integrations and a small library named embedded-ldap-junit.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Continuous Delivery with GitHub Cloud and GitHub Pipelines</title>
      <link>https://www.hascode.com/continuous-delivery-with-github-cloud-and-github-pipelines/</link>
      <pubDate>Fri, 01 Jul 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/continuous-delivery-with-github-cloud-and-github-pipelines/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Atlassian has added a continuous integration service as a new feature to their GitHub Cloud product. It’s called GitHub Pipelines and it is similar to Travis CI for GitHub offering a nice integration for continuous integration/delivery pipelines for projects hosted on GitHub.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It’s still in the beta phase and requires a sign-up but nevertheless I’d like to demonstrate the current state of this service and how easy it is to add scripted pipelines to a project.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Layout Testing with Galen, JUnit and Maven</title>
      <link>https://www.hascode.com/layout-testing-with-galen-junit-and-maven/</link>
      <pubDate>Mon, 16 May 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/layout-testing-with-galen-junit-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Writing tests not only to verify the behaviour of a web site but also the correctness of its layout especially for responsive websites is not always easy.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Luckily the Galen Framework eases the task of writing layout tests for us, offering a specialized domain-specific-language to write layout-specifications, it integrates well with Selenium Grid, Sauce Labs or BrowserStack, it offers an easy way to deal with different browser sizes and responsive designs and it generates nice, detailed test reports.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Load Testing Web Applications with Gatling and Maven</title>
      <link>https://www.hascode.com/load-testing-web-applications-with-gatling-and-maven/</link>
      <pubDate>Fri, 06 May 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/load-testing-web-applications-with-gatling-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written about other performance testing tools for web applications before. Nevertheless I’d like to demonstrate a library for load testing web applications named Gatling in combination with the build tool Maven.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Gatling offers a nice Scala DSL, high performance using Akka, Netty and asynchronous IO and plug-ins for all modern build tools.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’m going to show how to record simulations using an HTTP proxy, rewriting simulations in Scala and running and reporting simulations with Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Dynamic Configuration Management with Netflix Archaius and Apache ZooKeeper, Property-Files, JMX</title>
      <link>https://www.hascode.com/dynamic-configuration-management-with-netflix-archaius-and-apache-zookeeper-property-files-jmx/</link>
      <pubDate>Wed, 13 Apr 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/dynamic-configuration-management-with-netflix-archaius-and-apache-zookeeper-property-files-jmx/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Though having written about other configuration management libraries for Java before, I would like to demonstrate another one today: Netflix Archaius.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Archaius offers some nice features like dynamic typed properties, thread-safe operations, an event system for property changes/updates, a JMX MBean to read and update properties and adaptors for a variety of dynamic configuration sources like Amazon DynamoDB, JDBC, URLs and Apache ZooKeeper.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to read and update application configuration properties with Archaius and data sources like property-files, system-properties, JMX and Apache ZooKeeper.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Setting up an OAuth2 Authorization Server and Resource Provider with Spring Boot</title>
      <link>https://www.hascode.com/setting-up-an-oauth2-authorization-server-and-resource-provider-with-spring-boot/</link>
      <pubDate>Sun, 13 Mar 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/setting-up-an-oauth2-authorization-server-and-resource-provider-with-spring-boot/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;OAuth2 is a frequently used standard for authorization and with Spring Boot it is easy to set up authorization and resource server in no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to set up an OAuth2 authorization server as well as a connected and secured resource server within a few minutes using Java, Maven and Spring Boot.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;springboot-and-oauth2-in-action-1024x346.png&#34; alt=&#34;springboot and oauth2 in action 1024x346&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. OAuth2 Flow with Spring Boot in Action&lt;/div&gt;</description>
    </item>
    <item>
      <title>Generating JUnit Tests with Java, EvoSuite and Maven</title>
      <link>https://www.hascode.com/generating-junit-tests-with-java-evosuite-and-maven/</link>
      <pubDate>Sun, 28 Feb 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/generating-junit-tests-with-java-evosuite-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Generating test suites for existing code allows us to verify the behaviour of an application before we’re making changes to its code base or for regression testing.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to derive test suites from an existing Java application using EvoSuite and the EvoSuite Maven plug-in.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;EvoSuite offers some nice features like running in a sandbox to avoid dangerous operations, virtual file-system and network and optimizing of different coverage criteria.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mocking HTTP Interaction with Java, JUnit and MockServer</title>
      <link>https://www.hascode.com/mocking-http-interaction-with-java-junit-and-mockserver/</link>
      <pubDate>Tue, 05 Jan 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/mocking-http-interaction-with-java-junit-and-mockserver/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When writing tests for our software components sometimes we need to mock external services based on the HTTP protocol, might it be a RESTful web-service, an XML-RPC call or a simple GET request to some web-server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to create a mock HTTP server for testing and how to bootstrap and bind it to the life-cycle of a classical build-management tool like Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Reactive Programming: Handling Service Timeouts and Retries with Retry4j</title>
      <link>https://www.hascode.com/reactive-programming-handling-service-timeouts-and-retries-with-retry4j/</link>
      <pubDate>Wed, 02 Dec 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/reactive-programming-handling-service-timeouts-and-retries-with-retry4j/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Reactive Manifesto specifies responsive, resilient, elastic and message-driven as attributes for a reactive application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When implementing specific mechanisms to achieve this requirements, we often need to deal with timeout and retry-operations in our application and depending on our setup and environment, different tools and libraries exist to help us here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to handle exceptions and operation retries on service boundaries with a lesser know, slim library named Retry4j.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Unix-like data pipelines with Java 8 Streams and UStream</title>
      <link>https://www.hascode.com/unix-like-data-pipelines-with-java-8-streams-and-ustream/</link>
      <pubDate>Sun, 08 Nov 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/unix-like-data-pipelines-with-java-8-streams-and-ustream/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We all love the simplicity when chaining commands and pipes in an Unix derivative environment.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;UStream takes this approach and extends Java 8′s stream API to mimic some of the well known commands and apply them on streams.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, I’d like to share some slim examples for using UStream.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;ustream-java8-tutorial.png&#34; alt=&#34;ustream java8 tutorial&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Data pipelines with UStream&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We simply need to add one dependency to our &lt;em&gt;pom.xml&lt;/em&gt; (using Maven): &lt;em&gt;io.github.benas:ustream:0.2&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating REST Clients for JAX-RS based Webservices with Netflix Feign</title>
      <link>https://www.hascode.com/creating-rest-clients-for-jax-rs-based-webservices-with-netflix-feign/</link>
      <pubDate>Thu, 22 Oct 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-rest-clients-for-jax-rs-based-webservices-with-netflix-feign/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For us developers there plenty of libraries exist helping us in deriving and generating clients for existing RESTful web-services and I have already covered some of the in this blog (e.g. the JAX-RS Client API). Nevertheless, I’d like to share my experience with another interesting lightweight library here: Netflix Feign.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Feign offers a nice fluent-builder API, a rich integration for  common libraries and APIs like JAX-RS, Jackson, GSON, SAX, JAX-B, OkHttp, Ribbon, Hystrix, SLF4J and more and last bot not least, it is setup easy and the service contracts are specified using interfaces and annotations.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Deferred Objects and Promises with Java 8 and JDeferred</title>
      <link>https://www.hascode.com/using-deferred-objects-and-promises-with-java-8-and-jdeferred/</link>
      <pubDate>Sun, 27 Sep 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-deferred-objects-and-promises-with-java-8-and-jdeferred/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Promises may help us when dealing with asynchronous code and we need to merge, pipe or track the progress and the results of single parts of computation in our applications.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate a small library, JDeferred that helps us for this specific use case.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;jdeferred-example-running-in-eclipse-ide-1024x754.png&#34; alt=&#34;jdeferred example running in eclipse ide 1024x754&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. JDeferred examples running in Eclipse IDE.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven here, we simply need to add one dependency for &lt;em&gt;jdeferred-core&lt;/em&gt; to our &lt;em&gt;pom.xml&lt;/em&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Testing Asynchronous Applications with Java and Awaitility</title>
      <link>https://www.hascode.com/testing-asynchronous-applications-with-java-and-awaitility/</link>
      <pubDate>Sun, 23 Aug 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/testing-asynchronous-applications-with-java-and-awaitility/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Writing tests for asynchronous applications has never been much fun as we’re always struggling with the problem how to determine state changes, handle process terminations, dealing with timeouts or failures and stuff like this.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Awaitility eases this process for us offering a nice DSL, rich support for languages like Scala or Groovy and an easy-to-use syntax that’s even more fun when using it with Java 8′s lambda expressions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short introduction I’d like to demonstrate writing some tests different scenarios.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Creating secure Password Hashes in Java with Heimdall</title>
      <link>https://www.hascode.com/snippet-creating-secure-password-hashes-in-java-with-heimdall/</link>
      <pubDate>Sun, 12 Jul 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-creating-secure-password-hashes-in-java-with-heimdall/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;These days where a cheap GPU for about 100 € is capable to create 3 billion of MD5 Hashes per second, we need not only need to use salts the right way but we also need to choose a strong, non-reversible and slow hashing schemes when storing passwords in our application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Heimdall is a library that implements a secure and upgradable password hashing mechanism and uses at the time of writing this article PBKDF2 SHA-1 HMAC with 20000 iterations and a 192 bit (24 byte) salt per default.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Integrating Swagger into a Spring Boot RESTful Webservice with Springfox</title>
      <link>https://www.hascode.com/integrating-swagger-into-a-spring-boot-restful-webservice-with-springfox/</link>
      <pubDate>Wed, 01 Jul 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/integrating-swagger-into-a-spring-boot-restful-webservice-with-springfox/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Spring Boot allows us to create RESTful web-services with ease, Swagger specifies a format to describe the capabilities and operations of these services and with Swagger UI it is possible to explore our REST API with a nice graphical user interface in our browser.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Springfox is a project that aims at creating automated JSON API documentation for API’s built with Spring and is used in the following tutorial to integrate Swagger into a sample application.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Documenting RESTful Webservices in Swagger, AsciiDoc and Plain Text with Maven and the JAX-RS Analyzer</title>
      <link>https://www.hascode.com/documenting-restful-webservices-in-swagger-asciidoc-and-plain-text-with-maven-and-the-jax-rs-analyzer/</link>
      <pubDate>Tue, 16 Jun 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/documenting-restful-webservices-in-swagger-asciidoc-and-plain-text-with-maven-and-the-jax-rs-analyzer/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A variety of different tools exists to help us analyze RESTful web-services and create documentations for their APIs in different formats.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to document an existing JAX-RS web-service in multiple formats like Swagger, AsciiDoc or Plain Text using Maven, the JAX-RS Analyzer and the JAX-RS Analyzer Maven Plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The JAX-RS Analyzer gathers its information not only by reflection like most other tools but also by bytecode analysis and therefore does not require us to add special annotations for documentation to our code.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mutation Testing with Pitest and Maven</title>
      <link>https://www.hascode.com/mutation-testing-with-pitest-and-maven/</link>
      <pubDate>Sun, 10 May 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/mutation-testing-with-pitest-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Mutation testing makes an interesting addition to the classical test coverage metrics.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;They seed mutations (errors) into the code, run the project’s tests afterwards and if the tests fail, the mutation is killed – otherwise it lived and we have a possible indication of an issue with our tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial. I’d like to demonstrate how to setup mutation tests with the PIT/Pitest library and Maven and generate reports.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Immutables 2.0 for sexy Immutable Object Creation and more</title>
      <link>https://www.hascode.com/immutables-2.0-for-sexy-immutable-object-creation-and-more/</link>
      <pubDate>Sun, 26 Apr 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/immutables-2.0-for-sexy-immutable-object-creation-and-more/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using immutable objects in Java (and other programming languages as well) is a good thing because immutable objects may be shared safely, are thread-safe and reduce the risk of side effects in your applications.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Nowadays multiple frameworks exist to reduce the need of writing boilerplate code here but there is one special framework whose features I’d like to demonstrate in the following short tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It hooks into your application using annotation processing and generates type-safe builders, toString, hashCode, equals methods for you, supports lazy attributes, singleton instances, serialization into data-formats like JSON and a lot of other features,too.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating In-Memory File Systems with Google’s Jimfs</title>
      <link>https://www.hascode.com/creating-in-memory-file-systems-with-googles-jimfs/</link>
      <pubDate>Wed, 18 Mar 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-in-memory-file-systems-with-googles-jimfs/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes when writing an application we might consider using an in-memory file system to speed up data access or to create some kind of cache.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are different libraries to help us here but one looks especially promising for me because it supports almost every functionality of the Java NIO File APIs added in Java 7 – from creating, reading, deleting files and directory to handling symbolic and hard links or watching directory changes with a WatchService.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Generating Java Source Files with JavaPoet</title>
      <link>https://www.hascode.com/generating-java-source-files-with-javapoet/</link>
      <pubDate>Sat, 28 Feb 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/generating-java-source-files-with-javapoet/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For the most of us developers, generating Java source files is an occasionally happening task and we’re dealing with it e.g. when writing annotation processors, writing tools or interacting with meta-data files.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JavaPoet is a nice library to simplify such tasks, offering an intuitive fluent-builder API to generate source files in no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to share a few examples by writing code generators with the help of this library.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>A short Overview of Neo4j Indexing Strategies</title>
      <link>https://www.hascode.com/a-short-overview-of-neo4j-indexing-strategies/</link>
      <pubDate>Sun, 25 Jan 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/a-short-overview-of-neo4j-indexing-strategies/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When it comes to indexing in a Neo4j graph database, different options exist for a developer to create and maintain the index.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’d like to demonstrate different possibilities for index management.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;domain-model.png&#34; alt=&#34;domain model&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Simple Domain Model&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Only one dependency is needed to run the following examples and start an embedded neo4j server – I’m using Gradle here to manage my dependencies but Maven, Ivy, SBT should work without a problem, too.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Performance Testing a Multiuser Web Application with JMeter and Maven</title>
      <link>https://www.hascode.com/performance-testing-a-multiuser-web-application-with-jmeter-and-maven/</link>
      <pubDate>Sun, 18 Jan 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/performance-testing-a-multiuser-web-application-with-jmeter-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When there is the need to create load tests or performance tests for an application, Apache JMeter is a handy tool and set up with ease.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to configure JMeter to log into a Java EE web application with multiple users specified in a CSV file, how to generate some basic reports and how to integrate JMeter into a mavenized build using the JMeter Maven Plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Marrying Java EE and BDD with Cucumber, Arquillian and Cukespace</title>
      <link>https://www.hascode.com/marrying-java-ee-and-bdd-with-cucumber-arquillian-and-cukespace/</link>
      <pubDate>Wed, 07 Jan 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/marrying-java-ee-and-bdd-with-cucumber-arquillian-and-cukespace/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written about the basics of using Cucumber in a Java project in my last blog article, I now would like to demonstrate how to use a similar setup in a Java EE web project with Arquillian and the Cukespace library.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to write a full Java EE web application and add BDD-style tests to the project so that we’re able to test our business layer on the one hand and the user interface on the other hand using Arquillian Drone and Selenium.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>BDD Testing with Cucumber, Java and JUnit</title>
      <link>https://www.hascode.com/bdd-testing-with-cucumber-java-and-junit/</link>
      <pubDate>Sun, 28 Dec 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/bdd-testing-with-cucumber-java-and-junit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Whether behaviour-driven-development, specification by example or acceptance test driven development is the goal, the Cucumber framework eases our life when we need to  establish a link between the non-technical, textual description for a new feature and the tests that prove that the application fulfils these requirements.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to add Cucumber to a Java project and how to write feature descriptions and test-cases for each step of these descriptions.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE: Setting up and Testing Form-Based JDBC Authentication with Arquillian and Maven</title>
      <link>https://www.hascode.com/java-ee-setting-up-and-testing-form-based-jdbc-authentication-with-arquillian-and-maven/</link>
      <pubDate>Sun, 21 Dec 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/java-ee-setting-up-and-testing-form-based-jdbc-authentication-with-arquillian-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Especially when it comes to testing, setting up a decent environment for a secured Java EE web application isn’t always an easy thing to do.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to create a secured web application using form-based authentication and a JDBC realm to fetch users and roles and how to run the application in an embedded container for testing and development.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Additionally I’d like to show how to write and run integration tests to verify the security setup using a setup of Maven, Embedded GlassFish, Arquillian, jUnit and rest-assured.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating different Websocket Chat Clients in Java</title>
      <link>https://www.hascode.com/creating-different-websocket-chat-clients-in-java/</link>
      <pubDate>Sun, 09 Nov 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-different-websocket-chat-clients-in-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written two articles about different websocket based chat server implementations in Java, I was recently asked how an implementation of the client side would look like in Java.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I added this article to demonstrate how to create a websocket chat client applications within a few steps with the Java API for Websocket.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to write a text-based chat client for the console first and afterwards we’re going to program a chat client with a graphical user interface, implemented in JavaFX.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a XMPP Chat Bot with Apache Camel</title>
      <link>https://www.hascode.com/creating-a-xmpp-chat-bot-with-apache-camel/</link>
      <pubDate>Sun, 12 Oct 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-xmpp-chat-bot-with-apache-camel/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Camel not only is one of my favourite frameworks ever but it also allows the humble developer to create a full blown chat bot within a few lines of code and using the Camel XMPP component.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to create a simple chat bot and since Atlassian’s HipChat basic plan is now free for unlimited users, we’re using HipChat as our play- and testing ground for the bot.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Modifying Excel Files, Adding Formulas with Apache POI</title>
      <link>https://www.hascode.com/snippet-modifying-excel-files-adding-formulas-with-apache-poi/</link>
      <pubDate>Mon, 29 Sep 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-modifying-excel-files-adding-formulas-with-apache-poi/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently I needed to modify some excel files and to add some aggregated formula fields to a sheet and the following snippet did the work for me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;generated-excel-file-1024x416.png&#34; alt=&#34;generated excel file 1024x416&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Modified Excel File with Formulas&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just two dependencies needed  here: One for Apache POI and one for the Office Open XML Documents API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;org.apache.poi&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;poi&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;3.10.1&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;
&amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;org.apache.poi&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;poi-ooxml&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;3.10.1&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_sample_excel_file&#34;&gt;Sample Excel File&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Our sample excel file is quite empty just some empty customer information and a chart that is bound to the data grid.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JAX-RS Server API Snippets</title>
      <link>https://www.hascode.com/jax-rs-server-api-snippets/</link>
      <pubDate>Sun, 28 Sep 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/jax-rs-server-api-snippets/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Because a lot of my current projects are using JAX-RS in different versions I’d like to write down and share some frequently used snippets for implementing RESTful web-services with the JAX-RS specification here.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_using_regex_in_path_expressions&#34;&gt;Using RegEx in Path Expressions&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes we need to extract multiple parameters from a path expression e.g. in the following example where year, month and day are fragments if the path.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;@GET
@Path(&amp;#34;/orders/{year:\\d{4}}-{month:\\d{2}}-{day:\\d{2}}&amp;#34;)
@Produces(MediaType.TEXT_PLAIN)
public Response getOrders(@PathParam(&amp;#34;year&amp;#34;) final int year, @PathParam(&amp;#34;month&amp;#34;) final int month, @PathParam(&amp;#34;day&amp;#34;) final int day) {
	return Response.ok(&amp;#34;Year: &amp;#34; + year + &amp;#34;, month: &amp;#34; + month + &amp;#34;, day: &amp;#34; + day).build();
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE 7 JMX Reports with Yammer Metrics</title>
      <link>https://www.hascode.com/java-ee-7-jmx-reports-with-yammer-metrics/</link>
      <pubDate>Tue, 26 Aug 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-7-jmx-reports-with-yammer-metrics/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are several ways to aggregate and report application performance indicators in a Java application. One common way here is to use Java Management Extensions (JMX) and MBeans.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Yammer Metrics Library eases this task for us and simplifies the aggregation of different reports.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to set up a full Java EE 7 web application by the help of Maven archetypes and we’re running the application on WildFly application server that is downloaded and configured completely by the WildFly Maven Plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE 7 Database Migrations with Liquibase and WildFly</title>
      <link>https://www.hascode.com/java-ee-7-database-migrations-with-liquibase-and-wildfly/</link>
      <pubDate>Thu, 31 Jul 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-7-database-migrations-with-liquibase-and-wildfly/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written about other database migration frameworks before but in this article I’d like to cover the Liquibase framework in combination with WildFly as Java EE 7 compatible application server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to write a full Java EE 7 book store application with a few steps and with Liquibase on board to create the database structure and insert example data into the database.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Thanks to the WildFly Maven Plug-in we even do not need to download and configure the application server but let Maven and the plug-in do the work for us.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>XMLBeam: Snippets and Examples</title>
      <link>https://www.hascode.com/xmlbeam-snippets-and-examples/</link>
      <pubDate>Tue, 22 Jul 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/xmlbeam-snippets-and-examples/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;XMLBeam is an interesting library using an approach of projecting parts of an XML DOM tree into Java using some simple interfaces, annotations and XPath expressions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following article, I’d like to share three experiments of mine with this library for reading, writing XML and parsing a live RSS feed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;div class=&#34;title&#34;&gt;RSS Feed Projection Interface&lt;/div&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;rss-projection-interface.png&#34; alt=&#34;rss projection interface&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven, we need to add only one dependency to our &lt;em&gt;pom.xml&lt;/em&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Lucene by Example: Specifying Analyzers on a per-field-basis and writing a custom Analyzer/Tokenizer</title>
      <link>https://www.hascode.com/lucene-by-example-specifying-analyzers-on-a-per-field-basis-and-writing-a-custom-analyzer/tokenizer/</link>
      <pubDate>Sun, 06 Jul 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/lucene-by-example-specifying-analyzers-on-a-per-field-basis-and-writing-a-custom-analyzer/tokenizer/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Lucene is my favourite search engine library and the more often I use it in my projects the more features or functionality I find that were unknown to me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Two of those features I’d like to share in the following tutorial is one the one hand the possibility to specify different analyzers on a per-field basis and on the other hand the API to create a simple character based tokenizer and analyzer within a few steps.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using jOOQ and Build Helper Plugin to Generate Database Metamodels with Maven</title>
      <link>https://www.hascode.com/using-jooq-and-build-helper-plugin-to-generate-database-metamodels-with-maven/</link>
      <pubDate>Tue, 10 Jun 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-jooq-and-build-helper-plugin-to-generate-database-metamodels-with-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When you need to derive meta-models from existing databases and want to create type-safe queries with an elegant, fluent-API, jOOQ definitely is a tool to consider here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to integrate the jOOQ meta-model generator into a Maven build using the jOOQ Maven Plug-in, the Build Helper Maven Plug-in and Maven profiles to finally create a running application to query an existing RDBMS using such a generated meta-model.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE: Logging User Interaction the Aspect-Oriented Way using Interceptors</title>
      <link>https://www.hascode.com/java-ee-logging-user-interaction-the-aspect-oriented-way-using-interceptors/</link>
      <pubDate>Mon, 26 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-logging-user-interaction-the-aspect-oriented-way-using-interceptors/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using dependency injection and aspect-oriented mechanisms like interceptors allow us to separate cross-cutting-concerns in our Java enterprise application, to control global aspects of our application and to avoid boilerplate code.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial we’re going to create an aspect-oriented logger to protocol the initiating user, class and method called and the parameters passed to the method and finally we’re adding this interceptor to a sample RESTful web-service by adding a simple annotation.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Java Config-Builder to assemble your Application Configuration</title>
      <link>https://www.hascode.com/using-java-config-builder-to-assemble-your-application-configuration/</link>
      <pubDate>Tue, 20 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-java-config-builder-to-assemble-your-application-configuration/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There’s a variety of configuration frameworks to use in our Java applications. Java Config Builder is one of them and it offers some nice features that I would like to demonstrate in the following short examples as are:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Loading values from different sources like property-files, environment variables, command-line-arguments or system properties, specifying default values, mapping arbitrary types or collections, merging configurations and using the Java Bean Validation standard aka JSR-303.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Allocating available random Ports in a Maven Build</title>
      <link>https://www.hascode.com/allocating-available-random-ports-in-a-maven-build/</link>
      <pubDate>Wed, 07 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/allocating-available-random-ports-in-a-maven-build/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently in a project I encountered the following problem: The development team used Git with a branch-per-feature-like workflow and the integration server, Bamboo in this case, was configured not only to run the integration-tests for the master-branch but also for every change in a feature branch.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As the team developed a Java EE web application ports like 8080 occasionally were already bound and builds failed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I knew a plug-in for Jenkins CI I to search for available ports and assign them to a build variable but I wanted to control such information directly within the Maven build life-cycle so I searched and finally found Sonatype’s Port Allocator Plug-in for Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Persistence API: Controlling the Second-Level-Cache</title>
      <link>https://www.hascode.com/java-persistence-api-controlling-the-second-level-cache/</link>
      <pubDate>Mon, 21 Apr 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-persistence-api-controlling-the-second-level-cache/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the Java Persistence API and a decent persistence provider allows us to configure and fine-tune when and how the second level cache is used in our application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples, we’re going to demonstrate those features written as JUnit test cases and running on a H2 in-memory database.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;persistence-configuration.png&#34; alt=&#34;persistence configuration&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Persistence Unit Configuration&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First of all we need some basic setup to run the following examples .. we need to select a JPA persistence provider and database, create a persistence-unit configuration and an environment to run tests on an in-memory database.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Apache Avro with Java and Maven</title>
      <link>https://www.hascode.com/using-apache-avro-with-java-and-maven/</link>
      <pubDate>Sat, 08 Mar 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-apache-avro-with-java-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Avro is a serialization framework similar to Google’s Protocol Buffers or Apache Thrift and offering features like rich data structures, a compact binary format, simple integration with dynamic languages and more.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short five minute tutorial, we’re going to specify a schema to serialize books in a JSON format, we’re using the Avro Maven plugin to generate the stub classes and finally we’re serializing the data into a single file.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating elegant, typesafe Queries for JPA, mongoDB Morphia and Lucene using Querydsl</title>
      <link>https://www.hascode.com/creating-elegant-typesafe-queries-for-jpa-mongodb-morphia-and-lucene-using-querydsl/</link>
      <pubDate>Thu, 13 Feb 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-elegant-typesafe-queries-for-jpa-mongodb-morphia-and-lucene-using-querydsl/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Querydsl is a framework that allows us to create elegant, type-safe queries for a variety of different data-sources like Java Persistence API (JPA) entities, Java Data Objects (JDO), mongoDB with Morphia, SQL, Hibernate Search up to Lucene.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re implementing example queries for different environments – Java Persistence API compared with a JPQL and a criteria API query, mongoDB with Morphia and last but not least for Lucene.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating Grammar Parsers in Java and Scala with Parboiled</title>
      <link>https://www.hascode.com/creating-grammar-parsers-in-java-and-scala-with-parboiled/</link>
      <pubDate>Sun, 26 Jan 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-grammar-parsers-in-java-and-scala-with-parboiled/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Parboiled is a modern. lightweight and easy to use library to parse expression grammars in Java or Scala and in my humble opinion it is perfect for use cases where you need something between regular expressions and a complex parser generator like ANTLR.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to create a simple grammar to specify a task list and write an implementation of a parser also as unit tests for each grammar rule in Java.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JAX-RS 2.0 REST Client Features by Example</title>
      <link>https://www.hascode.com/jax-rs-2.0-rest-client-features-by-example/</link>
      <pubDate>Mon, 30 Dec 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/jax-rs-2.0-rest-client-features-by-example/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JAX-RS 2.0 aka JSR 339 not also specifies the API to build up a RESTful webservice but also enhances the client side API to ease up the process of writing a client for a REST service.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re building up a client for a ready-to-play REST service and explore the different new options e.g. how to handle requests in a synchronous or asynchronous way, how to add callback handlers for a request, how to specify invocation targets to build up requests for a later execution or how to filter the client-server communication using client request filters and client response filters.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a Websocket Chat Application with Vert.x and Java</title>
      <link>https://www.hascode.com/creating-a-websocket-chat-application-with-vert.x-and-java/</link>
      <pubDate>Wed, 13 Nov 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-websocket-chat-application-with-vert.x-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Vert.x is a modern, lightweight framework to build high performance applications running on the Java Virtual Machine. The framework is polyglot so that you’re able to write your application in Java, Groovy, Ruby, Python or even JavaScript.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition it offers a nice component system, an actor-like concurrency model a distributed event bus and an elegant API to create scalable applications in no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to build a websocket chat by creating a HTTP server and the websocket server using Vert.x, Java and Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Writing Java Integration Tests for MongoDB</title>
      <link>https://www.hascode.com/writing-java-integration-tests-for-mongodb/</link>
      <pubDate>Wed, 16 Oct 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/writing-java-integration-tests-for-mongodb/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;MongoDB is matured, document-oriented, cross-platform NoSQL database system with drivers available for a bunch of different programming languages.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’m going to write some integration tests for MongoDB using the MongoDB Java driver and the Flapdoodle library to create an embedded MongoDB instance for testing.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to write tests for a simple persist-and-query scenarion and for a map-reduce function and in addition I’m going to show how to bind the start and stop of a MongoDB instance to a Maven goal using the embedmongo-maven-plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Playing with Java 8 Lambda Expressions</title>
      <link>https://www.hascode.com/playing-with-java-8-lambda-expressions/</link>
      <pubDate>Sun, 22 Sep 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/playing-with-java-8-lambda-expressions/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Many articles have been written about JSR 335 aka &lt;em&gt;Lambda Expressions for the Java&lt;sup&gt;TM&lt;/sup&gt; Programming Language&lt;/em&gt; but I like to try new things out for myself and that’s why I’d like to share my snippets here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;netbeans-java8-976x1024.png&#34; alt=&#34;netbeans java8 976x1024&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Lambda Hacking using the NetBeans Developer Version&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup_jdk_and_ide&#34;&gt;Setup JDK and IDE&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It takes just some short steps to setup your environment …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://jdk8.java.net/lambda/&#34;&gt;Download&lt;/a&gt; and install the Java 8 JDK with lambda support&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://bits.netbeans.org/download/trunk/nightly/latest/&#34;&gt;Download&lt;/a&gt; and install the NetBeans IDE Development version&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure NetBeans to use the Java 8 JDK (&amp;gt; Manage Platforms…)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Business Process Modeling with Activiti and BPMN 2.0</title>
      <link>https://www.hascode.com/business-process-modeling-with-activiti-and-bpmn-2.0/</link>
      <pubDate>Sun, 15 Sep 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/business-process-modeling-with-activiti-and-bpmn-2.0/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having tried a bunch of workflow engines and business processing management platforms I now have given the Activiti framework a try.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I immediately liked the good test support using annotations and jUnit test rules, a straight API and the good Eclipse IDE integration as well as I liked the Activiti Explorer and the Activiti REST Application and the feeling to achieve quick results with less effort when using this framework.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Filtering Source Files using the Templating Maven Plugin</title>
      <link>https://www.hascode.com/filtering-source-files-using-the-templating-maven-plugin/</link>
      <pubDate>Tue, 03 Sep 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/filtering-source-files-using-the-templating-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Templating Maven Plugin looks useful if one needs to copy and to filter source files in a project e.g. to add property values from the build environment to a class.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For a short demonstration I’ve added the following short snippet.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Only one dependency needed .. simply add the following snippet to your &lt;em&gt;pom.xml&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;build&amp;gt;
  &amp;lt;plugins&amp;gt;
    &amp;lt;plugin&amp;gt;
      &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;templating-maven-plugin&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;1.0-alpha-3&amp;lt;/version&amp;gt;
      &amp;lt;executions&amp;gt;
        &amp;lt;execution&amp;gt;
          &amp;lt;id&amp;gt;filter-src&amp;lt;/id&amp;gt;
          &amp;lt;goals&amp;gt;
            &amp;lt;goal&amp;gt;filter-sources&amp;lt;/goal&amp;gt;
          &amp;lt;/goals&amp;gt;
        &amp;lt;/execution&amp;gt;
      &amp;lt;/executions&amp;gt;
    &amp;lt;/plugin&amp;gt;
  &amp;lt;/plugins&amp;gt;
&amp;lt;/build&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a Chat Application using Java EE 7, Websockets and GlassFish 4</title>
      <link>https://www.hascode.com/creating-a-chat-application-using-java-ee-7-websockets-and-glassfish-4/</link>
      <pubDate>Tue, 13 Aug 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-chat-application-using-java-ee-7-websockets-and-glassfish-4/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Java EE 7 is out now and so I was curious to play around with the new specifications and APIs from in this technology stack.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I didn’t hesitate to add yet another websocket-chat tutorial to the existing ones on the internet in favour of gathering some experience with this technology and a possible integration using a GlassFish 4 server, the new Java API for JSON Processing for data serialization combined with custom websocket encoders/decoders and finally adding some Bootstrap and jQuery on the client side.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Embedding Jetty or Tomcat in your Java Application</title>
      <link>https://www.hascode.com/embedding-jetty-or-tomcat-in-your-java-application/</link>
      <pubDate>Tue, 09 Jul 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/embedding-jetty-or-tomcat-in-your-java-application/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently I needed to control an embedded web container from a Java application and I wanted to see how this could be achieved using an embedded instance of either Tomcat or Jetty here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I would like to show how to embed both servers in an application in no time using Gradle or Maven as build tool.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We just need to add the web container libraries to our project here .. I’ve added the build config for Gradle and Maven here…&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Handling Feature Flags in a Java EE Application using Togglz</title>
      <link>https://www.hascode.com/handling-feature-flags-in-a-java-ee-application-using-togglz/</link>
      <pubDate>Wed, 26 Jun 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/handling-feature-flags-in-a-java-ee-application-using-togglz/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Feature flags are a common technique, often combined with continuous deployment and delivery and they allow us to rollback a specific feature, to create A/B tests or to rollout a specific feature for a specific test group, a specific amount of users or dedicated systems.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’d like you to demonstrate how easy it is to implement feature flags with the Togglz framework with a few steps in a Java EE environment.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating and Packaging a Game in Java FX 2.2</title>
      <link>https://www.hascode.com/creating-and-packaging-a-game-in-java-fx-2.2/</link>
      <pubDate>Sun, 23 Jun 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-and-packaging-a-game-in-java-fx-2.2/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It’s been a long way for Java FX from the days of the F3 project the current release 2.2. Today there are many options how to create a Java FX application .. you may be using Java, Scala, Groovy or Visage, you may create your application in a programmatic way using the comfortable integrated builders or you may create your views using XML layouts and easy data-bindings with a few annotations.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Arquillian Transaction Extension: Transaction Rollback for your Java EE Integration Tests</title>
      <link>https://www.hascode.com/arquillian-transaction-extension-transaction-rollback-for-your-java-ee-integration-tests/</link>
      <pubDate>Sun, 16 Jun 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/arquillian-transaction-extension-transaction-rollback-for-your-java-ee-integration-tests/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I really love Arquillian to run integration tests for my Java EE applications – especially when running on different containers – and I also love the Arquillian tool stack from Arquillian Drone to the Arquillian Persistence Extensions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today I’d like to share a short snippet how to achieve transaction rollbacks when testing an EJB in combination with Arquillian and the Arquillian Transaction Extension…&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_arquillian_basics&#34;&gt;Arquillian Basics&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you’ve never heard of the Arquillian framework before, please feel free to have a look at the &lt;a href=&#34;http://arquillian.org/&#34;&gt;Arquillian documentation&lt;/a&gt; or an article of mine: &lt;a href=&#34;../arquillian-tutorial-writing-java-ee-6-integration-tests-and-more/&#34;&gt;Arquillian Tutorial: Writing Java EE 6 Integration Tests and more..&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Continuous Deployment using GlassFish, Jenkins, Maven and Git</title>
      <link>https://www.hascode.com/continuous-deployment-using-glassfish-jenkins-maven-and-git/</link>
      <pubDate>Wed, 29 May 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/continuous-deployment-using-glassfish-jenkins-maven-and-git/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently I needed a quick solution to deploy a Java EE 6 web application on a GlassFish instance automatically and subsequent to a successful build of the project on the integration server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It took only a few steps using Jenkins, Maven and the Cargo plugin and I’d like to share this quick solution with you here.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We need the following software installed and configured:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://git-scm.com/&#34;&gt;Git&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://jenkins-ci.org/&#34;&gt;Jenkins&lt;/a&gt; / &lt;a href=&#34;http://hudson-ci.org/&#34;&gt;Hudson&lt;/a&gt; + Git Plugin installed&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven 3&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://glassfish.java.net/&#34;&gt;GlassFish 3.1&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://jdk7.java.net/&#34;&gt;JDK 7&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating Rich Clients with Apache Pivot</title>
      <link>https://www.hascode.com/creating-rich-clients-with-apache-pivot/</link>
      <pubDate>Sun, 19 May 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-rich-clients-with-apache-pivot/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Pivot is a modern framework to create rich clients as desktop applications or to run in a web browser.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It offers nice GUI elements, supports XML/WTKX templates, data bindings, JVM scripting languages and much more.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’m going to create a desktop application to open a file browser, select a file and output the selected file’s name, first using a programmatic approach to create the user interface, and afterwards using XML/WTKX templates.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Easy Database Migrations using Flyway, Java EE 6 and GlassFish</title>
      <link>https://www.hascode.com/easy-database-migrations-using-flyway-java-ee-6-and-glassfish/</link>
      <pubDate>Sun, 28 Apr 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/easy-database-migrations-using-flyway-java-ee-6-and-glassfish/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Database migrations often are a necessity in the application development and maintenance life-cycle.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Whenever we need to apply changes to the database structure, insert new data fragments and in doing so want to be sure that this all happens with some control and versioning.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following tutorial shows how implement this for a simple Java EE 6 web application to be run on a GlassFish application server in a few quick steps using the Flyway framework, an eager initialized Singleton EJB and some Maven wiring.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating slim Database Projections using JPA2 Constructor Expressions</title>
      <link>https://www.hascode.com/creating-slim-database-projections-using-jpa2-constructor-expressions/</link>
      <pubDate>Sun, 14 Apr 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-slim-database-projections-using-jpa2-constructor-expressions/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;One common question that you may encounter one day when using object-relational-mapping in your application is how to slim down data that you’re retrieving from the persistence layer down to a specific subset for your use-case in an efficient manner and without using complex additional mapping frameworks. In some situations you might declare lazy loaded fields but another approach that I’d like to share with you here are JPA2 constructor expressions.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a Blueprint or Content-Creator Plugin for Confluence</title>
      <link>https://www.hascode.com/creating-a-blueprint-or-content-creator-plugin-for-confluence/</link>
      <pubDate>Sun, 17 Mar 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-blueprint-or-content-creator-plugin-for-confluence/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Blueprint is a new API in Confluence 5 that allows developers to create new content elements and to hook into the Confluence “create” dialogue – not to be confused with OSGi blueprints, the CSS blueprint framework or Tinkerpop Blueprints here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Content may be added using simple XHTML templates, dynamic templates enriched with data from context providers or even customized JavaScript dialogues.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Another feature is, that pages of a specific blueprint type may be aggregated in a collector view that displays all pages created with the specific blueprint&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Micro Benchmarking your Tests using JUnit and JUnitBenchmarks</title>
      <link>https://www.hascode.com/micro-benchmarking-your-tests-using-junit-and-junitbenchmarks/</link>
      <pubDate>Sun, 10 Mar 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/micro-benchmarking-your-tests-using-junit-and-junitbenchmarks/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I recently stumbled upon a nice framework that allows to convert simple JUnit tests into micro benchmarks named JUnitBenchmarks.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It allows to set basic benchmark options and and to generate charts by adding some simple annotations and a test rule to your tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;One might argue if it is wise to mix the aspects, testing and benchmarking and I’d agree for sure – nevertheless I think this framework can be handy sometimes so let’s create some benchmarks using JUnit and JUnitBenchmarks..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Adding multiple EntityListeners to an Entity in JPA 2</title>
      <link>https://www.hascode.com/adding-multiple-entitylisteners-to-an-entity-in-jpa-2/</link>
      <pubDate>Mon, 25 Feb 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/adding-multiple-entitylisteners-to-an-entity-in-jpa-2/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The ability to attach lifecycle events to an entity using simple annotations sometimes is a neat feature in the Java Persistence API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short snippets demonstrate how to bind and trigger the different available lifecycle events using an embedded derby database and a bunch of annotations.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I’m using Hibernate as persistence manager here and Derby as an easy to setup database. In the last step we’ll be writing a test that’s why we’ve added JUnit and Hamcrest.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Apache Camel with Scala and the Camel Scala DSL</title>
      <link>https://www.hascode.com/using-apache-camel-with-scala-and-the-camel-scala-dsl/</link>
      <pubDate>Wed, 13 Feb 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-apache-camel-with-scala-and-the-camel-scala-dsl/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Whenever I encounter a situation where I have to mix a blend of different services and endpoints and apply one or more of the traditional enterprise integration patterns then Apache Camel often is my weapon of choice.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I simply love how easy it is to set up some datasources, add some routing magic, data transformers, load balancers, content enrichers and enjoy the result.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Another thing that I’m beginning to love is Scala and so this is the perfect time to write an article about using Scala and Apache Camel together.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using the Android Daydream API</title>
      <link>https://www.hascode.com/using-the-android-daydream-api/</link>
      <pubDate>Tue, 22 Jan 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-the-android-daydream-api/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Daydream is the new interactive screensaver mode that was added in the Android 4.2 / Jelly Beans release. Such “dreams” may be activated when the device is in idle mode or inserted into a dock.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to create a simple daydream that starts a simple animation and in addition we’ll be adding a configuration screen to alter the behaviour of this daydream.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_create_a_new_android_application&#34;&gt;Create a new Android Application&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First of all we need a new android project. I am using Eclipse and the ADT plugin here but any other solution like using a specific Maven archetype and the Jayway Maven plugin or using SBT should work, too.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: XML-Pull-Parser with XPP3</title>
      <link>https://www.hascode.com/snippet-xml-pull-parser-with-xpp3/</link>
      <pubDate>Fri, 28 Dec 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/snippet-xml-pull-parser-with-xpp3/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When there is XML to be parsed sometimes we’re chosing a DOM parser, sometimes a SAX parser and sometimes we’re using an XML pull parser, especially on Android.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short snippet shows how to use the xpp3 xml pull parse to fetch some information in xml format from a public issue tracker and to extract issue details.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_adding_dependencies&#34;&gt;Adding Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just one dependency needed here: &lt;em&gt;xpp3&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_sbt&#34;&gt;SBT&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Simply use the following &lt;em&gt;build.sbt&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Running categorized Tests using JUnit, Maven and Annotated-Test Suites</title>
      <link>https://www.hascode.com/running-categorized-tests-using-junit-maven-and-annotated-test-suites/</link>
      <pubDate>Thu, 06 Dec 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/running-categorized-tests-using-junit-maven-and-annotated-test-suites/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes we need to classify the tests in a project and a possible solution to achieve this goal is to assign different categories to the tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often we’re doing this to separate the execution of fast-running and long-running tests or to run a specific set of tests that is only applicable in special situations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;To run a specific set of categorized tests there are different options and in the following tutorial we’ll be covering two of them: by configuring the Maven Surefire Plug-in or by using a JUnit Test Suite and the JUnit annotations.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Content Detection, Metadata and Content Extraction with Apache Tika</title>
      <link>https://www.hascode.com/content-detection-metadata-and-content-extraction-with-apache-tika/</link>
      <pubDate>Sun, 02 Dec 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/content-detection-metadata-and-content-extraction-with-apache-tika/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Encountering the situation that you want to extract meta-data or content from a file – might it be an office document, a spreadsheet or even a mp3 or an image – or you’d like to detect the content type for a given file then Apache Tika might be a helpful tool for you.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Tika supports a variety of document formats and has a nice, extendable parser and detection API with a lot of built-in parsers available.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>New features in JUnit 4.11</title>
      <link>https://www.hascode.com/new-features-in-junit-4.11/</link>
      <pubDate>Sun, 18 Nov 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/new-features-in-junit-4.11/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JUnit is one of the most popular testing frameworks out there. Version 4.11 has just been released and offers some nice improvements that you shouldn’t miss.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In older versions of JUnit there were two dependencies .. &lt;em&gt;junit:junit&lt;/em&gt; contained an old version of hamcrest and could cause some nasty trouble .. &lt;em&gt;junit:junit-dep&lt;/em&gt; just referenced hamcrest the maven way.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now with version 4.11 there is just &lt;em&gt;junit:junit&lt;/em&gt; with clean references to hamcrest and &lt;em&gt;junit:junit-dep&lt;/em&gt; is relocated to &lt;em&gt;junit:junit&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating an offline Rich-Client-Application using HTML, CSS and Java with SWT</title>
      <link>https://www.hascode.com/creating-an-offline-rich-client-application-using-html-css-and-java-with-swt/</link>
      <pubDate>Mon, 12 Nov 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-an-offline-rich-client-application-using-html-css-and-java-with-swt/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are a lot of frameworks out there to create offline applications and rich clients in Java.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;One exotic alternative is to use the HTML, CSS and Javascript for this purpose and render the application in a Java frame using SWT and SWT’s browser component.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_new_project&#34;&gt;Creating a new Project&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re using maven here for our project but you shouldn’t have a problem to use SBT, Gradle or Ivy instead…&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_adding_maven_dependencies&#34;&gt;Adding Maven Dependencies&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We need two things .. first comes a repository for the swt dependencies …&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Make your Tests more readable with custom Hamcrest Matchers</title>
      <link>https://www.hascode.com/make-your-tests-more-readable-with-custom-hamcrest-matchers/</link>
      <pubDate>Sun, 28 Oct 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/make-your-tests-more-readable-with-custom-hamcrest-matchers/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Everyday we’re writing tests for our software and sometimes we’re in a situation where we’re testing a specific type or object very often.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Luckily Hamcrest allows us to create custom matchers by subclassing from a given variety of available matchers.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_adding_junit_and_hamcrest&#34;&gt;Adding jUnit and Hamcrest&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First add the dependencies for &lt;em&gt;JUniti&lt;/em&gt; and &lt;em&gt;Hamcrest&lt;/em&gt; to your project’s &lt;em&gt;pom.xml&lt;/em&gt; or alternative build system.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;4.10&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;org.hamcrest&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;hamcrest-all&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;1.3&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>HTML5 Server Send Events using Node.js or Jetty</title>
      <link>https://www.hascode.com/html5-server-send-events-using-node.js-or-jetty/</link>
      <pubDate>Sun, 21 Oct 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/html5-server-send-events-using-node.js-or-jetty/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The HTML5 working draft describes different techniques to push information from a server to the client and the one described in this tutorial are Server-Send Events (SSE).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Server-Send-Events eliminates the need to poll a server periodically for information using AJAX and is really easy to implement because of the simple specification and the fact that nearly all modern browsers already implement this specification.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_client_side&#34;&gt;The Client Side&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Registering for Server Send Events (SSE) is quite easy .. simply create a new &lt;em&gt;EventSource&lt;/em&gt; object that is bound to the URL where the events are propagated.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Lucene Snippets: Index Stats</title>
      <link>https://www.hascode.com/lucene-snippets-index-stats/</link>
      <pubDate>Sat, 08 Sep 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/lucene-snippets-index-stats/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In Lucene 4.x there is an API to fetch index statistics for specific document’s fields.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following examples shows how to create an index with some random documents and fetch some statistics for a field afterwards ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_lucene_dependencies&#34;&gt;Lucene Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just one dependency needed here .. &lt;em&gt;lucene-core&lt;/em&gt;. I’ve added the declarations needed for Maven and SBT here .. if you’re using Gradle or Buildr you should’t have a problem to create your build file either..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Lucene Snippets: Faceting Search</title>
      <link>https://www.hascode.com/lucene-snippets-faceting-search/</link>
      <pubDate>Tue, 28 Aug 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/lucene-snippets-faceting-search/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The latest snippet from my Lucene examples demonstrates how to achieve a facet search using the Lucene 4.0 API and how easy it is to define multiple category paths to aggregate search results for different possible facets.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following example we’re indexing some books as a classical example and create multiple category paths for author, publication date and category afterwards ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_lucene_dependencies&#34;&gt;Lucene Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We simply need two dependencies here .. &lt;em&gt;lucene-core&lt;/em&gt; of course and in addition the &lt;em&gt;lucene-facet&lt;/em&gt; library .. I’ve added the declarations needed for Maven and SBT here .. if you’re using Gradle or Buildr you should’t have a problem to transfer the information needed ;)&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a Windows Executable from a Jar using Maven</title>
      <link>https://www.hascode.com/creating-a-windows-executable-from-a-jar-using-maven/</link>
      <pubDate>Tue, 07 Aug 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-windows-executable-from-a-jar-using-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often in the life of a developer there is the need to create a windows executable for a Java application that is build and packaged in a Jar file.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short example shows how to create an executable Jar first and a windows executable containing vendor information, a nice icon and other stuff afterwards by using a combination of the Maven Shade Plugin and the launch4j Plugin for Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Integration Testing IMAP, SMTP and POP3 with GreenMail</title>
      <link>https://www.hascode.com/integration-testing-imap-smtp-and-pop3-with-greenmail/</link>
      <pubDate>Mon, 30 Jul 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/integration-testing-imap-smtp-and-pop3-with-greenmail/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written some e-mail handling, sending or receiving library you’d like to run some integration tests against a real mail server?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Then GreenMail might help you out here .. the framework is not quite new on the market but it is really easy to setup IMAP,SMTP or POP3 services with it and it comes with some helpful libraries making your life a bit easier here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I’ve come to the idea to share some examples for setting up different server instances, creating user accounts and – at last – fetching and validating e-mails…&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Aspects of Functional Programming in Java</title>
      <link>https://www.hascode.com/aspects-of-functional-programming-in-java/</link>
      <pubDate>Mon, 16 Jul 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/aspects-of-functional-programming-in-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Functional programming is a trending topic these days and a lot of Java programmers are hot for the features that modern functional programming languages might offer.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Waiting for Java 8 and native closure support is a nice thing but for now we’re going to take a look at several Java frameworks that are trying to implement typical structures from those functional languages where possible using the capabilities of the Java language to emulate elements like higher-order-functions, closures, options and others …&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Task Scheduling in Java EE 6 on GlassFish using the Timer Service</title>
      <link>https://www.hascode.com/task-scheduling-in-java-ee-6-on-glassfish-using-the-timer-service/</link>
      <pubDate>Fri, 22 Jun 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/task-scheduling-in-java-ee-6-on-glassfish-using-the-timer-service/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Creating cronjobs or scheduled service executions is made really easy in Java EE 6. Scheduled tasks may be created in a programmatic style or simply by adding some annotations to an EJB.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re creating some simple scheduled tasks and let them run on an embedded GlassFish instance using the Maven Embedded GlassFish plugin..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_java_ee_6_maven_project_from_archetype&#34;&gt;Java EE 6 Maven Project from Archetype&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First of all we’re creating a new maven-ized project using one of the appropriate jee6 Maven archetypes&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating updatable Java Applications using Getdown and the Getdown Maven Plugin</title>
      <link>https://www.hascode.com/creating-updatable-java-applications-using-getdown-and-the-getdown-maven-plugin/</link>
      <pubDate>Sun, 27 May 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-updatable-java-applications-using-getdown-and-the-getdown-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Many programmers have suffered when trying to setup an environment to handle updates for their application without much effort. Some tried Java Web Start for this purpose and many encountered difficulties with this approach.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now there is getdown that aims to replace Java Web Start by offering a simple architecture to handle updates that is fast, realiable and the only thing you need is a normal http server. Though getdown lets us handle our updates really easy it is possible to make this process even easier with the getdown maven plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Arquillian Tutorial: Writing Java EE 6 Integration Tests and more</title>
      <link>https://www.hascode.com/arquillian-tutorial-writing-java-ee-6-integration-tests-and-more/</link>
      <pubDate>Thu, 26 Apr 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/arquillian-tutorial-writing-java-ee-6-integration-tests-and-more/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now that the long awaited stable version of the Arquillian framework is released I wanted to demonstrate some interesting features of this framework that really eases writing and running of integration tests for Java EE 6 applications in many different ways.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we are going to create some real-world examples using Enterprise JavaBeans, Contexts and Dependency Injection, the Java Persistence API and we’re finally running Drone/Selenium tests against a JEE Web Application that is using Java Server Faces.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Wiring made easy using OSGi Blueprint and Apache Karaf</title>
      <link>https://www.hascode.com/wiring-made-easy-using-osgi-blueprint-and-apache-karaf/</link>
      <pubDate>Mon, 16 Apr 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/wiring-made-easy-using-osgi-blueprint-and-apache-karaf/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The OSGi Blueprint Container specification allows us to use dependency injection in our OSGi environment, declarative import and export of OSGi services, registering lifecycle listeners and wiring dependencies into our services with a few lines of XML code.&lt;br/&gt;
In the following tutorial we’re first building an OSGi bundle classical style and afterwards take a trip into the advantages of the Blueprint specification.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Our OSGi container of choice here will be Apache Karaf a lightweight container with a lot of nice features and – of course – blueprint enabled…&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Hibernate Search Faceting: Discrete and Range Faceting by Example</title>
      <link>https://www.hascode.com/hibernate-search-faceting-discrete-and-range-faceting-by-example/</link>
      <pubDate>Mon, 26 Mar 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/hibernate-search-faceting-discrete-and-range-faceting-by-example/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In today’s tutorial we’re exploring the world of faceted searches like the one we’re used to see when we’re searching for an item on Amazon.com or other websites. We’re using Hibernate Search here that offers an API to perform discrete as well as range faceted searches on our persisted data.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_dependencies_needed&#34;&gt;Maven Dependencies Needed&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For simplicity’s sake am I going to use an HSQL database for persistence, in addition the dependencies for &lt;em&gt;hibernate-entitymanager&lt;/em&gt; and &lt;em&gt;hibernate-search&lt;/em&gt; (of course) should be added to your &lt;em&gt;pom.xml&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Mixing Scala, Java in a Maven Project</title>
      <link>https://www.hascode.com/snippet-mixing-scala-java-in-a-maven-project/</link>
      <pubDate>Fri, 23 Mar 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/snippet-mixing-scala-java-in-a-maven-project/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having just returned from the Atlassian Camp 2012 I just toyed around with Java and Scala and wanted to share the following snippet that demonstrates how to mix code from both languages in a Maven project using the maven-scala-plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setting_up_the_maven_project&#34;&gt;Setting up the Maven Project&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First create a new Maven project in your IDE or by running &lt;em&gt;mvn archetype:generate.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the next step, add the dependency for &lt;em&gt;scala-library&lt;/em&gt; and the scala maven repositories to your &lt;em&gt;pom.xml&lt;/em&gt; and hook the &lt;em&gt;maven-scala-plugin&lt;/em&gt; to Maven’s lifecycle. My &lt;em&gt;pom.xml&lt;/em&gt; finally looks like this one:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using the Android Fragment API in a Tablet App</title>
      <link>https://www.hascode.com/using-the-android-fragment-api-in-a-tablet-app/</link>
      <pubDate>Sun, 18 Mar 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-the-android-fragment-api-in-a-tablet-app/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Since I got a new tablet running Android 4.0 aka ice cream sandwich I wanted to play around a bit with the fragments API and creating an application for a tablet.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to build an application that renders several articles from a popular tech blog (just kidding) in a web view.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_what_to_build&#34;&gt;What to build&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to build an application that is able to display web links in the left section of the screen and when clicked, displaying the corresponding website content in the right section of the application screen.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JPA Persistence and Lucene Indexing combined in Hibernate Search</title>
      <link>https://www.hascode.com/jpa-persistence-and-lucene-indexing-combined-in-hibernate-search/</link>
      <pubDate>Sun, 05 Feb 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/jpa-persistence-and-lucene-indexing-combined-in-hibernate-search/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often we’re writing an application that has to handle entities that – on the one side need to be persisted in a relational database using standards like the Java Persistence API (JPA) and using frameworks like Hibernate ORM or EclipseLink.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;On the other side those entities and their fields are often stored in a highspeed indexer like Lucene. From this situation arises a bunch of common problems .. to synchronize both data sources, to handle special data mapped in an entity like an office document and so on..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Neo4j Graph Database Tutorial: How to build a Route Planner and other Examples</title>
      <link>https://www.hascode.com/neo4j-graph-database-tutorial-how-to-build-a-route-planner-and-other-examples/</link>
      <pubDate>Fri, 20 Jan 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/neo4j-graph-database-tutorial-how-to-build-a-route-planner-and-other-examples/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often in the life of developer’s life there is a scenario where using a relational database tends to get complicated or sometimes even slow – especially when there are fragments with multiple relationships or multiple connections present. This often leads to complex database queries or desperate software engineers trying to handle those problems with their ORM framework.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A possible solution might be to switch from a relational database to a graph database – and – neo4j is our tool of choice here. In the following tutorial we’re going to implement several examples to demonstrate the strengths of a graph database .. from a route planner to a social graph.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Create Mobile Websites using Java Server Faces and PrimeFaces Mobile</title>
      <link>https://www.hascode.com/create-mobile-websites-using-java-server-faces-and-primefaces-mobile/</link>
      <pubDate>Sun, 08 Jan 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/create-mobile-websites-using-java-server-faces-and-primefaces-mobile/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The more smartphones and tablets are sold the bigger the need for a mobile version of a modern website. PrimeFaces Mobile helps us developers here and allows us to quickly create mobile websites that display well on an iPhone, Android, Palm, Blackberry, Windows Mobile and others.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to create a web application that is using Java Server Faces 2.1, PrimeFaces 3.1 and PrimeFaces Mobile 1.0 and runs on a simple web container like Tomcat or Jetty.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Writing Styles and Themes on Android</title>
      <link>https://www.hascode.com/writing-styles-and-themes-on-android/</link>
      <pubDate>Sat, 03 Dec 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/writing-styles-and-themes-on-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using reusable styles and themes to modify an Android application’s look is really easy and helps to not violate thy DRY (don’t repeat yourself) principle by typing styles in every single UI element again and again.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to write and apply some simple styles and a finally theme to a simple Android application.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following environment is needed to follow this tutorial …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://developer.android.com/sdk/installing.html&#34;&gt;Android SDK&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://developer.android.com/sdk/installing.html#AddingComponents&#34;&gt;An AVM with at least Android 2.2 / API Version 8&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I recommend using &lt;a href=&#34;http://eclipse.org/&#34;&gt;Eclipse&lt;/a&gt; with the &lt;a href=&#34;http://developer.android.com/sdk/eclipse-adt.html&#34;&gt;ADT Plugin&lt;/a&gt; installed&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Managing Background Tasks on Android using the Alarm Manager</title>
      <link>https://www.hascode.com/managing-background-tasks-on-android-using-the-alarm-manager/</link>
      <pubDate>Sun, 27 Nov 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/managing-background-tasks-on-android-using-the-alarm-manager/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In today’s tutorial we’re going to take a look on how to handle periodically scheduled tasks on our Android device by using BroadcastReceivers, Services and the AlarmManager.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following environment is needed to follow this tutorial …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://developer.android.com/sdk/installing.html&#34;&gt;Android SDK&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://developer.android.com/sdk/installing.html#AddingComponents&#34;&gt;An AVM with at least Android 2.2 / API Version 8&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I recommend using &lt;a href=&#34;http://eclipse.org/&#34;&gt;Eclipse&lt;/a&gt; with the &lt;a href=&#34;http://developer.android.com/sdk/eclipse-adt.html&#34;&gt;ADT Plugin&lt;/a&gt; installed&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_concept&#34;&gt;The Concept&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to create a first broadcast receiver that gets initiated at boot time. This component then should make use of Android’s AlarmManager API and schedule a cyclic task using an explicit intent.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Finding Memory Leaks using Eclipse and the MemoryAnalyzer Plugin</title>
      <link>https://www.hascode.com/finding-memory-leaks-using-eclipse-and-the-memoryanalyzer-plugin/</link>
      <pubDate>Wed, 02 Nov 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/finding-memory-leaks-using-eclipse-and-the-memoryanalyzer-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The MemoryAnalyzer Plugin for Eclipse allows us to quickly analyze heap dumps from a virtual machine and search for memory leaks. In the following tutorial we’re going to create and run a small application that is going to cause an OutOfMemoryException during its runtime.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition, we’re forcing the virtual machine to save a heap dump and finally analyzing this data using Eclipse and the MemoryAnalyzer plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr1&#34;&gt;Eclipse Indigo&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Testing RESTful Web Services made easy using the REST-assured Framework</title>
      <link>https://www.hascode.com/testing-restful-web-services-made-easy-using-the-rest-assured-framework/</link>
      <pubDate>Sun, 23 Oct 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/testing-restful-web-services-made-easy-using-the-rest-assured-framework/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;rest-service-testing-logo1.png&#34; alt=&#34;REST-assured Integration Test Tutorial Logo&#34; width=&#34;413&#34; height=&#34;265&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. REST-assured Integration Test Tutorial Logo&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are many frameworks out there to facilitate testing RESTful
webservices but there is one framework I’d like to acquaint you with is my
favourite framework named REST-assured.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;REST-assured offers a bunch of nice features like a DSL-like syntax,
XPath-Validation, Specification Reuse, easy file uploads and those
features we’re going to explore in the following article.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With a few lines of code and Jersey I have written a RESTful web service
that allows us to explore the features of the REST-assured framework and
to run tests against this service.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Maven Tomcat Plugin: Adding Authentication to an Embedded Tomcat</title>
      <link>https://www.hascode.com/maven-tomcat-plugin-adding-authentication-to-an-embedded-tomcat/</link>
      <pubDate>Wed, 12 Oct 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/maven-tomcat-plugin-adding-authentication-to-an-embedded-tomcat/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Tomcat Maven Plugin not only allows us to deploy our mavenized application to an existing Tomcat server but also to run our web application with an embedded instance from our project’s directory. Recently I needed to add basic authentication to such an instance and wanted to share the steps necessary here&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We just need Maven and a JDK …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit &amp;gt;= 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven 3&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup&#34;&gt;Project Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;I am using the &lt;em&gt;webapp&lt;/em&gt; archetype here&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We’re adding the following configuration for the Tomcat plugin to your &lt;em&gt;pom.xml&lt;/em&gt; – my final descriptor is this one&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;</description>
    </item>
    <item>
      <title>Android Widget Tutorial: Creating a screen-lock Widget in a few steps</title>
      <link>https://www.hascode.com/android-widget-tutorial-creating-a-screen-lock-widget-in-a-few-steps/</link>
      <pubDate>Thu, 06 Oct 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/android-widget-tutorial-creating-a-screen-lock-widget-in-a-few-steps/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In today’s Android tutorial we’re going to take a look at Android’s Widget API and how to make a widget interact with a service using intents.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;widget-tutorial-logo2.png&#34; alt=&#34;widget tutorial logo2&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. hasCode Android Widget Tutorial Logo&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to create a fully functional application that allows us to enable or disable our smartphone’s screen lock settings using a widget that can be placed on our home screen.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Finally, I am going to show how to use a smartphone to test and debug our application and connect it to the IDE.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE 6 Development using the Maven Embedded GlassFish Plugin</title>
      <link>https://www.hascode.com/java-ee-6-development-using-the-maven-embedded-glassfish-plugin/</link>
      <pubDate>Tue, 20 Sep 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-6-development-using-the-maven-embedded-glassfish-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at the Maven Embedded GlassFish Plugin and how it allows us quick creation of GlassFish server instances in no time and Java EE 6 application deployment.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. GlassFish + Maven&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With a few lines of configuration in your Maven’s pom.xml we’ve got a running GlassFish instance and are able to redeploy our application fast by pressing enter in our console.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to build a Java EE 6 Web Application with a stateless session bean and a web servlet and finally deploy – and redeploy the application using the Maven GlassFish Plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>REST-assured vs Jersey-Test-Framework: Testing your RESTful Web-Services</title>
      <link>https://www.hascode.com/rest-assured-vs-jersey-test-framework-testing-your-restful-web-services/</link>
      <pubDate>Mon, 05 Sep 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/rest-assured-vs-jersey-test-framework-testing-your-restful-web-services/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at two specific frameworks that enables you to efficiently test your REST-ful services: On the one side there is the framework &lt;strong&gt;REST-assured&lt;/strong&gt; that offers a nice DSL-like syntax to create well readable tests – on the other side there is the &lt;strong&gt;Jersey-Test-Framework&lt;/strong&gt; that offers a nice execution environment and is built upon the JAX-RS reference implementation, Jersey.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;rest-service-testing-logo.png&#34; alt=&#34;rest service testing logo&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to create a simple REST service first and then implement integration tests for this service using both frameworks.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Screenscraping made easy using jsoup and Maven</title>
      <link>https://www.hascode.com/screenscraping-made-easy-using-jsoup-and-maven/</link>
      <pubDate>Tue, 30 Aug 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/screenscraping-made-easy-using-jsoup-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;logo2.png&#34; alt=&#34;logo2&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes in a developer’s life there is no clean API available to gather information from a web application .. no SOAP, no XML-RPC and no REST .. just a website hiding the information we’re looking for somewhere in its DOM hierarchy – so the only solution is screenscraping.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Screenscraping always leaves me with a bad feeling – but luckily there is a tool that makes this job at least a bit easier for a developer .. jsoup to the rescue!&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Contract-First Web-Services using JAX-WS, JAX-B, Maven and Eclipse</title>
      <link>https://www.hascode.com/contract-first-web-services-using-jax-ws-jax-b-maven-and-eclipse/</link>
      <pubDate>Tue, 23 Aug 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/contract-first-web-services-using-jax-ws-jax-b-maven-and-eclipse/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the contract-first approach to define a web service offers some advantages in contrast to the code-first approach.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to take a look at some details of this approach and we’re going to implement a real SOAP service using JAX-WS, Maven and the Eclipse IDE.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Finally we’re going to run our service implementation on an embedded Jetty instance and we’re going to take a look at soapUI and how to test our service using this neat tool.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating Portlets using Java Server Faces 2 and Liferay</title>
      <link>https://www.hascode.com/creating-portlets-using-java-server-faces-2-and-liferay/</link>
      <pubDate>Tue, 19 Jul 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-portlets-using-java-server-faces-2-and-liferay/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Portlets are a common technology to create plug&amp;amp;play components for modern web applications and are specified by the Java Community Process in several specification requests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;portlet-logo.png&#34; alt=&#34;portlet logo&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to learn how to create custom portlets and how to deploy and embed them in Liferay, the popular open-source enterprise portal.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition we’re taking a look at inter-portlet-communication and how to create portlets using annotations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Finally we’re building a portlet-state-aware Java-Server-Faces portlet using the jsf-portlet-bridge mechanism.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Integrating Groovy in your Maven builds using GMaven</title>
      <link>https://www.hascode.com/integrating-groovy-in-your-maven-builds-using-gmaven/</link>
      <pubDate>Tue, 12 Jul 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/integrating-groovy-in-your-maven-builds-using-gmaven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;image left&#34;&gt;&lt;img src=&#34;gmaven.png&#34; alt=&#34;gmaven&#34;/&gt;&lt;/span&gt; Often ant tasks are used in Maven builds but wouldn’t it be more attractive to integrate the Groovy language into our build process?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;GMaven is the answers to this problem and brings together Maven and Groovy. It allows us to execute Groovy scripts inline from our Maven configuration, from a local script or even from a remote location. In the following short examples I am going to show how to configure Maven to execute Groovy scripts from different locations.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Confluence User Profile Mobile vCard Plugin released</title>
      <link>https://www.hascode.com/confluence-user-profile-mobile-vcard-plugin-released/</link>
      <pubDate>Sat, 18 Jun 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/confluence-user-profile-mobile-vcard-plugin-released/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;image left&#34;&gt;&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;&lt;/span&gt; I’ve released a new plugin for the popular Confluence Wiki that extends the user profile with new tab that displays the user’s vcard as a QR code.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This allows an easy import of address data from Confluence to your smartphone.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_features&#34;&gt;Features&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Display of a Confluence user’s contact data as a QR code in a separate tab in the user profile&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;More to be implemented ..&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_installation&#34;&gt;Installation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Just download the plugin from &lt;a href=&#34;https://plugins.atlassian.com/plugin/details/341175&#34;&gt;Atlassian’s Plugin Exchange&lt;/a&gt; and install it using the Universal Plugin Manager in your Confluence’s administration area&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;That’s all .. nothing to configure here ..&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a LDAP server for your development environment in 5 minutes</title>
      <link>https://www.hascode.com/creating-a-ldap-server-for-your-development-environment-in-5-minutes/</link>
      <pubDate>Mon, 13 Jun 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-ldap-server-for-your-development-environment-in-5-minutes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I am currently working on a plugin that needs to receive some information from an LDAP/Active Directory using JNDI. That’s why I needed to set up a directory server in a short time and I didn’t want to waste much effort for here.
Luckily for me the Apache Directory Studio saved my day and allowed me to set up everything I needed in a few minutes.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;ldap-tutorial-teaser.png&#34; alt=&#34;ldap tutorial teaser&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Short and sweet: In this tutorial I’m going to show you how to configure everything you need in your Eclipse IDE and finally how to query the created LDAP server with a tiny java client using JNDI.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Message Driven Beans in Java EE 6</title>
      <link>https://www.hascode.com/message-driven-beans-in-java-ee-6/</link>
      <pubDate>Sun, 05 Jun 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/message-driven-beans-in-java-ee-6/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Message Driven Beans are no new concept due to the fact that they exist since EJB 2.0 but in Java EE 6 and the EJB 3.0 specification it is even more fun to use them.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;mdb-tagcloud.png&#34; alt=&#34;mdb tagcloud&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we’re going to take a look at the specification and create an example application that transfers some objects via the Java Message Service to a Message-Driven Bean deployed on a GlassFish application server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Oh JBehave, Baby! Behaviour Driven Development using JBehave</title>
      <link>https://www.hascode.com/oh-jbehave-baby-behaviour-driven-development-using-jbehave/</link>
      <pubDate>Tue, 31 May 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/oh-jbehave-baby-behaviour-driven-development-using-jbehave/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Behaviour Driven Development is the keyword when we’re talking about test scenarios written in an ubiquitous language, strong interaction with stakeholders, product owners or testers and well described, common understandable test scenarios.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The popular JBehave framework is our tool of choice here and allows us to decouple our test stories from the test classes, offers an integration for web tests using Selenium and finally there’s a helpful Maven plugin for JBehave, too.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Confluence Social Comments Plugin</title>
      <link>https://www.hascode.com/confluence-social-comments-plugin/</link>
      <pubDate>Mon, 30 May 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/confluence-social-comments-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have created a new, free plugin for Confluence, the popular enterprise wiki.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The plugin allows you to notify users of ongoing discussions in comments on a confluence page by posting a specific token including the user’s name like this: “@username:”&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_features&#34;&gt;Features&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Configurable notification settings in the administration area&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Several placeholders to be used in the e-mail template for the notifications&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User filtering to avoid sending duplicate e-mails&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For more detailed information take a look at the Maven generated &lt;a href=&#34;http://app.hascode.com/social-comments-plugin&#34;&gt;project website&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>SCJP/OCPJP Exam Preparation: Pitfalls to avoid</title>
      <link>https://www.hascode.com/scjp/ocpjp-exam-preparation-pitfalls-to-avoid/</link>
      <pubDate>Mon, 25 Apr 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/scjp/ocpjp-exam-preparation-pitfalls-to-avoid/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Last year I passed the exam for the “Oracle Certified Professional Java Programmer”successfully and wanted to share my exam preparation notes about common problems and pitfalls to be aware of.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I have added some code and examples for my top 25 challenges below.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;ocpjp1.png&#34; alt=&#34;image&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. ocpjp&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_exam_preparation&#34;&gt;Exam Preparation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I won’t cover how to prepare yourself for the exam, how the exam is structured or what is the best way to process the exam’s questions – these questions are very well covered by the SCJP study guide, JavaRanch.com or other resources of choice – I have listed a few at the and of this article in the resources section.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mocking, Stubbing and Test Spying using the Mockito Framework and PowerMock</title>
      <link>https://www.hascode.com/mocking-stubbing-and-test-spying-using-the-mockito-framework-and-powermock/</link>
      <pubDate>Sun, 27 Mar 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/mocking-stubbing-and-test-spying-using-the-mockito-framework-and-powermock/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;mockito-tutorial.png&#34; alt=&#34;mockito tutorial&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at the Mockito framework that not only does sound like my favourite summer cocktail but also offers nice testing, mocking/stubbing, test-spying features and mock injections.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;After that we’re going to take a look on how to mock static or final classes by extending Mockito’s capabilities with PowerMock.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We don’t need much for the following samples .. Java of course, Maven dependency management and that’s all ..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a sample Java EE 6 Blog Application with JPA, EJB, CDI, JSF and Primefaces on GlassFish</title>
      <link>https://www.hascode.com/creating-a-sample-java-ee-6-blog-application-with-jpa-ejb-cdi-jsf-and-primefaces-on-glassfish/</link>
      <pubDate>Tue, 08 Feb 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-sample-java-ee-6-blog-application-with-jpa-ejb-cdi-jsf-and-primefaces-on-glassfish/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Java EE 6 is out and it indeed offers an interesting stack of technologies. So in today’s tutorial we are going to build a small sample web application that builds on this stack using Enterprise JavaBeans, Java Persistence API, Bean Validation, CDI and finally Java Server Faces and PrimeFaces.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The application we’re going to develop is a simple blog app that allows us to create new articles, list them and – finally delete them. We’re also covering some additional topics like JSF navigation, i18n, Ajax-enabled components and the deployment on the GlassFish application server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Enterprise Java Bean EJB 3.1 Testing using Maven and embedded Glassfish</title>
      <link>https://www.hascode.com/enterprise-java-bean-ejb-3.1-testing-using-maven-and-embedded-glassfish/</link>
      <pubDate>Sat, 01 Jan 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/enterprise-java-bean-ejb-3.1-testing-using-maven-and-embedded-glassfish/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Are you playing around with the shiny new 3.1 EJB API?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven for your Java projects?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Need an easy way to write and execute tests for your EJBs that depends on an Java Application Server?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;No problem using Maven Archetypes, the Maven EJB Plugin and the GlassFish embedded Application Container..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;EJB_3.1_Embedded_Application_Server_Components.png&#34; alt=&#34;EJB 3.1 Embedded Application Server Components&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For the following tutorial we’re going to need an installation of &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven&lt;/a&gt; and of course – the &lt;a href=&#34;http://www.oracle.com/technetwork/java/index.html&#34;&gt;Java Development Kit&lt;/a&gt;!&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Bean Validation with JSR-303 and Hibernate Validator</title>
      <link>https://www.hascode.com/bean-validation-with-jsr-303-and-hibernate-validator/</link>
      <pubDate>Tue, 14 Dec 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/bean-validation-with-jsr-303-and-hibernate-validator/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You want to add some validation logic to your Java beans? You want to achieve this with some shiny extendable annotations? Then give the Java Bean Validation standard aka &lt;a href=&#34;http://jcp.org/en/jsr/summary?id=303&#34;&gt;JSR-303&lt;/a&gt; a try..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to use the reference implementation for bean validation, &lt;a href=&#34;http://www.hibernate.org/subprojects/validator.html&#34;&gt;Hibernate Validator&lt;/a&gt; in this tutorial but there are also links to other alternatives like &lt;a href=&#34;http://oval.sourceforge.net/&#34;&gt;Oval&lt;/a&gt; or &lt;a href=&#34;http://incubator.apache.org/bval/cwiki/index.html&#34;&gt;Apache Bean Validation&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So let’s begin and validate some stuff ..&lt;br/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;JDK &amp;gt;=6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven &amp;gt;=2&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An IDE or text editor of choice&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a REST Client Step-by-Step using JAX-RS, JAX-B and Jersey</title>
      <link>https://www.hascode.com/creating-a-rest-client-step-by-step-using-jax-rs-jax-b-and-jersey/</link>
      <pubDate>Thu, 25 Nov 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-rest-client-step-by-step-using-jax-rs-jax-b-and-jersey/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often in a developer’s life there is a REST service to deal with and nowadays one wants a fast and clean solution to create a client for such a service.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following tutorial shows a quick approach using JAX-RS with its reference implementation, Jersey in combination with JAX-B for annotation driven marshalling between XML or JSON structures and our Java-Beans.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following stuff is needed to run the following examples and code samples&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using PrimeFaces to pimp up existing Java Server Faces / JSF 2 Applications</title>
      <link>https://www.hascode.com/using-primefaces-to-pimp-up-existing-java-server-faces-/-jsf-2-applications/</link>
      <pubDate>Sun, 14 Nov 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-primefaces-to-pimp-up-existing-java-server-faces-/-jsf-2-applications/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we’re going to modify an existing Java Server Faces / JSF 2 web application by adding rich UI components to the existing layout.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Our tool of choice here is the PrimeFaces framework. It offers a wide range of interesting, customizable and (several) Ajax-enabled components that blend very well with JSF1+2 and also a solid documentation that allows a quick integration into existing projects.&lt;br/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup&#34;&gt;Project setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For this tutorial we’re going to reuse the web application from my JSF2 Tutorial “&lt;a href=&#34;../java-server-facesjsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/&#34;&gt;Java Server Faces/JSF 2 Tutorial – Step 1: Project setup, Maven and the first Facelet&lt;/a&gt;” – the source code is available at &lt;a href=&#34;https://github.com/hascode/hascode-tutorials/src/tip/jsf2-tutorial-part1/&#34;&gt;GitHub.org&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a Confluence SOAP Component in 5 Minutes</title>
      <link>https://www.hascode.com/how-to-create-a-confluence-soap-component-in-5-minutes/</link>
      <pubDate>Sun, 24 Oct 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-confluence-soap-component-in-5-minutes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You’re using the popular Confluence wiki? You’re using its RPC/SOAP API and missing a function you really need? Just extend the  capabilities of the Confluence RPC API by programming a custom web service component – it is really easy and also &lt;a href=&#34;http://confluence.atlassian.com/display/CONFDEV/RPC+Module&#34;&gt;well documented&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we’re going to take a look on how to quickly implement a SOAP service, securing it and putting its methods in a transactional context.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org&#34;&gt;Maven&lt;/a&gt; &amp;gt;=2&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;JDK&lt;/a&gt; &amp;gt;= 5&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.atlassian.com/software/confluence/&#34;&gt;Confluence Wiki&lt;/a&gt; &amp;gt;= 3.0 (for a quick installation guide take a look at &lt;a href=&#34;https://www.hascode.com/2010/03/confluence-developer-instance-quick-setup/&#34;&gt;this article&lt;/a&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.soapui.org/&#34;&gt;SoapUI&lt;/a&gt; for Testing&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Object-relational Mapping using Java Persistence API JPA 2</title>
      <link>https://www.hascode.com/object-relational-mapping-using-java-persistence-api-jpa-2/</link>
      <pubDate>Mon, 11 Oct 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/object-relational-mapping-using-java-persistence-api-jpa-2/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at the world of object-relational Mapping and how it is done using the Java Persistence API by creating some basic examples, mapping some relations and querying objects using JPQL or the Criteria API..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Java 6 JDK&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Maven &amp;gt;= 2&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you’d like to take a look behind the scenes e.g. how entities are mapped in your database you could install a RDBMS of your choice .. or just use Derby/JavaDB that is bundled with the JDK 6&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Playing around with the Android Animation Framework</title>
      <link>https://www.hascode.com/playing-around-with-the-android-animation-framework/</link>
      <pubDate>Mon, 27 Sep 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/playing-around-with-the-android-animation-framework/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Animations add some spice to our Android applications and the offered animation framework makes it easy to create custom animations and tweens.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets dance around and create some animations ;) ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_about&#34;&gt;About&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are two ways to create animations – via XML declaration or in a Java class. We’re going to focus on XML declaration – if you’re interested in java based declaration – take a look at the Android &lt;a href=&#34;http://developer.android.com/reference/android/view/animation/Animation.html&#34;&gt;JavaDocs&lt;/a&gt; and the subclasses of &lt;em&gt;android.view.animation.Animation&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a SOAP Service using JAX-WS Annotations</title>
      <link>https://www.hascode.com/creating-a-soap-service-using-jax-ws-annotations/</link>
      <pubDate>Thu, 23 Sep 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-soap-service-using-jax-ws-annotations/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It is possible to create SOAP webservices with only a few lines of code using the JAX-WS annotations. In a productivity environment you might prefer using &lt;em&gt;contract-first&lt;/em&gt; instead of &lt;em&gt;code-first&lt;/em&gt; to create your webservice but for now we’re going to use the fast method and that means &lt;em&gt;code-first&lt;/em&gt; and annotations olé!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_the_soap_service&#34;&gt;Creating the SOAP Service&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a class &lt;em&gt;SampleService&lt;/em&gt; with two public methods&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Annotate this class with &lt;em&gt;@WebService&lt;/em&gt; (&lt;em&gt;javax.jws.WebService) –&lt;/em&gt; now all public methods of this class are exported for our SOAP service&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To change the name of an exported method, annotate the method with &lt;em&gt;@WebMethod(operationName = “theDesiredName”)&lt;/em&gt; (&lt;em&gt;javax.jws.WebMethod&lt;/em&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Finally the service class could look like this&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.tutorial.soap;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService public class SampleService {
 @WebMethod(operationName = &amp;#34;getInfo&amp;#34;) public String getInformation() {
 return &amp;#34;hasCode.com&amp;#34;;
 }

 public String doubleString(String inString) {
 return inString + inString;
 }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a simple Messaging Application using RabbitMQ 2 and Maven</title>
      <link>https://www.hascode.com/how-to-create-a-simple-messaging-application-using-rabbitmq-2-and-maven/</link>
      <pubDate>Sun, 05 Sep 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-simple-messaging-application-using-rabbitmq-2-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having read an interesting &lt;a href=&#34;http://wiki.secondlife.com/wiki/Message_Queue_Evaluation_Notes#RabbitMQ&#34;&gt;comparison by Lindenlabs&lt;/a&gt; evaluating modern message broker systems like ActiveMQ, ApacheQpid and amongst others – RabbitMQ – I wanted to take a quick look at the last one and built a small application producing and consuming some sample messages.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you need some lecture on getting started with RabbitMQ or the key concepts of messaging I strongly recommend reading this &lt;a href=&#34;http://www.rabbitmq.com/how.html&#34;&gt;list of introductional articles&lt;/a&gt; from the RabbitMQ homepage.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Spring 3, Maven and Annotation Based Configuration</title>
      <link>https://www.hascode.com/spring-3-maven-and-annotation-based-configuration/</link>
      <pubDate>Sun, 22 Aug 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/spring-3-maven-and-annotation-based-configuration/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There is still the urban myth that using Spring IoC container without thousands lines of XML code isn’t possible – so today we’re taking a look at annotation based configuration with Spring 3 and of course we’re using Maven..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup_your_project&#34;&gt;Setup your project&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a simple Maven project using&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:generate // or
mvn archetype:create&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add a lot of dependencies and reference them to the Spring version defined as a property in your &lt;em&gt;pom.xml.&lt;/em&gt; A good reference on Spring 3 and Maven artifacts can be found at &lt;a href=&#34;http://blog.springsource.com/2009/12/02/obtaining-spring-3-artifacts-with-maven/&#34;&gt;Springsource.com&lt;/a&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;properties&amp;gt;
     &amp;lt;org.springframework.version&amp;gt;3.0.0.RELEASE&amp;lt;/org.springframework.version&amp;gt;
 &amp;lt;/properties&amp;gt;
 &amp;lt;dependencies&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-core&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-expression&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;

     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-beans&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-aop&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-context&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-context-support&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.aspectj&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;com.springsource.org.aspectj.runtime&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;1.6.8.RELEASE&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
 &amp;lt;/dependencies&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a simple OSGi Web Application using Maven</title>
      <link>https://www.hascode.com/how-to-create-a-simple-osgi-web-application-using-maven/</link>
      <pubDate>Sun, 25 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-simple-osgi-web-application-using-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we will take a look at the development of a simple OSGi Web Application and what tools can save us some time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Maven Bundle Plugin makes our life much easier here as does the OSGi Bundle Repository that offers some nice bundles – in our case the servlet API and an embedded Jetty web server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets develop some bundles ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You are going to need a &lt;a href=&#34;http://java.sun.com/javase/downloads/index.jsp&#34;&gt;JDK&lt;/a&gt; (&amp;gt;=5), &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven2&lt;/a&gt;, the &lt;a href=&#34;http://felix.apache.org&#34;&gt;Apache Felix OSGi implementation&lt;/a&gt; and and text editor/http://eclipse.org/[IDE] of your choice.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a Template Bundle Plugin in Confluence</title>
      <link>https://www.hascode.com/how-to-create-a-template-bundle-plugin-in-confluence/</link>
      <pubDate>Mon, 12 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-template-bundle-plugin-in-confluence/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Since Confluence 3.2. there is a new plugin module type that allows you to deploy templates in a bundle via the plugin API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition it is possible to assign these templates to specific spaces and preview available templates in the Confluence administration area.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So let’s build some sample templates..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_template_bundle_plugin&#34;&gt;Creating a Template Bundle Plugin&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Creating a template bundle is easy – just create a class implementing &lt;em&gt;TemplatePackage&lt;/em&gt; – there are two methods: one returns a list of bundled &lt;em&gt;PageTemplate&lt;/em&gt; Objects the other the name for the template bundle.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>A look at Google’s Protocol Buffers</title>
      <link>https://www.hascode.com/a-look-at-googles-protocol-buffers/</link>
      <pubDate>Tue, 06 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/a-look-at-googles-protocol-buffers/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Protocol Buffers are a serialization format developed by Google- you might ask if another IDL is really needed here – is Google barking at the wrong tree?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;But protocol buffers offer some advantages over data serialization via XML or JSON – Google says they (compared to XML)..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;are 3 to 10 times smaller&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;are 20 to 100 times faster&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;provide generated data access classes for programmatic use&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;provide backward compatibility&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Server Faces/JSF 2 Tutorial – Step 1: Project setup, Maven and the first Facelet</title>
      <link>https://www.hascode.com/java-server-faces/jsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/</link>
      <pubDate>Sat, 05 Jun 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-server-faces/jsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this short tutorial we are going to build a Java Server Faces Web-Application using JSF2.0, Facelets, Maven and Hibernate as ORM Mapper.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The goals for this first step are: Setting up the project structure using Maven, defining a frame template/decorator and a registration facelet, creating a managed bean and mapping it’s values to the facelet, adding some basic validation, displaying validation errors and finally adding a navigation structure.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In step2 of this tutorial we are going to add persistence using Hibernate, add some security, create a custom UI component and add some AJAX.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Sensor Fun: Location Based Services and GPS for Android</title>
      <link>https://www.hascode.com/sensor-fun-location-based-services-and-gps-for-android/</link>
      <pubDate>Sun, 30 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/sensor-fun-location-based-services-and-gps-for-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Android SDK offers a nice API to receive information about available providers for location based services and get the current location and coordinates.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this short tutorial we’re going to build a small activity that displays a list of available location providers and shows the current position using GPS services.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_example_application&#34;&gt;Example Application&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a new Android Project using ADT and your IDE with a package named &lt;em&gt;com.hascode.android.location_app&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the permissions needed to the &lt;em&gt;AndroidManifest.xml&lt;/em&gt; – it should look like this&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
&amp;lt;manifest xmlns:android=&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;
	package=&amp;#34;com.hascode.android.location_app&amp;#34; android:versionCode=&amp;#34;1&amp;#34;
	android:versionName=&amp;#34;1.0&amp;#34;&amp;gt;
	&amp;lt;application android:icon=&amp;#34;@drawable/icon&amp;#34; android:label=&amp;#34;@string/app_name&amp;#34;&amp;gt;
		&amp;lt;activity android:name=&amp;#34;.LocationActivity&amp;#34; android:label=&amp;#34;@string/app_name&amp;#34;&amp;gt;
			&amp;lt;intent-filter&amp;gt;
				&amp;lt;action android:name=&amp;#34;android.intent.action.MAIN&amp;#34; /&amp;gt;
				&amp;lt;category android:name=&amp;#34;android.intent.category.LAUNCHER&amp;#34; /&amp;gt;
			&amp;lt;/intent-filter&amp;gt;
		&amp;lt;/activity&amp;gt;

	&amp;lt;/application&amp;gt;
	&amp;lt;uses-sdk android:minSdkVersion=&amp;#34;7&amp;#34; /&amp;gt;

	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_COARSE_LOCATION&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_FINE_LOCATION&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_LOCATION_EXTRA_COMMANDS&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_MOCK_LOCATION&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
&amp;lt;/manifest&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Review: SCJP Sun Certified Programmer for Java 6 Study Guide</title>
      <link>https://www.hascode.com/review-scjp-sun-certified-programmer-for-java-6-study-guide/</link>
      <pubDate>Mon, 24 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/review-scjp-sun-certified-programmer-for-java-6-study-guide/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Short Facts:&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;About 850 pages – &lt;a href=&#34;http://en.wikipedia.org/wiki/Sixteen_Tons&#34;&gt;heavy weight&lt;/a&gt; – use it for self defence! ;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Preparation material for the Sun Exam 310-065 (Sun Certified Java Programmer for Java SE 6)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CD-Rom with a nice exam simulator included&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Authors: &lt;a href=&#34;http://en.wikipedia.org/wiki/Kathy_Sierra&#34;&gt;Kathy Sierry&lt;/a&gt; and &lt;a href=&#34;http://www.oreillynet.com/pub/au/1085&#34;&gt;Bert Bates&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ISBN: &lt;a href=&#34;http://www.amazon.com/SCJP-Certified-Programmer-Java-310-065/dp/0071591060/&#34;&gt;978-0071591065&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;My two cents:&lt;/strong&gt;&lt;br/&gt;
My favorite author team strikes back – this time with a book for the certification exam to become  a glorious “http://in.sun.com/training/certification/java/scjp.xml[Sun Certified Java Programmer]” for Java SE 6. I’ve read some other books from both authors before – especially from the “http://headfirstlabs.com/[Head First]” series from O’Reilly as they are “Head First Design Patterns”, “Head First Servlets and JSP” and last and least “Head First EJB”. Perhaps I am going to write a review for one of those, too – who knows..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Extending the Confluence Search Index</title>
      <link>https://www.hascode.com/extending-the-confluence-search-index/</link>
      <pubDate>Sun, 23 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/extending-the-confluence-search-index/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Developing plugins for the Confluence Wiki a developer sometimes needs to save additional metadata to a page object using Bandana or the ContentPropertyManager. Wouldn’t it be nice if this metadata was available in the built-in Lucene index?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That is were the Confluence Extractor Module comes into play..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_overview&#34;&gt;Overview&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;An extractor allows the developer to add new fields to the lucene search index. Creating a new extractor is quite simple – just implement the interface &lt;em&gt;com.atlassian.bonnie.search.Extractor&lt;/em&gt; or &lt;em&gt;bucket.search.lucene.extractor.BaseAttachmentContentExtractor&lt;/em&gt; if you want to build a new file extractor.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a simple Gesture App with Android</title>
      <link>https://www.hascode.com/creating-a-simple-gesture-app-with-android/</link>
      <pubDate>Fri, 14 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-simple-gesture-app-with-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The integration of gestures into your android app adds some nice functionality and is made very easy using Google’s GestureBuilder application and the integrated GestureLibrary and Gesture Overlay API – so let’s build a sample app.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you need some basic information regarding gestures on android first – take a look at &lt;a href=&#34;../android-gestures/&#34;&gt;this article&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_gesture_library&#34;&gt;Creating a gesture library&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First you need to define the gestures that should be captured in the application later. For this reason there’s the &lt;em&gt;GestureBuilder&lt;/em&gt; delivered with the Android SDK. You can find the app in the samples directory of your android sdk – e.g. &lt;em&gt;&amp;lt;installation-directory&amp;gt;/android-sdk-linux_86/platforms/android-2.1/samples/GestureBuilder&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Playing around with QR Codes</title>
      <link>https://www.hascode.com/playing-around-with-qr-codes/</link>
      <pubDate>Tue, 11 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/playing-around-with-qr-codes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes QR codes are a nice way to distribute information like calendar events, contact information, e-mail, geo-locations or internet addresses.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following article we’re going to encode information to QR code images using the ZXing library and afterwards decode information from a given QR code.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Finally we’re taking a look on online QR code generators and how to integrate the ZXing library in a Maven project.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;qr-code-article.png&#34; alt=&#34;qr code article&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_zxing_library&#34;&gt;The ZXing Library&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Download the ZXing Libraries from &lt;a href=&#34;http://code.google.com/p/zxing/downloads/list&#34; class=&#34;bare&#34;&gt;http://code.google.com/p/zxing/downloads/list&lt;/a&gt; – the file name is &lt;em&gt;ZXing-&amp;lt;version&amp;gt;.zip&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Unpack the downloaded archive somewhere&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change to the extracted directory and run &lt;em&gt;ant&lt;/em&gt;. If you don’t have JavaME installed – and you don’t have to for the samples below – run &lt;em&gt;ant buildwithoutj2me&lt;/em&gt; – that will do the job&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Having compiled the libraries you’re now free to include the &lt;em&gt;core.jar&lt;/em&gt; from &lt;em&gt;zxing-&amp;lt;version&amp;gt;/core/&lt;/em&gt; and the &lt;em&gt;javase.jar&lt;/em&gt; from &lt;em&gt;zxing-&amp;lt;version&amp;gt;/javase&lt;/em&gt; as dependency in your project&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippets: Getting License Information from the Confluence API</title>
      <link>https://www.hascode.com/snippets-getting-license-information-from-the-confluence-api/</link>
      <pubDate>Thu, 06 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippets-getting-license-information-from-the-confluence-api/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes one needs to look up license details of a running Confluence system .. perhaps for creating a commercial plugin or to display recommendations dependant from the license used. For this reason there are a few possibilities for receiving some license information from the Confluence API or the velocity context.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;quoteblock&#34;&gt;
&lt;blockquote&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Note: This article is outdated since the Atlassian Marketplace was launched and a shiny new licensing API was added. Until this article is updated I strongly recommend to take a closer look at the detailed information that Atlassian is providing in the &lt;a href=&#34;https://developer.atlassian.com/display/UPM/How+to+Add+Licensing+Support+to+Your+Add-on&#34;&gt;Developer Documentation&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Sensor Fun: Creating a simple audio recorder/player</title>
      <link>https://www.hascode.com/sensor-fun-creating-a-simple-audio-recorder/player/</link>
      <pubDate>Sun, 02 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/sensor-fun-creating-a-simple-audio-recorder/player/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sound recording and playback is really simple using the MediaRecorder and MediaPlayer classes .. see the example below ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_sample_app&#34;&gt;Sample App&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;First some layout .. a button to start/stop recording and a button to play the recorded stuff (&lt;em&gt;main.xml&lt;/em&gt;):&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
&amp;lt;LinearLayout xmlns:android=&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;
    android:orientation=&amp;#34;vertical&amp;#34;
    android:layout_width=&amp;#34;fill_parent&amp;#34;
    android:layout_height=&amp;#34;fill_parent&amp;#34;
    &amp;gt;
&amp;lt;TextView
	android:id=&amp;#34;@+id/output&amp;#34;
    android:layout_width=&amp;#34;fill_parent&amp;#34;
    android:layout_height=&amp;#34;wrap_content&amp;#34;
    android:text=&amp;#34;&amp;#34;
    /&amp;gt;
&amp;lt;Button android:text=&amp;#34;@+string/record&amp;#34; android:id=&amp;#34;@+id/btRecord&amp;#34; android:layout_width=&amp;#34;wrap_content&amp;#34; android:layout_height=&amp;#34;wrap_content&amp;#34;&amp;gt;&amp;lt;/Button&amp;gt;
&amp;lt;Button android:text=&amp;#34;@+string/play&amp;#34; android:id=&amp;#34;@+id/btPlay&amp;#34; android:layout_width=&amp;#34;wrap_content&amp;#34; android:layout_height=&amp;#34;wrap_content&amp;#34;&amp;gt;&amp;lt;/Button&amp;gt;
&amp;lt;/LinearLayout&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Adjusting the externalized strings in the &lt;em&gt;strings.xml&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
&amp;lt;resources&amp;gt;
    &amp;lt;string name=&amp;#34;app_name&amp;#34;&amp;gt;Soundrecorder Tutorial&amp;lt;/string&amp;gt;
	&amp;lt;string name=&amp;#34;record&amp;#34;&amp;gt;Record!&amp;lt;/string&amp;gt;
	&amp;lt;string name=&amp;#34;play&amp;#34;&amp;gt;Play&amp;lt;/string&amp;gt;
&amp;lt;/resources&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Sensor Fun: Using the accelerometer on Android</title>
      <link>https://www.hascode.com/sensor-fun-using-the-accelerometer-on-android/</link>
      <pubDate>Tue, 27 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/sensor-fun-using-the-accelerometer-on-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Here is an example on how to use the accelerometer in your Android application. If you want to simulate the acceleration on the emulator I highly recommend the &lt;em&gt;Sensor Simulator&lt;/em&gt; on the &lt;a href=&#34;http://code.google.com/p/openintents/wiki/SensorSimulator&#34;&gt;OpenIntents website&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following example app displays the coordinates received by the sensor.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_acceleration_app&#34;&gt;The Acceleration App&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The activity – &lt;em&gt;AccelerationActivity.java&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.android;

import android.app.Activity;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.widget.TextView;

public class AccellerationActivity extends Activity {
	private TextView result;
	private SensorManager sensorManager;
	private Sensor sensor;
	private float x, y, z;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
		sensor = sensorManager.getSensorList(Sensor.TYPE_ACCELEROMETER).get(0);

		result = (TextView) findViewById(R.id.result);
		result.setText(&amp;#34;No result yet&amp;#34;);
	}

	private void refreshDisplay() {
		String output = String
				.format(&amp;#34;x is: %f / y is: %f / z is: %f&amp;#34;, x, y, z);
		result.setText(output);
	}

	@Override
	protected void onResume() {
		super.onResume();
		sensorManager.registerListener(accelerationListener, sensor,
				SensorManager.SENSOR_DELAY_GAME);
	}

	@Override
	protected void onStop() {
		sensorManager.unregisterListener(accelerationListener);
		super.onStop();
	}

	private SensorEventListener accelerationListener = new SensorEventListener() {
		@Override
		public void onAccuracyChanged(Sensor sensor, int acc) {
		}

		@Override
		public void onSensorChanged(SensorEvent event) {
			x = event.values[0];
			y = event.values[1];
			z = event.values[2];
			refreshDisplay();
		}

	};
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>First steps on Android: Creating a simple Todo App</title>
      <link>https://www.hascode.com/first-steps-on-android-creating-a-simple-todo-app/</link>
      <pubDate>Mon, 26 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/first-steps-on-android-creating-a-simple-todo-app/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we are going to build a simple todo app that is able to store simple todos in a database. The user is able to add new todos or delete old ones by clicking on a todo. For this tutorial we won’t use maven to keep it simple – if maven integration is desired – take a look at &lt;a href=&#34;https://www.hascode.com/../how-to-integrate-android-development-tools-and-maven/&#34;&gt;this tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a new android project using the &lt;a href=&#34;http://developer.android.com/sdk/index.html&#34;&gt;Android SDK&lt;/a&gt; and your IDE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create some packages &lt;em&gt;com.hascode.android.activity&lt;/em&gt; and &lt;em&gt;com.hascode.android.persistence&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the layout in &lt;em&gt;res/layout/main.xml&lt;/em&gt; – the main elements: a listview for the todos-list, a textbox and a button to enter new data.&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
    &amp;lt;RelativeLayout
        android:id=&amp;#34;@+id/widget31&amp;#34;
        android:layout_width=&amp;#34;fill_parent&amp;#34;
        android:layout_height=&amp;#34;fill_parent&amp;#34;
        xmlns:android=&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;
    &amp;gt;
        &amp;lt;TableRow
            android:id=&amp;#34;@+id/row&amp;#34;
            android:layout_width=&amp;#34;fill_parent&amp;#34;
            android:layout_height=&amp;#34;wrap_content&amp;#34;
            android:orientation=&amp;#34;horizontal&amp;#34;
            android:layout_below=&amp;#34;@+id/tasklist&amp;#34;
            android:layout_alignParentLeft=&amp;#34;true&amp;#34;
        &amp;gt;
            &amp;lt;EditText
                android:id=&amp;#34;@+id/etNewTask&amp;#34;
                android:layout_width=&amp;#34;200px&amp;#34;
                android:layout_height=&amp;#34;wrap_content&amp;#34;
                android:text=&amp;#34;&amp;#34;
                android:textSize=&amp;#34;18sp&amp;#34;
            &amp;gt;
            &amp;lt;/EditText&amp;gt;
            &amp;lt;Button
                android:id=&amp;#34;@+id/btNewTask&amp;#34;
                android:layout_width=&amp;#34;wrap_content&amp;#34;
                android:layout_height=&amp;#34;wrap_content&amp;#34;
                android:text=&amp;#34;@+string/add_button_name&amp;#34;
            &amp;gt;
            &amp;lt;/Button&amp;gt;
        &amp;lt;/TableRow&amp;gt;
        &amp;lt;ListView
            android:id=&amp;#34;@+id/tasklist&amp;#34;
            android:layout_width=&amp;#34;fill_parent&amp;#34;
            android:layout_height=&amp;#34;wrap_content&amp;#34;
            android:layout_alignParentTop=&amp;#34;true&amp;#34;
            android:layout_alignParentLeft=&amp;#34;true&amp;#34;
        &amp;gt;
        &amp;lt;/ListView&amp;gt;
&amp;lt;/RelativeLayout&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Coding Katas with Maven</title>
      <link>https://www.hascode.com/coding-katas-with-maven/</link>
      <pubDate>Thu, 15 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/coding-katas-with-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Searching for nice coding kata sites I found this one – codingkata.org – I really liked because of the quick start and nice maven integration.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just head over to the &lt;a href=&#34;http://codingkata.org/katas/&#34;&gt;kata overview&lt;/a&gt; select the kata you wish to try out, copy the generated maven command line option and run it in the console – heres the code for the &lt;em&gt;hello-world&lt;/em&gt; sample:&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_coding_katas_from_maven_archetype&#34;&gt;Coding Katas from Maven Archetype&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:generate -DinteractiveMode=false -DarchetypeRepository=http://www.codingkata.org/repo/release -DarchetypeGroupId=org.codingkata.template -DarchetypeArtifactId=solv-java-archetype -DarchetypeVersion=1.04 -DgroupId=org.codingkata.unit -DartifactId=hello-world-solv-java -DkataId=hello-world -DkataVersion=1.02 -DlangVersion=1.6 -DlibVersion=1.3.2 -Dversion=1271358&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to build a Confluence Macro Plugin</title>
      <link>https://www.hascode.com/how-to-build-a-confluence-macro-plugin/</link>
      <pubDate>Tue, 13 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-build-a-confluence-macro-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The goal is to build a small macro plugin deployable via the Confluence plugin API rendering some spaces.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Please note that I am going to build the plugin using just Maven and not the Atlassian Maven Wrapper called the “&lt;em&gt;Atlassian Plugin SDK&lt;/em&gt;” – more information about that is available at the &lt;a href=&#34;http://confluence.atlassian.com/display/DEVNET/Developing+your+Plugin+using+the+Atlassian+Plugin+SDK&#34;&gt;Atlassian website&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The macro output will be rendered using a Velocity template and all messages are stored for &lt;em&gt;i18n&lt;/em&gt; in properties files bundled with the plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Create a SOAP client using the JAX-WS Maven Plugin</title>
      <link>https://www.hascode.com/create-a-soap-client-using-the-jax-ws-maven-plugin/</link>
      <pubDate>Thu, 08 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/create-a-soap-client-using-the-jax-ws-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written the article “&lt;a href=&#34;https://www.hascode.com/2010/03/how-to-build-a-confluence-soap-client-in-5-minutes/&#34;&gt;How to build a Confluence SOAP client in 5 minutes&lt;/a&gt;” some readers asked me for some more information and help using the JAX-WS plugin that I mentioned in the article instead of the Axis plugin – so here we go ;)&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a simple maven project first using &lt;em&gt;archetype:create&lt;/em&gt; or &lt;em&gt;archetype:generate&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:create -DgroupId=com.hascode.jaxws -DartifactId=soap-tutorial&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We get a &lt;em&gt;pom.xml&lt;/em&gt; like this:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
     &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
     &amp;lt;groupId&amp;gt;com.hascode.jaxws&amp;lt;/groupId&amp;gt;
     &amp;lt;artifactId&amp;gt;soap-tutorial&amp;lt;/artifactId&amp;gt;
     &amp;lt;version&amp;gt;0.1&amp;lt;/version&amp;gt;
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Manage dependencies with the Maven Dependency Plugin</title>
      <link>https://www.hascode.com/manage-dependencies-with-the-maven-dependency-plugin/</link>
      <pubDate>Sun, 04 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/manage-dependencies-with-the-maven-dependency-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In a maven project there are lots of dependencies to handle – often one wants to know which version of a software comes from.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The solution to this problem is the &lt;a href=&#34;http://maven.apache.org/plugins/maven-dependency-plugin/&#34;&gt;Maven Dependency Plugin&lt;/a&gt; which helps you to find used/unused/declared/undeclared dependencies in your project.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition the plugin allows you to copy or unpack artifacts.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_goals&#34;&gt;Maven Goals&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:copy&lt;/em&gt; – copies artifacts defined in the config to a specified location – details available &lt;a href=&#34;http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:resolve&lt;/em&gt; – resolves all dependencies and shows the versions&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:go-offline&lt;/em&gt; – resolves everything the project needs like dependencies, plugins and reports&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:analyze&lt;/em&gt; - parses the dependencies and shows if they are used/declared/unused/undeclared ..&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:analyze-dep-gmt&lt;/em&gt; - finds mismatches between resolved dependencies and those listed in the dependencyManagement section&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:tree&lt;/em&gt; – shows a nice dependency tree for the maven project&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Simple One-Minute IMAP Client</title>
      <link>https://www.hascode.com/snippet-simple-one-minute-imap-client/</link>
      <pubDate>Sat, 03 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-simple-one-minute-imap-client/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Building a simple IMAP Client that displays the subject of the messages in the &lt;em&gt;“inbox&lt;/em&gt;” Folder using Maven (I just like Maven).&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup_maven&#34;&gt;Project Setup / Maven&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a new Maven project&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:create -DgroupId=com.hascode.imap -DartifactId=imap-client&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit your &lt;em&gt;pom.xml&lt;/em&gt; and add some dependencies&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
     &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
     &amp;lt;groupId&amp;gt;com.hascode.imap&amp;lt;/groupId&amp;gt;
     &amp;lt;artifactId&amp;gt;imap-client&amp;lt;/artifactId&amp;gt;
     &amp;lt;version&amp;gt;0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;
     &amp;lt;dependencies&amp;gt;
         &amp;lt;dependency&amp;gt;
             &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;
             &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;4.8.1&amp;lt;/version&amp;gt;
         &amp;lt;/dependency&amp;gt;
         &amp;lt;dependency&amp;gt;
             &amp;lt;groupId&amp;gt;javax.mail&amp;lt;/groupId&amp;gt;
             &amp;lt;artifactId&amp;gt;mail&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;1.4.2&amp;lt;/version&amp;gt;
         &amp;lt;/dependency&amp;gt;
     &amp;lt;/dependencies&amp;gt;
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_the_e_mail_client&#34;&gt;Creating the E-Mail Client&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a package .. something like &lt;em&gt;com.hascode.imap.client&lt;/em&gt; ;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a simple mail client using &lt;em&gt;javax.mail&lt;/em&gt; in a class named &lt;em&gt;ImapClient&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.imap.client;

import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Store;

public class ImapClient {
    private Session session = null;
    private Store store = null;
    private String host = null;
    private String userName = null;
    private String password = null;

    public ImapClient(String host, String userName, String password){
        this.host = host;
        this.userName = userName;
        this.password = password;
    }

    public boolean getMail() throws MessagingException {
        session = Session.getDefaultInstance(System.getProperties(),null);
        //        session.setDebug(true);
        System.out.println(&amp;#34;get store..&amp;#34;);
        store = session.getStore(&amp;#34;imaps&amp;#34;);
        System.out.println(&amp;#34;connect..&amp;#34;);
        store.connect(this.host, this.userName, this.password);
        System.out.println(&amp;#34;get default folder ..&amp;#34;);
        Folder folder = store.getDefaultFolder();
        folder = folder.getFolder(&amp;#34;inbox&amp;#34;);
        folder.open(Folder.READ_ONLY);
        System.out.println(&amp;#34;reading messages..&amp;#34;);
        Message[] messages = folder.getMessages();
        for(Message m:messages){
          System.out.println(m.getSubject());
        }
        return false;
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Confluence Developer Instance Quick Setup</title>
      <link>https://www.hascode.com/confluence-developer-instance-quick-setup/</link>
      <pubDate>Fri, 26 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/confluence-developer-instance-quick-setup/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This short tutorial shows how to set-up a developer instance of the popular &lt;a href=&#34;http://www.atlassian.com/software/confluence/&#34;&gt;Confluence Wiki&lt;/a&gt; from &lt;a href=&#34;http://www.atlassian.com/&#34;&gt;Atlassian&lt;/a&gt; in a few minutes.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It’s a prerequisite for a few following tutorials regarding the Confluence API and plug-in development for this system.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We want a quick install so we are going to run Confluence with the embedded servlet container and HSQL database.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt; Meanwhile it is way much easier to use &lt;a href=&#34;http://developer.atlassian.com&#34;&gt;Atlassian’s Plugin SDK&lt;/a&gt; using &lt;em&gt;atlas-mvn run&lt;/em&gt; or &lt;em&gt;atlas-mvn-run-standalone –product confluence –version x.x.x&lt;/em&gt; but if you need to setup an independant instance, this article still might be useful.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to build a quick Lucene Search</title>
      <link>https://www.hascode.com/how-to-build-a-quick-lucene-search/</link>
      <pubDate>Thu, 25 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/how-to-build-a-quick-lucene-search/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Helo – today I wanted to post a small tutorial for a small index and search operation using the &lt;a href=&#34;http://lucene.apache.org/&#34;&gt;Lucene&lt;/a&gt; indexer and Maven for the project setup.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create an empty Maven sample project using the &lt;a href=&#34;http://m2eclipse.sonatype.org/&#34;&gt;Eclipse Maven Plugin&lt;/a&gt; or use the following console command:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:create -DgroupId=com.hascode.demo.search -DartifactId=lucene-sample&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Here is my &lt;em&gt;pom.xml&lt;/em&gt; there are some dependencies for Lucene defined:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
  &amp;lt;groupId&amp;gt;com.hascode.demo.search&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;lucene-sample&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;
  &amp;lt;name&amp;gt;My Lucene Search Sample&amp;lt;/name&amp;gt;
  &amp;lt;description&amp;gt;Lucene Search Sample&amp;lt;/description&amp;gt;
  &amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.apache.lucene&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;lucene-core&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;2.4.1&amp;lt;/version&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;lucene&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;lucene&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;1.4.3&amp;lt;/version&amp;gt;
    &amp;lt;/dependency&amp;gt;
  &amp;lt;/dependencies&amp;gt;
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to add a local lib directory to Maven</title>
      <link>https://www.hascode.com/how-to-add-a-local-lib-directory-to-maven/</link>
      <pubDate>Thu, 18 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/how-to-add-a-local-lib-directory-to-maven/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes there is a dependency not available at a remote repository and one is too lazy to set up a local maven repository – that’s when one adds a directory in the project structure and wants maven to find dependencies there.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a directory called “&lt;strong&gt;lib&lt;/strong&gt;” in the project root&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the following markup to the &lt;em&gt;pom.xml&lt;/em&gt; inside the &amp;lt;repositories&amp;gt;-Tag (create if it does not exist):&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;repository&amp;gt;
    &amp;lt;id&amp;gt;lib&amp;lt;/id&amp;gt;
    &amp;lt;name&amp;gt;lib&amp;lt;/name&amp;gt;
    &amp;lt;releases&amp;gt;
        &amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;
        &amp;lt;checksumPolicy&amp;gt;ignore&amp;lt;/checksumPolicy&amp;gt;
    &amp;lt;/releases&amp;gt;
    &amp;lt;snapshots&amp;gt;
        &amp;lt;enabled&amp;gt;false&amp;lt;/enabled&amp;gt;
    &amp;lt;/snapshots&amp;gt;
    &amp;lt;url&amp;gt;file://${project.basedir}/lib&amp;lt;/url&amp;gt;
&amp;lt;/repository&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Atlassian Snippets</title>
      <link>https://www.hascode.com/atlassian-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/atlassian-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_disable_yui_compressor&#34;&gt;Disable YUI compressor&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;com.atlassian.maven.plugins&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;maven-jira-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;${amps.version}&amp;lt;/version&amp;gt;
    &amp;lt;extensions&amp;gt;true&amp;lt;/extensions&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;compressResources&amp;gt;false&amp;lt;/compressResources&amp;gt;
        [..]
    &amp;lt;/configuration&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_get_favourites_by_user&#34;&gt;Confluence – Get favourites by user&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the label manager.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;List getFavouriteSpaces(String username)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_determine_the_base_url&#34;&gt;Confluence – Determine the base URL&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the SettingsManager:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;String baseUrl = settingsManager.getGlobalSettings().getBaseUrl();&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_get_the_context_path&#34;&gt;Confluence – Get the context path&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the BootstrapManager:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;String contextPath = bootstrapManager.getWebAppContextPath();&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_using_velocity_template_for_a_macro&#34;&gt;Confluence – Using Velocity Template for a Macro&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;final VelocityContext contextMap = new VelocityContext(MacroUtils.defaultVelocityContext());

contextMap.put(&amp;#34;key&amp;#34;, obj); // references obj as variable named $key in the velocity template

VelocityUtils.getRenderedTemplate(&amp;#34;path/to/template.vm&amp;#34;, contextMap);&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Eclipse Snippets</title>
      <link>https://www.hascode.com/eclipse-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/eclipse-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_favorites&#34;&gt;Favorites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Spare my time when using static imports ..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;code&gt;Window &amp;gt; Preferences &amp;gt; Java &amp;gt; Editor &amp;gt; Content  Assist &amp;gt; Favorites&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;com.google.common.collect.Lists
com.jayway.restassured.matcher.RestAssuredMatchers
com.jayway.restassured.RestAssured
io.restassured.matcher.RestAssuredMatchers
io.restassured.RestAssured
org.hamcrest.MatcherAssert
org.hamcrest.Matchers
org.mockito.Mockito
javaslang.API
javaslang.Predicates&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_template_to_insert_a_static_logger_instance&#34;&gt;Template to insert a static logger instance&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Go &lt;code&gt;Windows &amp;gt; Preferences &amp;gt; Java &amp;gt; Editor &amp;gt; Templates &amp;gt; New&lt;/code&gt; …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Enter logger as name and as template:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;${:import(org.slf4j.Logger,org.slf4j.LoggerFactory)}
private static final Logger LOG = LoggerFactory.getLogger(${enclosing_type}.class);&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Afterwards you’re able to type logger in your code and ctrl+space gives the option to insert the logger&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Snippets</title>
      <link>https://www.hascode.com/java-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/java-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_remote_debug_a_pods_java_process&#34;&gt;Remote Debug a Pod’s Java Process&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Simple steps for remote debugging a Java process running on a k8 pod:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Edit deployment and add the following parameters to the Java start line: &lt;code&gt;-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Also add the following port mapping at the section &lt;code&gt;container → ports&lt;/code&gt; in the deployment:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;- containerPort: 5005
  protocol: TCP&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Safe, wait for the new pods and then add a port forward for port 5005 for this pod:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl port-forward podname 5005&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Kafka Snippets</title>
      <link>https://www.hascode.com/kafka-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/kafka-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_start_an_image_with_kcat_kafka_cat_for_debugging&#34;&gt;Start an Image with kcat / kafka-cat for Debugging&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl -n NAMESPACE run &amp;#34;$(whoami)-debug&amp;#34; -it --rm \
    --image=confluentinc/cp-kafkacat:6.1.9 \
    --restart=Never \
    -- bash&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dockerfile_for_kafka_analysis_container_with_different_tools&#34;&gt;Dockerfile for Kafka Analysis Container with different Tools&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With jq, kafka console tools, schema registry tools and kafkacat installed …​.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Dockerfile&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;FROM confluentinc/cp-kafka:6.2.1 as cp-kafka
FROM confluentinc/cp-schema-registry:6.2.1 as cp-schema-registry

FROM debian:10-slim
ARG DEBIAN_FRONTEND=noninteractive

# Install necessary tools
RUN apt-get update &amp;amp;&amp;amp; apt-get install -y \
    curl \
    jq \
    yq \
    &amp;amp;&amp;amp; rm -rf /var/lib/apt/lists/*

# Install kafkacat binary
RUN apt-get update &amp;amp;&amp;amp; apt-get install -y kafkacat &amp;amp;&amp;amp; rm -rf /var/lib/apt/lists/*

# Copy Kafka binaries
COPY --from=cp-kafka /usr/bin/kafka-* /usr/bin/
COPY --from=cp-schema-registry /usr/bin/schema-registry* /usr/bin/

# Copy entrypoint script
COPY entrypoint.sh /usr/bin/entrypoint.sh
RUN chmod +x /usr/bin/entrypoint.sh

ENTRYPOINT [&amp;#34;/usr/bin/entrypoint.sh&amp;#34;]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Kotlin Snippets</title>
      <link>https://www.hascode.com/kotlin-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/kotlin-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_checks_exit_conditions&#34;&gt;Checks / Exit Conditions&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Instead of writing something like &lt;code&gt;if !condition throw …​&lt;/code&gt; we may use &lt;code&gt;require&lt;/code&gt; and &lt;code&gt;check&lt;/code&gt; for quick exit conditions:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-kotlin&#34; data-lang=&#34;kotlin&#34;&gt;val num = 1;

require(num &amp;gt; 1){
    // ...
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-kotlin&#34; data-lang=&#34;kotlin&#34;&gt;val num = 1;

require(num &amp;gt; 1){
    // ..
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_pluralize_strings&#34;&gt;Pluralize Strings&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Adding pluralization as extension function&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-kotlin&#34; data-lang=&#34;kotlin&#34;&gt;fun String.pluralize(count:Int):String {
    return if (count &amp;gt; 1){
        this + &amp;#39;s&amp;#39;
    } else {
        this
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Use it like this&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Maven Snippets</title>
      <link>https://www.hascode.com/maven-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/maven-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_extract_coordinates_from_the_pom&#34;&gt;Extract Coordinates from the POM&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Helpful for build and integration environments, pipelines etc.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Exctract the Project version from the pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_override_a_property_via_local_configuration&#34;&gt;Override a Property via local configuration&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. to override the property &lt;code&gt;xxx&lt;/code&gt; from your project’s &lt;code&gt;pom.xml&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a directory &lt;code&gt;.mvn&lt;/code&gt; in your project directory root&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a file named &lt;code&gt;maven.config&lt;/code&gt; in this directory&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Insert &lt;code&gt;-Dxxx=newvalue&lt;/code&gt; into the file to override this property&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
Don’t forget to add &lt;code&gt;.mvn&lt;/code&gt; to your .gitignore!
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>MyBatis Snippets</title>
      <link>https://www.hascode.com/mybatis-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/mybatis-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_use_list_of_parameters_in_annotation_based_query&#34;&gt;Use List of Parameters in Annotation-based Query&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Possible using MyBatis &lt;a href=&#34;https://mybatis.org/mybatis-3/dynamic-sql.html&#34;&gt;Dynamic SQL feature&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.example.mybatis;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SampleMapper {

    @Select({&amp;#34;&amp;lt;script&amp;gt;&amp;#34;,
             &amp;#34;SELECT sample.bar&amp;#34;,
             &amp;#34;FROM sampletable sample&amp;#34;,
             &amp;#34;WHERE sample.id IN&amp;#34;,
            &amp;#34;&amp;lt;foreach item=&amp;#39;item&amp;#39; index=&amp;#39;index&amp;#39; collection=&amp;#39;ids&amp;#39;&amp;#34;,
            &amp;#34;open=&amp;#39;(&amp;#39; separator=&amp;#39;,&amp;#39; close=&amp;#39;)&amp;#39;&amp;gt;&amp;#34;,
            &amp;#34;#{item}&amp;#34;,
            &amp;#34;&amp;lt;/foreach&amp;gt;&amp;#34;,
            &amp;#34;&amp;lt;/script&amp;gt;&amp;#34;})
    List&amp;lt;Foo&amp;gt; getSamplesMatchingIds(@Param(&amp;#34;ids&amp;#34;) List&amp;lt;String&amp;gt; ids);
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The mapper may now be used with a list of parameter objects:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;var samples = sampleMapper.getSamplesMatchingIds(List.of(&amp;#34;24059e5b-aa07-424d-855e-50f499b8f697&amp;#34;, &amp;#34;65140fc0-fc9f-42d2-9531-5e5d6caeba30&amp;#34;));&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_call_a_procedure&#34;&gt;Call a Procedure&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.example.mybatis;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.StatementType;

@Mapper
public interface SampleMapper {

    @Select(&amp;#34;CALL SCHEMA.CL.setScope(#{scope})&amp;#34;)
    @Options(statementType = StatementType.CALLABLE)
    void setScope(int scope);
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Spring Boot Snippets</title>
      <link>https://www.hascode.com/spring-boot-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/spring-boot-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_define_and_configure_log_groups&#34;&gt;Define and Configure Log Groups&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
This allows to configure a group of loggers at the same time
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Define a log group named &lt;code&gt;myaspect&lt;/code&gt; with two packages&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;application.properties&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;logging.group.myaspect=com.hascode.package1,com.hascode.package2&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure the log group and set all loggers to level &lt;code&gt;TRACE&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;application.properties&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;logging.level.myaspect=TRACE&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This is also possible as parameter on startup&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;java -Dlogging.level.myaspect=TRACE myapp.jar&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_use_junit_5_with_spring_boot&#34;&gt;Use JUnit 5 with Spring Boot&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Use newer versions of Surefire and Failsafe plugins:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;properties&amp;gt;
[..]
  &amp;lt;maven-failsafe-plugin.version&amp;gt;2.22.0&amp;lt;/maven-failsafe-plugin.version&amp;gt;
  &amp;lt;maven-surefire-plugin.version&amp;gt;2.22.0&amp;lt;/maven-surefire-plugin.version&amp;gt;
&amp;lt;/properties&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
