<?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>Aop on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/aop/</link>
    <description>Recent content in Aop on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo -- 0.147.8</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #213243b1d6e8932079e09227d3f3ed0c806cd0c9</copyright>
    <lastBuildDate>Mon, 26 May 2014 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/aop/index.xml" rel="self" type="application/rss+xml" />
    <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>Java EE 6, GlassFish and the Interceptor API</title>
      <link>https://www.hascode.com/java-ee-6-glassfish-and-the-interceptor-api/</link>
      <pubDate>Wed, 17 Aug 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-6-glassfish-and-the-interceptor-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;Aspect oriented programming and the definition of cross-cutting-concerns is made easy in Java EE 6 using interceptors.&lt;/p&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 the different possibilities to apply interceptors to your EJBs at class or method level and how to setup a GlassFish instance to run the examples.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;interceptors.png&#34; alt=&#34;interceptors&#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;We don’t need much for the following tutorial – just a JDK, Maven and GlassFish…&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://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;http://maven.apache.org&#34;&gt;Maven 3&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&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>
  </channel>
</rss>
