<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6988195</id><updated>2026-06-16T13:09:17.354+02:00</updated><category term="CMS"/><category term="Alfresco"/><category term="Java"/><category term="SCEA"/><category term="Unit tests"/><category term="JSTL"/><category term="Jetspeed"/><category term="Spring"/><category term="J2EE"/><category term="Mocking"/><category term="UML"/><category term="Conventions"/><category term="Java 8"/><category term="Lambda"/><category term="switch"/><category term="Administrator"/><category term="Agile"/><category term="Cache"/><category term="Development"/><category term="JDK"/><category term="Keyboard"/><category term="LRU"/><category term="Least Recently Used"/><category term="MVC"/><category term="Netbeans"/><category term="NotSerializableException"/><category term="REST"/><category term="Security"/><category term="Shortcut"/><category term="Spotify"/><category term="Spring MVC"/><category term="Subversion"/><category term="UML 2.0"/><category term="Windows"/><category term="javaranch"/><category term="nb60"/><category term="remove"/><category term="svn"/><title type='text'>Java Notes</title><subtitle type='html'>Here I will describe my learnings when using java...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6988195.post-4543727914619622160</id><published>2017-03-23T15:01:00.000+01:00</published><updated>2017-03-23T15:01:19.490+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cache"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Least Recently Used"/><category scheme="http://www.blogger.com/atom/ns#" term="LRU"/><title type='text'>LRU Cache</title><content type='html'>A simple Least Recently Used Cache implementation in Java, with thanks to &lt;a href=&quot;http://chriswu.me/blog/a-lru-cache-in-10-lines-of-java/&quot; target=&quot;_blank&quot;&gt;Chris Wu&lt;/a&gt; for the idea.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;package demo;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * Thanks to http://chriswu.me/blog/a-lru-cache-in-10-lines-of-java/
 *
 * @author &lt;a href=&quot;mailto:marcel.dullaart@rws.nl&quot;&gt;Marcel Dullaart&lt;/a&gt;
 */
class LRUCache&lt;k v=&quot;&quot;&gt; extends LinkedHashMap&lt;k v=&quot;&quot;&gt; {

    private Integer sizeLimit;

    LRUCache(Integer size) {
        super(16, 0.75f, true);
        this.sizeLimit = size;
    }

    /**
     * Removes the eldest entry if the {@link #size()} exceeds the {@link #sizeLimit}
     *
     * @param entry the eldest entry
     * @return always false
     */
    @Override
    protected boolean removeEldestEntry(Map.Entry&lt;k v=&quot;&quot;&gt; entry) {
        if (size() &amp;gt; sizeLimit) {
            remove(entry.getKey());
        }
        return false;
    }
}
&lt;/k&gt;&lt;/k&gt;&lt;/k&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/4543727914619622160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/4543727914619622160?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/4543727914619622160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/4543727914619622160'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2017/03/lru-cache.html' title='LRU Cache'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-2897820683446051720</id><published>2016-09-15T23:11:00.005+02:00</published><updated>2016-09-22T21:46:14.554+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java 8"/><category scheme="http://www.blogger.com/atom/ns#" term="Lambda"/><category scheme="http://www.blogger.com/atom/ns#" term="switch"/><title type='text'>Replace switch statements using lamda&amp;#39;s</title><content type='html'>Complex switch statements with many possible cases tend to result in cluttered code. When code checkers start to complain about the complexity of a method, it becomes time to refactore that piece, but often that sounds simpler than it actually is.&lt;br /&gt;
With lambda&#39;s in java 8 these switch statements can easily be simplified resulting in cleaner, easier to read code.&lt;br /&gt;
Lets take for example the below switch statement and turn that into a nice and easy to understand piece of code using a Map and some lamba expressions.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;public List&amp;lt;string&amp;gt; findUsingSwitch(Bicycle bicycle) {
  switch (bicycle) {
    case RACE:
      return listRacers();
    case ATB:
      return listAtbs();
    case CITY:
      return listCityBikes();
    case HPV:
      return listHumanPoweredVehicles();
    default:
      throw new IllegalArgumentException();
    }
}&lt;/pre&gt;
&lt;br /&gt;
Its easy to imagine that such a switch statement can grow and become pretty complex.&lt;br /&gt;
In java 8 we now have the ability to use lambda expressions and pass them around to functions. This allows us to replace the switch/case block with a more flexible and more natural implementation.&lt;br /&gt;
Lets first start with creating a map that associates the enum with the lambda that produces the result for the given enum value.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;private Map&amp;lt;Bicycle, Supplier&amp;lt;List&amp;lt;String&amp;gt;&amp;gt;&amp;gt; typeMap = new HashMap&amp;lt;Bicycle, Supplier&amp;lt;List&amp;lt;String&amp;gt;&amp;gt;&amp;gt;() {
  {
    put(Bicycle.RACE, () -&amp;gt; listRacers());
    put(Bicycle.ATB, () -&amp;gt; listAtbs());
    put(Bicycle.CITY, () -&amp;gt; listCityBikes());
    put(Bicycle.HPV, () -&amp;gt; listHumanPoweredVehicles());
  }
};&lt;/pre&gt;
&lt;br /&gt;
Now the find method can be changed to use the lambdas instead:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;public List&lt;string&gt; findUsingLambdas(Bicycle bicycle) {
  if (!typeMap.containsKey(bicycle)) {
    throw new IllegalArgumentException(String.format(&quot;%s is not supported&quot;, bicycle));
  }

  return typeMap.get(bicycle).get();
}&lt;/string&gt;&lt;/pre&gt;
&lt;br /&gt;
The sources can be found on &lt;a href=&quot;https://github.com/legolas/switch-2-lambdas&quot;&gt;github.&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/2897820683446051720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/2897820683446051720?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/2897820683446051720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/2897820683446051720'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2016/09/replace-switch-statements-using-lamda_19.html' title='Replace switch statements using lamda&amp;#39;s'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-7476623622934580158</id><published>2016-09-15T23:11:00.002+02:00</published><updated>2016-09-16T12:29:30.419+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java 8"/><category scheme="http://www.blogger.com/atom/ns#" term="Lambda"/><category scheme="http://www.blogger.com/atom/ns#" term="switch"/><title type='text'>Replace switch statements using lamda&amp;#39;s</title><content type='html'>Complex switch statements with many possible &lt;code&gt;case&lt;/code&gt;s tend to result in cluttered code. When code checkers start to complain about the complexity of a method, it becomes time to refactor that piece, but often that sounds simpler than it actually is.&lt;br /&gt;
With lambda&#39;s in java 8 these switch statements can easily be simplified resulting in cleaner, easier to read and extend code.&lt;br /&gt;
Lets take for example the below switch statement and turn that into a nice and easy to understand piece of code using a Map and some lamba expressions.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;public List&amp;lt;string&amp;gt; findUsingSwitch(Bicycle bicycle) {
  switch (bicycle) {
    case RACE:
      return listRacers();
    case ATB:
      return listAtbs();
    case CITY:
      return listCityBikes();
    case HPV:
      return listHumanPoweredVehicles();
    default:
      throw new IllegalArgumentException();
    }
}&lt;/pre&gt;
&lt;br /&gt;
Its easy to imagine that such a switch statement can grow and become pretty complex.&lt;br /&gt;
In java 8 we now have the ability to use lambda expressions and pass them around to functions. This allows us to replace the switch/case block with a more flexible and more natural implementation.&lt;br /&gt;
Lets first start with creating a map that associates the enum with the lambda that produces the result for the given enum value.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;private Map&amp;lt;Bicycle, Supplier&amp;lt;List&amp;lt;String&amp;gt;&amp;gt;&amp;gt; typeMap = new HashMap&amp;lt;Bicycle, Supplier&amp;lt;List&amp;lt;String&amp;gt;&amp;gt;&amp;gt;() {
  {
    put(Bicycle.RACE, () -&amp;gt; listRacers());
    put(Bicycle.ATB, () -&amp;gt; listAtbs());
    put(Bicycle.CITY, () -&amp;gt; listCityBikes());
    put(Bicycle.HPV, () -&amp;gt; listHumanPoweredVehicles());
  }
};&lt;/pre&gt;
&lt;br /&gt;
Now the find method can be changed to use the lambdas instead:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;public List&lt;string&gt; findUsingLambdas(Bicycle bicycle) {
  if (!typeMap.containsKey(bicycle)) {
    throw new IllegalArgumentException(String.format(&quot;%s is not supported&quot;, bicycle));
  }

  return typeMap.get(bicycle).get();
}&lt;/string&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
The example sources can be found on &lt;a href=&quot;https://github.com/legolas/switch-2-lambdas&quot;&gt;github &lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMQz7KhMYpIqW0sDrE6M3Ujr-m39bXGfBgmoeVPf02uhNRom7WPhLiWdRPwgwPVqoJSpd3qjnWqb213RmZBMSYsX7LWyyQAvfayKP5KYOI1VCtloAYcslcejB0ts-lTigzKRpJFw/s1600/GitHub-Mark-32px.png&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/7476623622934580158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/7476623622934580158?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/7476623622934580158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/7476623622934580158'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2016/09/replace-switch-statements-using-lamda.html' title='Replace switch statements using lamda&amp;#39;s'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMQz7KhMYpIqW0sDrE6M3Ujr-m39bXGfBgmoeVPf02uhNRom7WPhLiWdRPwgwPVqoJSpd3qjnWqb213RmZBMSYsX7LWyyQAvfayKP5KYOI1VCtloAYcslcejB0ts-lTigzKRpJFw/s72-c/GitHub-Mark-32px.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-3125198876536924516</id><published>2015-12-20T22:48:00.000+01:00</published><updated>2016-09-15T12:56:09.446+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Agile"/><category scheme="http://www.blogger.com/atom/ns#" term="Development"/><category scheme="http://www.blogger.com/atom/ns#" term="Spotify"/><title type='text'>Agile culture at spotify</title><content type='html'>&lt;a href=&quot;https://labs.spotify.com/2014/03/27/spotify-engineering-culture-part-1/&quot;&gt;Here&lt;/a&gt; are some interesting vid&#39;s showing the development culture at &lt;a href=&quot;https://labs.spotify.com/2014/03/27/spotify-engineering-culture-part-1/&quot;&gt;spotify&lt;/a&gt;, a very interesting variation of scrum organizing development teams.&lt;br /&gt;
I think this could work great for companies continuously improving a product or suite of products. But does this also work work for single independent projects? Perhaps its better to stick with the pre defined scrum practise in those cases.</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/3125198876536924516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/3125198876536924516?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/3125198876536924516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/3125198876536924516'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2015/12/agile-culture-at-spotify.html' title='Agile culture at spotify'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-1612167912499627118</id><published>2015-11-02T12:24:00.004+01:00</published><updated>2015-11-02T12:24:56.645+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring MVC"/><title type='text'>Unit testing a Spring MVC REST service</title><content type='html'>Properly testing a Spring MVC based REST service controller is made easy using MockMvc.&lt;br /&gt;
Validating the results is made easy using both JsonPath and XmlUnit</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/1612167912499627118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/1612167912499627118?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/1612167912499627118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/1612167912499627118'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2015/11/unit-testing-spring-mvc-rest-service.html' title='Unit testing a Spring MVC REST service'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-2415012319181774900</id><published>2015-06-09T16:30:00.003+02:00</published><updated>2015-06-09T16:31:12.482+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="remove"/><category scheme="http://www.blogger.com/atom/ns#" term="Subversion"/><category scheme="http://www.blogger.com/atom/ns#" term="svn"/><title type='text'>Removing files from svn without removing from the file system</title><content type='html'>Every now and then it happens that I have shared a project to subversion and noticed that while committing a number of files have been added (albeit not yet committed) to subversion.&lt;br /&gt;
Excluding these files from the commit only solves that problem temporarily, with the next commit these same files are again presented as changed files.&lt;br /&gt;
&lt;br /&gt;
Removing these files from the local subversion administration is not hard, but each time I find myself searching again for the correct command, so today I decided to spent a blog on it, although the actual content is just a one-liner:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;svn rm --keep-local&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
This will remove the file from subversion but will leave the files on the file system.
This is quite useful with IDE files for instance.</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/2415012319181774900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/2415012319181774900?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/2415012319181774900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/2415012319181774900'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2015/06/removing-files-from-svn-without.html' title='Removing files from svn without removing from the file system'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-7591544624692974081</id><published>2014-11-19T12:56:00.000+01:00</published><updated>2014-11-25T12:41:43.234+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Administrator"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JDK"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Installing a JDK on windows without admin rights</title><content type='html'>Here at the office I do not have admin rights.&lt;br /&gt;
This is a pain because I cannot update the JDK to a version I&#39;d like/have to use.&lt;br /&gt;
Well there is an option.&lt;br /&gt;
&lt;br /&gt;
Download the desired JDK from the regular location.&lt;br /&gt;
Open the executable file using &lt;a href=&quot;http://www.7-zip.org/&quot; target=&quot;_blank&quot;&gt;7-zip&lt;/a&gt;&amp;nbsp;or something similar. The executable contains only a single file named tools.zip. Unzip that file to a location where you want the JDK installed and you have write access to, for instance &lt;code&gt;c:\development\jdk-8.20&lt;/code&gt;.&lt;br /&gt;
This will create the installation structure, although many of the jar file components are still compressed. These must be de compressed using a tool provided with the JDK itself, unpack200, that is found in jre\bin.&lt;br /&gt;
Locate all .pack files using &lt;code&gt;dir *.pack /s/b&lt;/code&gt; and de-compress each of them using upack200:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;c:\development\jdk-8.20\jre\bin\unpack200.exe -v -r path\file.pack path\file.jar&lt;/code&gt;.&lt;br /&gt;
The &#39;-v&#39; option provides for verbose output and the &#39;-r&#39; option removes the original pack file afterwards.</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/7591544624692974081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/7591544624692974081?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/7591544624692974081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/7591544624692974081'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2014/11/installing-jdk-on-windows-without-admin.html' title='Installing a JDK on windows without admin rights'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-7611857237600587898</id><published>2014-08-05T07:37:00.000+02:00</published><updated>2015-06-09T07:39:58.997+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mocking"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit tests"/><title type='text'>Mocking the InitialContext</title><content type='html'>&lt;h2&gt;
Unit testing with JNDI&lt;/h2&gt;
One of the issue&#39;s with unit tests is that it is not always easy to control the&amp;nbsp;&lt;code&gt;&lt;a href=&quot;http://docs.oracle.com/javase/7/docs/api/javax/naming/InitialContext.html&quot;&gt;java.naming.InitialContext&lt;/a&gt;&lt;/code&gt;&amp;nbsp;provided to the object under test.&lt;br /&gt;
Mock frameworks cannot create mocks for JRE classes like InitialContext, so how can we solve this challenge?&lt;br /&gt;
&lt;br /&gt;
One solution could be to create a simple implementation for the &lt;code&gt;&lt;a href=&quot;http://docs.oracle.com/javase/7/docs/api/javax/naming/spi/InitialContextFactory.html&quot;&gt;javax.naming.spi.InitialContextFactory&lt;/a&gt;&lt;/code&gt; that returns a mock implementation provided by &lt;a href=&quot;https://code.google.com/p/mockito/&quot;&gt;mockito&lt;/a&gt;. Through configuration, our implementation is then used.
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;public class InitialContextFactoryMock implements InitialContextFactory {

  private static Context mockContext;

  /**
    * The mockContext is created here to be able to use the {@link Context}
    * mock object while defining the expectations.
    * Remember to call this method each time a new test case is run.
    * 
    * @return a fresh {@link Context} mock.
    */
  public static Context getMockContext() {
    mockContext = mock(Context.class);

    return mockContext;
  }

  /**
    * This factory returns the {@link Context} mock created earlier.
    */
  public Context getInitialContext(Hashtable environment) throws NamingException {
    return mockContext;
  }
}
&lt;/pre&gt;
&lt;br /&gt;
To use the &lt;code&gt;InitialContextFactoryMock&lt;code&gt; you need to specify it in the jndi.properties:&lt;br /&gt;
&lt;br /&gt;
&lt;/code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;&lt;code&gt;&lt;code&gt;java.naming.factory.initial=the.mocks.InitialContextFactoryMock
&lt;/code&gt;&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/7611857237600587898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/7611857237600587898?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/7611857237600587898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/7611857237600587898'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2014/08/mocking-initialcontext.html' title='Mocking the InitialContext'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-4348596987531287009</id><published>2011-04-12T09:55:00.001+02:00</published><updated>2015-06-09T07:43:50.004+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring"/><title type='text'>Fine grained authorization with Spring Security 3</title><content type='html'>For a project I&#39;m currently working on the authorization requuirements are such that we need method level authorization.&lt;br /&gt;
The projects will create a REST service whoes functionality I will not describe here, but it is based on Spring MVC, requires authentication based on Kerberos and user ID/password and fine grained authorization based on roles. The roles are taken from the Active Directory.&lt;br /&gt;
&lt;br /&gt;
Since &lt;a href=&quot;http://www.springsource.org/about&quot;&gt;Spring&lt;/a&gt; is already used and because we need two distinct manners for authentication, &lt;a href=&quot;http://static.springsource.org/spring-security/site/index.html&quot;&gt;spring security&lt;/a&gt; seems to be the best choice for this.&lt;br /&gt;
Using spring security, the authorization checks can be configured using annotations on the MVC controller using &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@PreAuthorize(&quot;hasRole(&#39;ROLE_USER&#39;)&quot;)&lt;/span&gt; and the like.&lt;br /&gt;
&lt;br /&gt;
Starting with spring security works like a breeze, until you try to step outside of the boundaries.&lt;br /&gt;
Setting up simple authentication based on hard coded user ID&#39;s with hard coded password and hard coded roles goes like this:&lt;br /&gt;
&lt;pre&gt;&amp;lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
       xmlns:sec=&quot;http://www.springframework.org/schema/security&quot;
       xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
    &quot;&amp;gt;

    &amp;lt;sec:http auto-config=&quot;true&quot;&amp;gt;
        &amp;lt;sec:intercept-url pattern=&quot;/*&quot; access=&quot;ROLE_USER&quot; /&amp;gt;
    &amp;lt;/sec:http&amp;gt;

    &amp;lt;sec:authentication-manager alias=&quot;authenticationManager&quot;&amp;gt;
        &amp;lt;sec:authentication-provider&amp;gt;
                &amp;lt;sec:user-service&amp;gt;
                    &amp;lt;sec:user authorities=&quot;ROLE_USER&quot;
                        name=&quot;jim&quot; password=&quot;morisson&quot;/&amp;gt;
                    &amp;lt;sec:user authorities=&quot;ROLE_USER,ROLE_OPERATOR&quot;
                        name=&quot;stevie&quot; password=&quot;vaughan&quot;/&amp;gt;
                    &amp;lt;sec:user authorities=&quot;ROLE_USER,ROLE_OPERATOR,ROLE_DEPLOYMENT_ENGINEER&quot;
                        name=&quot;brian&quot; password=&quot;jones&quot;/&amp;gt;
                &amp;lt;/sec:user-service&amp;gt;
        &amp;lt;/sec:authentication-provider&amp;gt;
    &amp;lt;/sec:authentication-manager&amp;gt;
&amp;lt;/beans&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
According to the documentation, all you need to do to enable the &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@PreAuthorize&lt;/span&gt; annotation is adding &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;sec:global-method-security pre-post-annotations=&quot;enabled&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
So I did, but the authorization checks did not kick in at all.&lt;br /&gt;
I have been struggling with this for a while until I stumbled over &lt;a href=&quot;http://stackoverflow.com/questions/3087548/can-spring-security-use-preauthorize-on-spring-controllers-methods&quot;&gt;this post on stackoverflow&lt;/a&gt;. The solution is as simple as it is strange, I only needed to move the line &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;sec:global-method-security pre-post-annotations=&quot;enabled&quot;/&amp;gt;&lt;/span&gt; from the security-context.xml to the dispatcher-servlet.xml. Nowhere else can I find this suggestion, even in &lt;a href=&quot;http://www.packtpub.com/spring-security-3/book&quot;&gt;Peter Mularien&#39;s book&lt;/a&gt; its written as:&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Instructing Spring Security to use method annotations&lt;/span&gt;&lt;br /&gt;
We&#39;ll also need to make a one-time change to dogstore-security.xml, where we&#39;ve got the rest of our Spring Security configuration. Simply add the following element right before the &amp;lt;http&amp;gt; declaration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;global-method-security pre-post-annotations=&quot;enabled&quot;/&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;
It seems that the above declaration registers a bean post-processor that is applied to the context in which it is declared, that means that declaring it in the security context, the post-processor is not applied to beans declared in the web context.</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/4348596987531287009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/4348596987531287009?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/4348596987531287009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/4348596987531287009'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2011/04/fine-grained-authorization-with-spring.html' title='Fine grained authorization with Spring Security 3'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-320940001873279108</id><published>2011-02-02T12:02:00.001+01:00</published><updated>2015-06-09T07:43:19.143+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mocking"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit tests"/><title type='text'>Create mock objects in spring configuration</title><content type='html'>In case you ever need to supply a mock object in spring configuration, here&#39;s a snippet that does just that:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&amp;lt;!-- Define the Mockito class as factory for creating the mock --&amp;gt;&lt;br /&gt;
&amp;lt;bean id=&quot;restTemplate&quot; class=&quot;org.mockito.Mockito&quot; factory-method=&quot;mock&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;!-- The constructor contains the full name of the class being mocked --&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;constructor-arg value=&quot;org.springframework.web.client.RestTemplate&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/bean&amp;gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The defined restTemplate bean can be be referenced in other bean definitions, for instance the object under test.</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/320940001873279108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/320940001873279108?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/320940001873279108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/320940001873279108'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2011/02/create-mock-objects-in-spring.html' title='Create mock objects in spring configuration'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-1748367833747255615</id><published>2010-08-11T09:17:00.003+02:00</published><updated>2015-06-09T07:42:46.185+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mocking"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit tests"/><title type='text'>How to test a class that directly uses java.rmi.Naming</title><content type='html'>While in the process of doing a handover of a project, some pieces of the projects source do not comply with the code standard. In this holiday season the original developer wasn&#39;t available, so I made my sleeves wet and hands dirty again, and started fixing it.&lt;br /&gt;&lt;br /&gt;The major thing the code lacked was a proper unit test with coverage higher than 80%, well it didn&#39;t have a unit test at all.&lt;br /&gt;Adding a unit test normally is not a big deal, but in this case, the class, a simple servlet that connects to a remote RMI object and calls a status method on it, directly uses &lt;code&gt;java.rmi.Naming&lt;/code&gt;.&lt;br /&gt;&lt;code&gt;java.rmi.Naming&lt;/code&gt; is notorious for its static methods, which are hard to mock when unit testing.&lt;br /&gt;There are great products out there, like &lt;a href=&quot;http://code.google.com/p/powermock/&quot;&gt;powermock&lt;/a&gt; that can actually mock static methods, but not in &lt;a href=&quot;http://blog.jayway.com/2009/05/17/mocking-static-methods-in-java-system-classes/&quot;&gt;system classes&lt;/a&gt;.&lt;br /&gt;I could change the servlet code and provide a wrapper around accessing the &lt;code&gt;java.rmi.Naming&lt;/code&gt; class, but I didn&#39;t want to change the code.&lt;br /&gt;&lt;br /&gt;Instead I chose to not mock &lt;code&gt;java.rmi.Naming&lt;/code&gt;, but instead just create my own instance:&lt;br /&gt;&lt;pre&gt;@BeforeClass&lt;br /&gt;public static void initNamingRegistry() throws RemoteException {&lt;br /&gt;   // Create a local registry with an arbitrary port number&lt;br /&gt;   rmiRegistry = LocateRegistry.createRegistry(9901);&lt;br /&gt;&lt;/pre&gt;This registry is alive and kickin&#39; during the execution of my test suite, so I can now register the mock object that implements the remote business interface:&lt;br /&gt;&lt;pre&gt;@Before&lt;br /&gt;public void registerRemoteMock() throws Exception {&lt;br /&gt;   // Register the mock of the remote business object&lt;br /&gt;   rmiRegistry.bind(&quot;testName&quot;, remoteMock);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Then the actual servlet method can bet tested:&lt;br /&gt;&lt;pre&gt;@Test&lt;br /&gt;public void testSomeBehaviour()&lt;br /&gt;  // Prepare the mocks&lt;br /&gt;  when(requestMock.getParameter(&quot;name&quot;).thenReturn(&quot;val&quot;);&lt;br /&gt;  ...&lt;br /&gt;  // Call the test method&lt;br /&gt;  testObject.doGet(requestMock, responseMock);&lt;br /&gt;  &lt;br /&gt;  // Verify the calls if needed&lt;br /&gt;  verify(remoteMock).doIt();&lt;br /&gt;&lt;/pre&gt;Nice, clean and simple!</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/1748367833747255615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/1748367833747255615?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/1748367833747255615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/1748367833747255615'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2010/08/how-to-test-class-that-directly-uses.html' title='How to test a class that directly uses java.rmi.Naming'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-6849994450419864190</id><published>2008-06-26T11:06:00.001+02:00</published><updated>2008-06-26T11:06:29.131+02:00</updated><title type='text'>Passed !!</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;Grade:      P&lt;br/&gt;Score:     75&lt;br/&gt;Comment:     This report shows the total points that could have been awarded in each section and the actual amount of points you were awarded. This information is provided in order to give you feedback on your relative strengths on a section basis. The maximum number of points you could have received is 100, minimum to pass is 70. &lt;br/&gt;&lt;br/&gt;Class Diagram (44 maximum) .......................... 31&lt;br/&gt;Component Diagram (44 maximum) ...................... 32&lt;br/&gt;Sequence/Collaboration Diagrams (12 maximum) ........ 12 &lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/6849994450419864190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/6849994450419864190?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/6849994450419864190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/6849994450419864190'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2008/06/passed.html' title='Passed !!'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-1043501631274398412</id><published>2008-06-17T21:35:00.002+02:00</published><updated>2008-06-17T21:38:08.185+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2EE"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="SCEA"/><title type='text'>SCEA part III</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;As we say in holland, &quot;the bullit has gone through the church&quot;, altough we usually say it in Dutch like: &quot;De kogel is door de kerk&quot;, which means something like I have finally done it...&lt;br /&gt;Last week Sunday I&#39;ve uploaded my assignment, and today I took me essay exams.&lt;br /&gt;&lt;br /&gt;So now its waiting, and waiting...&lt;br /&gt;Until the results are published.&lt;br /&gt;&lt;br /&gt;Keep you posted.&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/1043501631274398412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/1043501631274398412?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/1043501631274398412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/1043501631274398412'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2008/06/scea-part-iii.html' title='SCEA part III'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-24215423295915468</id><published>2008-03-10T15:21:00.001+01:00</published><updated>2008-03-10T15:21:23.243+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="NotSerializableException"/><title type='text'>java.io.NotSerializableException</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;I can&#39;t fully dedicate my time to the SCEA assignment, I am also fulltime working on projects.&lt;br/&gt;Today I ran into a java.io.NotSerializableException. &lt;br/&gt;The stack trace is not at all helpfull, it just says &quot;Caused by: java.io.NotSerializableException: foo.bar.FooBar.&quot;&lt;br/&gt;While I am sure that foo.bar.FooBar implements java.io.Serializable.&lt;br/&gt;I checked all the class members and marked some of the members transient (log4j Logger), but still the thing is popping up.&lt;br/&gt;&lt;br/&gt;Googling for that exception showed &lt;a href=&#39;http://herebebeasties.com/2007-02-08/javaionotserializableexception-in-your-httpsession/&#39;&gt;this blog post&lt;/a&gt;. As it appeared, their first attempt wasn&#39;t very useful, although the idea looked promising.&lt;br/&gt;Their DebugObjectOutputStream doesn&#39;t handle private fields, and can&#39;t cope with inheritance.&lt;br/&gt;These issues seem to have been resolved in the wicked code itself, but that is a bit too harsh to just get &lt;br/&gt;&lt;br/&gt;Browsing the comments posted underneath the post showed a link to &lt;a href=&#39;http://crazybob.org/2007/02/debugging-serialization.html&#39;&gt;Bob Lee&#39;s&lt;/a&gt; blog where he tackles the same problem.&lt;br/&gt;Although the output generated by his solution isn&#39;t as verbose as the other one, it does give the expected results.&lt;br/&gt;This showed me that I missed out on some of the fields.&lt;br/&gt;Great help. Thanks Bob.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/24215423295915468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/24215423295915468?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/24215423295915468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/24215423295915468'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2008/03/javaionotserializableexception.html' title='java.io.NotSerializableException'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-3700177961588271498</id><published>2008-02-12T12:53:00.001+01:00</published><updated>2008-02-12T13:01:04.533+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2EE"/><category scheme="http://www.blogger.com/atom/ns#" term="javaranch"/><category scheme="http://www.blogger.com/atom/ns#" term="SCEA"/><category scheme="http://www.blogger.com/atom/ns#" term="UML 2.0"/><title type='text'>Creating sequence diagrams</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;The sequence diagrams are getting complicated.&lt;br /&gt;I am now looking at the benefits that UML 2.0 can bring us in reducing the complexity.&lt;br /&gt;I mean I started off modelling the sequence diagram for the prepare itinerary use case and ended up with a diagram that didn&#39;t fit on the screen any more, and I didn&#39;t even modelled the business functionality yet, I stopped at the business delegate.&lt;br /&gt;So looking at the new elements in UML 2.0 I found the Interaction Overview diagrams useful for splitting the complex sequence diagram into smaller more usable chunks.&lt;br /&gt;I&#39;d like to soon finish the sequence diagram for this first, but major, use case and then start modelling the class diagram.&lt;br /&gt;When that has been done, most likely I will need to correct my sequence diagrams again to reflect corrected flaws discovered when doing the class diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the mean time I am having a great discussion on &lt;a href=&quot;http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;amp;f=26&amp;amp;t=007507&quot;&gt;javaranch&lt;/a&gt; about a discrepancy in the requirements. The prepare itinerary scenario mentions alternative flights within one hour and less than the selected, while in the given interview with CEO and CIO the flights have a flat price per destination, per seat class. &lt;a href=&quot;http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;amp;f=26&amp;amp;t=007520&quot;&gt;Another thread&lt;/a&gt; on javaranch discusses the difference (or lack off) between flight and segment.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Speeking with UB40: both these discussions give me quite some &lt;a href=&quot;http://ub40.popbang.co.uk/&quot;&gt;food for thought&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/3700177961588271498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/3700177961588271498?isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/3700177961588271498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/3700177961588271498'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2008/02/creating-sequence-diagrams.html' title='Creating sequence diagrams'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-1932587551903745035</id><published>2008-01-28T23:04:00.001+01:00</published><updated>2008-01-29T13:24:46.385+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2EE"/><category scheme="http://www.blogger.com/atom/ns#" term="SCEA"/><category scheme="http://www.blogger.com/atom/ns#" term="UML"/><title type='text'>Going thru the requirements</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;I have some problems getting myself up to speed on this assignment. I can blame lots of things like work load, my wife and children needing atention, but in the end I can only just blame myself. It seems to be hard just starting on it.&lt;br /&gt;But allright finally I started really reading the requirements specs a couple of times.&lt;br /&gt;Going thru them I wrote down the things that seemed unclear.&lt;br /&gt;&lt;br /&gt;Then going over the scenario&#39;s given, I started out in writing down the entities I discovered in there, these are possible classes and/or attributes.&lt;br /&gt;&lt;br /&gt;Now I am working on the creation of the sequence diagrams based on the scenraio&#39;s this will also result in class diagrams.&lt;br /&gt;&lt;br /&gt;Well I just must make sure that I keep this up and continue...&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/1932587551903745035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/1932587551903745035?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/1932587551903745035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/1932587551903745035'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2008/01/going-thru-requirements.html' title='Going thru the requirements'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-7791926304633036800</id><published>2008-01-21T09:20:00.001+01:00</published><updated>2008-01-22T07:42:08.145+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SCEA"/><category scheme="http://www.blogger.com/atom/ns#" term="UML"/><title type='text'>Using stereotypes to describe J2EE components</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;For the SCEA assignment the architecture needs to be documented using UML.&lt;br/&gt;Most architectures will have J2EE components like EJB&#39;s or servlets.&lt;br/&gt;When these are documented you can opt to fully document each EJB, meaning adding all interfaces as separate elements on a class diagram, and incorporating the complete message flow in sequence diagrams containing all standard EJB message calls, like ejbCreate, etc.&lt;br/&gt;I think that documenting the design and architecture in such a way will clutter the diagrams too much, thereby making the design/architecture harder to read.&lt;br/&gt;&lt;br/&gt;Simplifying the diagrams by adding stereotypes to these elements, like &amp;amp;lt;ejb&amp;amp;gt; makes reading the the design/architecture easier and keeps the focus on the essential parts.&lt;br/&gt;&lt;br/&gt;Sun has &lt;a href=&#39;http://java.sun.com/developer/technicalArticles/J2EE/patterns/UseOfUML.html&#39;&gt;documented some annotations they use in their pattern catalog&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;In addition to these stereotypes I will add Stateless/Stateful to designate the different session beans when needed, and maybe come up with some additional stereotypes when necessary.&lt;br/&gt;&lt;a href=&#39;http://java.sun.com/developer/technicalArticles/J2EE/patterns/UseOfUML.html&#39;&gt;&lt;br/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/7791926304633036800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/7791926304633036800?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/7791926304633036800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/7791926304633036800'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2008/01/using-stereotypes-to-describe-j2ee.html' title='Using stereotypes to describe J2EE components'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-4137691629949060952</id><published>2008-01-17T09:10:00.001+01:00</published><updated>2008-01-17T09:10:24.051+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Keyboard"/><category scheme="http://www.blogger.com/atom/ns#" term="nb60"/><category scheme="http://www.blogger.com/atom/ns#" term="Netbeans"/><category scheme="http://www.blogger.com/atom/ns#" term="Shortcut"/><title type='text'>Netbeans 6.0 Keyboard shortcuts</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;I am trying to switch from eclipse to Netbeans when doing some Java coding.&lt;br/&gt;The biggest problem that came up is the keyboard shortcuts, obviously they all differ, so I miss the ones I learned to love and use a lot in eclipse, like pressing Ctrl-1, in eclipse this opens an assistant that helps you resolve compilation problems.&lt;br/&gt;&lt;br/&gt;I found a &lt;a href=&#39;http://www.javalobby.org/java/forums/t102769.html&#39;&gt;link &lt;/a&gt;that at least shows some of the shortcuts, and &lt;a href=&#39;http://javahowto.blogspot.com/2006/06/netbeans-keyboard-shortcuts-on.html&#39;&gt;one&lt;/a&gt; that describes where to find a keyboard shortcut list in the netbeans installation. The shortcuts.pdf file also contains a link to a &lt;a href=&#39;http://wiki.netbeans.org/wiki/view/KeymapProfileFor60&#39;&gt;wiki&lt;/a&gt; page that describes the keyboard shortcuts specification.&lt;br/&gt;&lt;br/&gt;From the wiki page I learned that the shortcut I so desperately need is Alt + Enter, as explained in the &#39;Coding in Java&#39; section under &#39;Show suggestion/Tip/Hint&#39;.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/4137691629949060952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/4137691629949060952?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/4137691629949060952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/4137691629949060952'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2008/01/netbeans-60-keyboard-shortcuts.html' title='Netbeans 6.0 Keyboard shortcuts'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-821402391118773614</id><published>2008-01-02T21:28:00.001+01:00</published><updated>2008-01-22T07:42:08.145+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SCEA"/><category scheme="http://www.blogger.com/atom/ns#" term="UML"/><title type='text'>SCEA Part I</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;On December 14th I passed for the first part of the Sun Certified Enterprise Architect exam (SCEA), with a score of 93%.&lt;br /&gt;Immediately after this multiple choice exam I registered for its follow-up: the assignment.&lt;br /&gt;The assignment consists of some requirements, a business domain model and use cases for a flight booking system for the airliner &lt;i&gt;Fly By Night&lt;/i&gt;. Due to the non diclosure agreement I have signed when registering for the assignment, I cannot write about the assignment and my solution in much detail, but I will try to keep a record of my doings here on the blog from now on.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/821402391118773614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/821402391118773614?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/821402391118773614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/821402391118773614'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2008/01/scea-part-i.html' title='SCEA Part I'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-4028672591269706247</id><published>2007-10-05T10:25:00.001+02:00</published><updated>2015-06-09T07:43:19.146+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Spring"/><title type='text'>Using spring&amp;#39;s webflow package</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;As an architect I get a lot of challenging questions.&lt;br/&gt;Like this week, a team of the company I am currently working for needs to migrate a number of simple applications written in PHP to a J2EE environment.&lt;br/&gt;In addition to this, the first release will run as standalone web applications while in the (near) future they need to be incorporated into the soon to be released company web portal.&lt;br/&gt;So I needed to come up with a way that simplifies the transition of a web application into a portlet application.&lt;br/&gt;Since almost any web application can be in different states, as is the case with these applications, I thought of &lt;a href=&#39;http://www.springframework.org/webflow&#39;&gt;Spring&#39;s webflow&lt;/a&gt; package.&lt;br/&gt;Spring&#39;s webflow uses either &lt;a href=&#39;http://www.springframework.org/docs/reference/mvc.html&#39;&gt;Spring Web MVC&lt;/a&gt; or &lt;a href=&#39;http://www.springframework.org/docs/reference/portlet.html&#39;&gt;Spring Portlet MVC&lt;/a&gt; underneath, so is it possible to easily swap either of them without changing the code?&lt;br/&gt;&lt;br/&gt;Let&#39;s find out...&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/4028672591269706247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/4028672591269706247?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/4028672591269706247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/4028672591269706247'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2007/10/using-spring-webflow-package.html' title='Using spring&amp;#39;s webflow package'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-7352661125390202722</id><published>2007-09-26T09:38:00.003+02:00</published><updated>2008-01-22T07:44:36.934+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Conventions"/><title type='text'>Java coding tips</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;This page, &lt;a href=&#39;http://www.javalobby.org/java/forums/t101755.html&#39;&gt;7 Top Tips for Quality Java Software&lt;/a&gt;, contains some really useful tips. Although most of it seems common sense to me, it did reactivate the associated neurons in my brain.&lt;br/&gt;Good piece Jason!&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/7352661125390202722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/7352661125390202722?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/7352661125390202722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/7352661125390202722'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2007/09/java-coding-tips.html' title='Java coding tips'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-5589524034903793692</id><published>2007-07-16T08:56:00.001+02:00</published><updated>2008-12-10T03:09:29.224+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="CMS"/><title type='text'>Using Alfresco&amp;#39;s WCM</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;Alfresco is supplying a nicely looking &lt;a href=&quot;http://puzzle.dl.sourceforge.net/sourceforge/alfresco/WCM_Eval_Guide2.0.pdf&quot;&gt;evaluation&lt;/a&gt; guide for using their Web Content Management package.&lt;br /&gt;After briefly giving an overview of the Web Content Management Package, a scenario can be followed along while reading.&lt;br /&gt;The scenario describes using Alfresco WCM with a couple of different users, each having a different role in the system.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi914S38nsRzEultmxr11Zj_Ub3MKbjoQRdA3jEnPlO8kAFSTCmRGhkF-Z4zUwu0SGmjm0nBWqTNFtA7M5_kZC_bVRF72Vqrqi1Zms-I84DuqevAUjc-yqKckgRG0vYVd8KJai6ug/s1600-h/ExpandFolderNPE.png&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: right; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi914S38nsRzEultmxr11Zj_Ub3MKbjoQRdA3jEnPlO8kAFSTCmRGhkF-Z4zUwu0SGmjm0nBWqTNFtA7M5_kZC_bVRF72Vqrqi1Zms-I84DuqevAUjc-yqKckgRG0vYVd8KJai6ug/s320/ExpandFolderNPE.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5087685357554041250&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;I followed this scenario from creating new users and assigning roles to them, creating a new web project, creating new web forms for the project, etc. until I came to the point of creating new web content. When trying expand the list of web forms next to my sandbox, I stumbled into a NullPointerException:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;So a good citizen of the open source world, I immediately went to Alfresco&#39;s issue tracker and found a report about this issue (&lt;a href=&quot;http://issues.alfresco.com/browse/WCM-486&quot;&gt;WCM-486&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sadly this prevents me from finishing the scenario, So today I will see if the issue report can help me fix this on my system.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/5589524034903793692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/5589524034903793692?isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/5589524034903793692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/5589524034903793692'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2007/07/using-alfresco-wcm.html' title='Using Alfresco&amp;#39;s WCM'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi914S38nsRzEultmxr11Zj_Ub3MKbjoQRdA3jEnPlO8kAFSTCmRGhkF-Z4zUwu0SGmjm0nBWqTNFtA7M5_kZC_bVRF72Vqrqi1Zms-I84DuqevAUjc-yqKckgRG0vYVd8KJai6ug/s72-c/ExpandFolderNPE.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-5768264143913978094</id><published>2007-07-12T16:06:00.001+02:00</published><updated>2008-01-22T07:42:33.804+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="CMS"/><title type='text'>How to setup a WCMS</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;OK I am going to try to setup alfresco 2.0 WCM on &lt;a href=&quot;http://labs.jboss.com/jbossas&quot;&gt;JBoss AS&lt;/a&gt; using &lt;a href=&quot;http://www.hsqldb.org/&quot;&gt;Hypersonic SQL&lt;/a&gt; as database.&lt;br /&gt;I am using HSQL because the can easily be zipped and distributed to fellow developers.&lt;br /&gt;&lt;br /&gt;As usual I&#39;ll first create a dedicated server configuration and name it alfresco20, this instance can be started using &amp;lt;jboss-root&amp;gt;/bin/run.sh -c alfresco20.&lt;br /&gt;&lt;br /&gt;Upfront I know that the alfresco.war must be deployed exploded in JBoss. So the war file is unzipped into &amp;lt;jboss-root&amp;gt;/server/alfresco20/deploy/alfresco.war.&lt;br /&gt;&lt;br /&gt;Two issue&#39;s arise immediately:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://www.alfresco.com/&quot;&gt;Alfresco&lt;/a&gt; has a version of log4j packaged in the war, this generates &lt;a href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html&quot;&gt;ClassCastExceptions&lt;/a&gt;, so the log4j is removed from alfresco.war/WEB-INF/lib.&lt;/li&gt;&lt;li&gt;The log4j configuration in JBoss lacks a root logger, and alfresco generates a lot log messages, so I opened &amp;lt;jboss-root&amp;gt;/server/alfresco20/conf/log4j.xml, and added &amp;lt;level value=&quot;warn&quot;/&amp;gt; to the &amp;lt;root&amp;gt; element.&lt;/li&gt;&lt;/ol&gt;Configuring HSQL as database for alfresco is properly documented at the &lt;a href=&quot;http://wiki.alfresco.com/wiki/Database_Configuration#Hypersonic_SQL_Databases&quot;&gt;alfresco wiki&lt;/a&gt;, I know because I did it myself ;-)&lt;br /&gt;&lt;br /&gt;When starting JBoss, after quite a while and a lot of warn and info log messages on the console, the server is started. Checking the base functionality at http://localhost:8080/alfresco shows the login page.&lt;br /&gt;But this merrily is alfresco&#39;s CMS not the WCM version, so stop the server again, either via the jmx-console or using Ctrl-C.&lt;br /&gt;According to the readme that comes with alfresco&#39;s WCM, the wcm-bootstrap-context.xml file needs to be placed in the &amp;lt;jboss-root&amp;gt;/server/alfresco20/conf/alfresco/extension directory.&lt;br /&gt;&lt;br /&gt;That should be it, unless the website preview feature is needed. For now lets first try if this works as suggested. After starting JBoss again using the above command, the server starts without a problem, and when browsing to the alfresco page, I get presented with the login screen. So the JBoss server appears to be working fine.&lt;br /&gt;Now lets start the virtualization server.&lt;br /&gt;&lt;br /&gt;Out of the box, the virtualization server did not need any configuration and it started without any problem. Great.&lt;br /&gt;&lt;br /&gt;Now I want to evaluate the functionality supplied, but that&#39;ll have to wait till next time.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/5768264143913978094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/5768264143913978094?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/5768264143913978094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/5768264143913978094'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2007/07/how-to-setup-wcms.html' title='How to setup a WCMS'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-1076317525734903351</id><published>2007-07-11T07:50:00.001+02:00</published><updated>2008-01-22T07:42:33.804+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="CMS"/><title type='text'>Alfresco Content Package</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;One of my colleague suggested to look at &lt;a href=&quot;http://wiki.alfresco.com/wiki/Export_and_Import#Alfresco_Content_Package_.28ACP.29_File_Format&quot;&gt;ACP&lt;/a&gt;, Alfresco&#39;s content package. This could be useful in the publication of content from one repository into the other, but we have a JCR compliant repository on the published end, not necessarily an Alfresco repository.&lt;br /&gt;&lt;br /&gt;An ACP package is a zipped directory structure, that has the extension &#39;.acp&#39;.&lt;br /&gt;When doing an export, an acp file is created inside alfresco itself, in a space that can be arbitrarily chosen.&lt;br /&gt;Besides the target space, the package name must be provided.&lt;br /&gt;The acp file, assuming package as package name, has the following structure:&lt;br /&gt;&lt;pre&gt;/package.xml&lt;br /&gt;/package&lt;br /&gt;     /content0.html&lt;br /&gt;     /content1.pdf&lt;br /&gt;     /content2.jpg&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The package.xml has a proprietary XML structure and looks like:&lt;br /&gt;&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;view:view xmlns:view=&quot;http://www.alfresco.org/view/repository/1.0&quot;&amp;gt;&lt;br /&gt;&amp;lt;view:metadata&amp;gt;&lt;br /&gt; &amp;lt;view:exportBy&amp;gt;admin&amp;lt;/view:exportBy&amp;gt;&lt;br /&gt; &amp;lt;view:exportDate&amp;gt;2007-07-10T13:45:02.277+02:00&amp;lt;/view:exportDate&amp;gt;&lt;br /&gt; &amp;lt;view:exporterVersion&amp;gt;2.0.0 (build-185)&amp;lt;/view:exporterVersion&amp;gt;&lt;br /&gt; &amp;lt;view:exportOf&amp;gt;/app:company_home/cm:Books&amp;lt;/view:exportOf&amp;gt;&lt;br /&gt;&amp;lt;/view:metadata&amp;gt;&lt;br /&gt;&amp;lt;cm:content xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot; xmlns:alf=&quot;http://www.alfresco.org&quot; xmlns:d=&quot;http://www.alfresco.org/model/dictionary/1.0&quot; xmlns:view=&quot;http://www.alfresco.org/view/repository/1.0&quot; xmlns:act=&quot;http://www.alfresco.org/model/action/1.0&quot; xmlns:wf=&quot;http://www.alfresco.org/model/workflow/1.0&quot; xmlns:app=&quot;http://www.alfresco.org/model/application/1.0&quot; xmlns:ver=&quot;http://www.alfresco.org/model/versionstore/1.0&quot; xmlns:usr=&quot;http://www.alfresco.org/model/user/1.0&quot; xmlns:cm=&quot;http://www.alfresco.org/model/content/1.0&quot; xmlns:sv=&quot;http://www.jcp.org/jcr/sv/1.0&quot; xmlns:mix=&quot;http://www.jcp.org/jcr/mix/1.0&quot; xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot; xmlns:wcm=&quot;http://www.alfresco.org/model/wcmmodel/1.0&quot; xmlns:wca=&quot;http://www.alfresco.org/model/wcmappmodel/1.0&quot; xmlns:sys=&quot;http://www.alfresco.org/model/system/1.0&quot; xmlns:wcmwf=&quot;http://www.alfresco.org/model/wcmworkflow/1.0&quot; xmlns:rule=&quot;http://www.alfresco.org/model/rule/1.0&quot; xmlns:fm=&quot;http://www.alfresco.org/model/forum/1.0&quot; xmlns:bpm=&quot;http://www.alfresco.org/model/bpm/1.0&quot; xmlns:custom=&quot;custom.model&quot; xmlns=&quot;&quot; view:childName=&quot;cm:index.html&quot;&amp;gt;&lt;br /&gt; &amp;lt;view:aspects&amp;gt;&lt;br /&gt;   &amp;lt;cm:titled&amp;gt;&amp;lt;/cm:titled&amp;gt;&lt;br /&gt;   &amp;lt;cm:auditable&amp;gt;&amp;lt;/cm:auditable&amp;gt;&lt;br /&gt;   &amp;lt;sys:referenceable&amp;gt;&amp;lt;/sys:referenceable&amp;gt;&lt;br /&gt;   &amp;lt;cm:author&amp;gt;&amp;lt;/cm:author&amp;gt;&lt;br /&gt;   &amp;lt;app:inlineeditable&amp;gt;&amp;lt;/app:inlineeditable&amp;gt;&lt;br /&gt; &amp;lt;/view:aspects&amp;gt;&lt;br /&gt; &amp;lt;view:properties&amp;gt;&lt;br /&gt;   &amp;lt;app:editInline&amp;gt;true&amp;lt;/app:editInline&amp;gt;&lt;br /&gt;   &amp;lt;cm:description&amp;gt;Index page for books&amp;lt;/cm:description&amp;gt;&lt;br /&gt;   &amp;lt;sys:node-uuid&amp;gt;59d1c1dc-2e12-11dc-8613-e518334e1caa&amp;lt;/sys:node-uuid&amp;gt;&lt;br /&gt;   &amp;lt;sys:node-dbid&amp;gt;397&amp;lt;/sys:node-dbid&amp;gt;&lt;br /&gt;   &amp;lt;cm:content&amp;gt;contentUrl=backup\content0.html|mimetype=text/html|size=51|encoding=UTF-8|locale=nl_NL_&amp;lt;/cm:content&amp;gt;&lt;br /&gt;   &amp;lt;cm:title&amp;gt;Books&amp;lt;/cm:title&amp;gt;&lt;br /&gt;   &amp;lt;cm:author&amp;gt;Stephen King&amp;lt;/cm:author&amp;gt;&lt;br /&gt;   &amp;lt;cm:created&amp;gt;2007-07-09T13:48:46.673+02:00&amp;lt;/cm:created&amp;gt;&lt;br /&gt;   &amp;lt;cm:modifier&amp;gt;admin&amp;lt;/cm:modifier&amp;gt;&lt;br /&gt;   &amp;lt;cm:modified&amp;gt;2007-07-10T12:15:31.346+02:00&amp;lt;/cm:modified&amp;gt;&lt;br /&gt;   &amp;lt;cm:creator&amp;gt;admin&amp;lt;/cm:creator&amp;gt;&lt;br /&gt;   &amp;lt;sys:store-protocol&amp;gt;workspace&amp;lt;/sys:store-protocol&amp;gt;&lt;br /&gt;   &amp;lt;cm:name&amp;gt;index.html&amp;lt;/cm:name&amp;gt;&lt;br /&gt;   &amp;lt;sys:store-identifier&amp;gt;SpacesStore&amp;lt;/sys:store-identifier&amp;gt;&lt;br /&gt; &amp;lt;/view:properties&amp;gt;&lt;br /&gt; &amp;lt;view:associations&amp;gt;&amp;lt;/view:associations&amp;gt;&lt;br /&gt;&amp;lt;/cm:content&amp;gt;&lt;br /&gt;&amp;lt;cm:content xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot; xmlns:alf=&quot;http://www.alfresco.org&quot; xmlns:d=&quot;http://www.alfresco.org/model/dictionary/1.0&quot; xmlns:view=&quot;http://www.alfresco.org/view/repository/1.0&quot; xmlns:act=&quot;http://www.alfresco.org/model/action/1.0&quot; xmlns:wf=&quot;http://www.alfresco.org/model/workflow/1.0&quot; xmlns:app=&quot;http://www.alfresco.org/model/application/1.0&quot; xmlns:ver=&quot;http://www.alfresco.org/model/versionstore/1.0&quot; xmlns:usr=&quot;http://www.alfresco.org/model/user/1.0&quot; xmlns:cm=&quot;http://www.alfresco.org/model/content/1.0&quot; xmlns:sv=&quot;http://www.jcp.org/jcr/sv/1.0&quot; xmlns:mix=&quot;http://www.jcp.org/jcr/mix/1.0&quot; xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot; xmlns:wcm=&quot;http://www.alfresco.org/model/wcmmodel/1.0&quot; xmlns:wca=&quot;http://www.alfresco.org/model/wcmappmodel/1.0&quot; xmlns:sys=&quot;http://www.alfresco.org/model/system/1.0&quot; xmlns:wcmwf=&quot;http://www.alfresco.org/model/wcmworkflow/1.0&quot; xmlns:rule=&quot;http://www.alfresco.org/model/rule/1.0&quot; xmlns:fm=&quot;http://www.alfresco.org/model/forum/1.0&quot; xmlns:bpm=&quot;http://www.alfresco.org/model/bpm/1.0&quot; xmlns:custom=&quot;custom.model&quot; xmlns=&quot;&quot; view:childName=&quot;cm:DarkTower.pdf&quot;&amp;gt;&lt;br /&gt; &amp;lt;view:aspects&amp;gt;&lt;br /&gt;   &amp;lt;cm:auditable&amp;gt;&amp;lt;/cm:auditable&amp;gt;&lt;br /&gt;   &amp;lt;cm:titled&amp;gt;&amp;lt;/cm:titled&amp;gt;&lt;br /&gt;   &amp;lt;sys:referenceable&amp;gt;&amp;lt;/sys:referenceable&amp;gt;&lt;br /&gt;   &amp;lt;cm:author&amp;gt;&amp;lt;/cm:author&amp;gt;&lt;br /&gt; &amp;lt;/view:aspects&amp;gt;&lt;br /&gt; &amp;lt;view:properties&amp;gt;&lt;br /&gt;   &amp;lt;cm:description&amp;gt;&amp;lt;/cm:description&amp;gt;&lt;br /&gt;   &amp;lt;sys:node-uuid&amp;gt;c0db7bd5-2eda-11dc-96f5-878a8c8564f1&amp;lt;/sys:node-uuid&amp;gt;&lt;br /&gt;   &amp;lt;sys:node-dbid&amp;gt;404&amp;lt;/sys:node-dbid&amp;gt;&lt;br /&gt;   &amp;lt;cm:content&amp;gt;contentUrl=backup\content1.pdf|mimetype=application/pdf|size=1366321|encoding=UTF-8|locale=nl_NL_&amp;lt;/cm:content&amp;gt;&lt;br /&gt;   &amp;lt;cm:title&amp;gt;DarkTower.pdf&amp;lt;/cm:title&amp;gt;&lt;br /&gt;   &amp;lt;cm:author&amp;gt;Stephen King&amp;lt;/cm:author&amp;gt;&lt;br /&gt;   &amp;lt;cm:created&amp;gt;2007-07-10T13:43:18.809+02:00&amp;lt;/cm:created&amp;gt;&lt;br /&gt;   &amp;lt;cm:modifier&amp;gt;admin&amp;lt;/cm:modifier&amp;gt;&lt;br /&gt;   &amp;lt;cm:modified&amp;gt;2007-07-10T13:43:26.637+02:00&amp;lt;/cm:modified&amp;gt;&lt;br /&gt;   &amp;lt;cm:creator&amp;gt;admin&amp;lt;/cm:creator&amp;gt;&lt;br /&gt;   &amp;lt;sys:store-protocol&amp;gt;workspace&amp;lt;/sys:store-protocol&amp;gt;&lt;br /&gt;   &amp;lt;cm:name&amp;gt;DarkTower.pdf&amp;lt;/cm:name&amp;gt;&lt;br /&gt;   &amp;lt;sys:store-identifier&amp;gt;SpacesStore&amp;lt;/sys:store-identifier&amp;gt;&lt;br /&gt; &amp;lt;/view:properties&amp;gt;&lt;br /&gt; &amp;lt;view:associations&amp;gt;&amp;lt;/view:associations&amp;gt;&lt;br /&gt;&amp;lt;/cm:content&amp;gt;&lt;br /&gt;&amp;lt;cm:content xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot; xmlns:alf=&quot;http://www.alfresco.org&quot; xmlns:d=&quot;http://www.alfresco.org/model/dictionary/1.0&quot; xmlns:view=&quot;http://www.alfresco.org/view/repository/1.0&quot; xmlns:act=&quot;http://www.alfresco.org/model/action/1.0&quot; xmlns:wf=&quot;http://www.alfresco.org/model/workflow/1.0&quot; xmlns:app=&quot;http://www.alfresco.org/model/application/1.0&quot; xmlns:ver=&quot;http://www.alfresco.org/model/versionstore/1.0&quot; xmlns:usr=&quot;http://www.alfresco.org/model/user/1.0&quot; xmlns:cm=&quot;http://www.alfresco.org/model/content/1.0&quot; xmlns:sv=&quot;http://www.jcp.org/jcr/sv/1.0&quot; xmlns:mix=&quot;http://www.jcp.org/jcr/mix/1.0&quot; xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot; xmlns:wcm=&quot;http://www.alfresco.org/model/wcmmodel/1.0&quot; xmlns:wca=&quot;http://www.alfresco.org/model/wcmappmodel/1.0&quot; xmlns:sys=&quot;http://www.alfresco.org/model/system/1.0&quot; xmlns:wcmwf=&quot;http://www.alfresco.org/model/wcmworkflow/1.0&quot; xmlns:rule=&quot;http://www.alfresco.org/model/rule/1.0&quot; xmlns:fm=&quot;http://www.alfresco.org/model/forum/1.0&quot; xmlns:bpm=&quot;http://www.alfresco.org/model/bpm/1.0&quot; xmlns:custom=&quot;custom.model&quot; xmlns=&quot;&quot; view:childName=&quot;cm:Cover.jpg&quot;&amp;gt;&lt;br /&gt; &amp;lt;view:aspects&amp;gt;&lt;br /&gt;   &amp;lt;cm:auditable&amp;gt;&amp;lt;/cm:auditable&amp;gt;&lt;br /&gt;   &amp;lt;cm:titled&amp;gt;&amp;lt;/cm:titled&amp;gt;&lt;br /&gt;   &amp;lt;sys:referenceable&amp;gt;&amp;lt;/sys:referenceable&amp;gt;&lt;br /&gt;   &amp;lt;cm:author&amp;gt;&amp;lt;/cm:author&amp;gt;&lt;br /&gt; &amp;lt;/view:aspects&amp;gt;&lt;br /&gt; &amp;lt;view:properties&amp;gt;&lt;br /&gt;   &amp;lt;cm:description&amp;gt;&amp;lt;/cm:description&amp;gt;&lt;br /&gt;   &amp;lt;sys:node-uuid&amp;gt;cf782d38-2eda-11dc-96f5-878a8c8564f1&amp;lt;/sys:node-uuid&amp;gt;&lt;br /&gt;   &amp;lt;sys:node-dbid&amp;gt;405&amp;lt;/sys:node-dbid&amp;gt;&lt;br /&gt;   &amp;lt;cm:content&amp;gt;contentUrl=backup\content2.jpg|mimetype=image/jpeg|size=64599|encoding=UTF-8|locale=nl_NL_&amp;lt;/cm:content&amp;gt;&lt;br /&gt;   &amp;lt;cm:title&amp;gt;Cover.jpg&amp;lt;/cm:title&amp;gt;&lt;br /&gt;   &amp;lt;cm:author&amp;gt;Stephen King&amp;lt;/cm:author&amp;gt;&lt;br /&gt;   &amp;lt;cm:created&amp;gt;2007-07-10T13:43:43.309+02:00&amp;lt;/cm:created&amp;gt;&lt;br /&gt;   &amp;lt;cm:modifier&amp;gt;admin&amp;lt;/cm:modifier&amp;gt;&lt;br /&gt;   &amp;lt;cm:modified&amp;gt;2007-07-10T13:43:49.106+02:00&amp;lt;/cm:modified&amp;gt;&lt;br /&gt;   &amp;lt;cm:creator&amp;gt;admin&amp;lt;/cm:creator&amp;gt;&lt;br /&gt;   &amp;lt;sys:store-protocol&amp;gt;workspace&amp;lt;/sys:store-protocol&amp;gt;&lt;br /&gt;   &amp;lt;cm:name&amp;gt;Cover.jpg&amp;lt;/cm:name&amp;gt;&lt;br /&gt;   &amp;lt;sys:store-identifier&amp;gt;SpacesStore&amp;lt;/sys:store-identifier&amp;gt;&lt;br /&gt; &amp;lt;/view:properties&amp;gt;&lt;br /&gt; &amp;lt;view:associations&amp;gt;&amp;lt;/view:associations&amp;gt;&lt;br /&gt;&amp;lt;/cm:content&amp;gt;&lt;br /&gt;&amp;lt;/view:view&amp;gt;&lt;/pre&gt;&lt;br /&gt;This view does contain most of the information I need. The jcr system view as exported by alfresco, lacks the mime type, which &lt;b&gt;is&lt;/b&gt; included in alfresco&#39;s acp descriptor: &lt;pre&gt;&amp;lt;cm:content&amp;gt;contentUrl=backup\content2.jpg|&lt;b&gt;mimetype=image/jpeg&lt;/b&gt;|size=64599|encoding=UTF-8|locale=nl_NL_&amp;lt;/cm:content&amp;gt;&lt;/pre&gt;.&lt;br /&gt;&lt;br /&gt;Maybe I am overseeing something, but shouldn&#39;t the mime type info be part of JCR&#39;s system view as well?&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/1076317525734903351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/1076317525734903351?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/1076317525734903351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/1076317525734903351'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2007/07/alfresco-content-package.html' title='Alfresco Content Package'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6988195.post-8547790190630035825</id><published>2007-07-05T12:06:00.001+02:00</published><updated>2008-01-22T07:42:33.804+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="CMS"/><title type='text'>Custom JCR node types in Alfresco</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;With the document &lt;a href=&#39;http://ecmarchitect.com/archives/2007/06/09/756&#39;&gt;&quot;Working with Custom Content Types&quot;&lt;/a&gt; on my desk, I started to develop my own content model to be used in alfresco.&lt;br/&gt;Naive as I can be, I tried to convert the jackrabbit based cnd into alfresco&#39;s content definition. Obviously that failed, alfresco does not support multiple inheritance. Alright, that one can be circumvented.&lt;br/&gt;After deploying, correcting and re-deploying the model until satisfied, I tried to add the model to the web client user interface, but it was not accepted. It appears that if you want to expose your custom content model to the web client user interface, the defined types must extend cm:content or one of its descendants. Sadly this is not mentioned in the named document.&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marcels-javanotes.blogspot.com/feeds/8547790190630035825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6988195/8547790190630035825?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/8547790190630035825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6988195/posts/default/8547790190630035825'/><link rel='alternate' type='text/html' href='http://marcels-javanotes.blogspot.com/2007/07/custom-jcr-node-types-in-alfresco.html' title='Custom JCR node types in Alfresco'/><author><name>SpiderMars</name><uri>http://www.blogger.com/profile/14127963147847070570</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHh8Yl8vG6M0MT2-SVNAQXbZ7UVgH5plcRxOWaxjso4i2DGB2mENkURpgD-REWqLg3n74dO3FZXRUkRzoPn1_pzuFTABC2DFFd8U5lIZyXTzAR22LN1C7Gg-4Cs92u71E/s220/DukeWithBlackStratocaster-small.png'/></author><thr:total>0</thr:total></entry></feed>