<?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>Service on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/service/</link>
    <description>Recent content in Service on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Tue, 22 Jan 2013 00:00:00 +0100</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/service/index.xml" rel="self" type="application/rss+xml" />
    <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>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>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>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>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>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>Kubernetes Snippets</title>
      <link>https://www.hascode.com/kubernetes-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/kubernetes-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_fetch_and_decode_secret&#34;&gt;Fetch and Decode Secret&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You need to have &lt;code&gt;jq&lt;/code&gt; installed to use this snippet!&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;kubectl --context=my-context -n my-namespace get secret my-secret-name -o json | jq &amp;#39;.data | map_values(@base64d)&amp;#39;&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;_rerun_existing_completed_job&#34;&gt;Rerun existing completed Job&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;admonitionblock caution&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-caution&#34; title=&#34;Caution&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
kubectl replace deletes the old job, if there is any error, your job definition is lost, don’t forget to save it first!
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Replace an existing Job with itself&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;kubectl get job JOBNAME -o yaml | kubectl replace --force -f -&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
