<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Freya.no &#187; Java</title>
	<atom:link href="http://wp.freya.no/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://wp.freya.no</link>
	<description>Knowledge is power</description>
	<lastBuildDate>Mon, 06 Feb 2012 19:56:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Spring MVC: how to build a thread-safe Controller</title>
		<link>http://wp.freya.no/2012/02/spring-mvc-how-to-build-a-thread-safe-controller/</link>
		<comments>http://wp.freya.no/2012/02/spring-mvc-how-to-build-a-thread-safe-controller/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 14:24:28 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[safety]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[thread]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=1131</guid>
		<description><![CDATA[Controllers in Spring MVC are desined to be shared between requests. Each controller has a default singleton scope so if you are using controllers you neeed to be aware of that. The easiest way to make sure your controller is thread-safe is to not to have class variables. F.ex. this example from Spring MVC tutorial: [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Controllers in Spring MVC are desined to be shared between requests. Each controller has a default singleton scope so if you are using controllers you neeed to be aware of that. The easiest way to make sure your controller is thread-safe is to not to have class variables. F.ex. this example from <a href="http://static.springsource.org/spring/docs/2.5.x/reference/mvc.html#13.11.13">Spring MVC tutorial</a>:</p>
<pre class="brush: java; title: ; notranslate">
@Controller
@RequestMapping(&quot;/editPet.do&quot;)
public class EditPetForm {

    private final Clinic clinic;

    public EditPetForm(Clinic clinic) {
        this.clinic = clinic;
    }

    @RequestMapping(method = RequestMethod.GET)
    public String setupForm(@RequestParam(&quot;petId&quot;) int petId, ModelMap model) {
        Pet pet = this.clinic.loadPet(petId);
        model.addAttribute(&quot;pet&quot;, pet);
        return &quot;petForm&quot;;
    }

    @RequestMapping(method = RequestMethod.POST)
    public String processSubmit(
            @ModelAttribute(&quot;pet&quot;) Pet pet, BindingResult result, SessionStatus status) {

        new PetValidator().validate(pet, result);
        if (result.hasErrors()) {
            return &quot;petForm&quot;;
        }
        else {
            this.clinic.storePet(pet);
            status.setComplete();
            return &quot;redirect:owner.do?ownerId=&quot; + pet.getOwner().getId();
        }
    }
}
</pre>
<p>In this example we can have a serious issue regarding thread-safety: private variable clinic. If there will be a situation where to different requests access the controller simultaniously, one of them will instanciate the controller and begin to process a form, then the other one comes inn. The result from processing of the first request will be sent to the other one, thus the requests receive fail data or nothing.</p>
<p>The solution to the problem may be the following:<br />
1. Annotate Controller with @Scope(&#8220;request&#8221;) or @Scope(&#8220;session&#8221;)<br />
2. Move private variable into one of the methods or save it in session or model.</p>
 <img src="http://wp.freya.no/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1131" width="1" height="1" style="display: none;" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwp.freya.no%2F2012%2F02%2Fspring-mvc-how-to-build-a-thread-safe-controller%2F&amp;title=Spring%20MVC%3A%20how%20to%20build%20a%20thread-safe%20Controller" id="wpa2a_6"><img src="http://wp.freya.no/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2012/02/spring-mvc-how-to-build-a-thread-safe-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TDD (test-driven development) is Bullshit!</title>
		<link>http://wp.freya.no/2012/01/tdd-test-driven-development-is-bullshit/</link>
		<comments>http://wp.freya.no/2012/01/tdd-test-driven-development-is-bullshit/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 19:49:40 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[bullshit]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=1098</guid>
		<description><![CDATA[Well, maybe not in theory, but in practice &#8211; definitely. Test-drive development is a way to program where you write an automated unit test that fails first, then you write code and check that the test runs ok. Brilliant theory for an ideal world (doesn&#8217;t exist). In practice however it is very seldom that you [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Well, maybe not in <a href="http://en.wikipedia.org/wiki/Test-driven_development">theory</a>, but in practice &#8211; definitely.</p>
<p>Test-drive development is a way to program where you write an automated unit test that fails first, then you write code and check that the test runs ok. Brilliant theory for an ideal world (doesn&#8217;t exist). In practice however it is very seldom that you as a programmer have a full and clear understanding of what is it you are gonna do.</p>
<p>Of course I&#8217;m not talking about cases where you need to calculate the result of 2+2. Sure you can write a test case here.</p>
<p>And here comes a hard reality where you come to the real place, f.ex. a bank that needs a new program. And here you are with a task that states smth like this &#8220;Create a form that have these and these fields and calculates that and that&#8221;. You begin with a test case? You are right! That&#8217;s what happens if you do this: you kill several days  trying to understand how you build this test case, what fields you need to fill inn to calculate the result. If you&#8217;ll try to check a more specific result then you need several extra days to find a person who maybe knows how the value must be calculated.</p>
<p>Because it is very seldom in the real world that programmers work together with persons who both know and can explain to the programmer how the things should be done. Simply because those persons do not exist.</p>
<p>So you wrote the test and now you need to write a calculation algorithm&#8230; Hmm, how the hell do we do that? We start building it and magic happens! The algorithm that can calculate the value needs all totally different input values then those you&#8217;ve written in your test case&#8230; Ouch! It happened again?</p>
<p>At the end you&#8217;ve used double time to write the code and update the test case in parallel plus the time you&#8217;ve killed on the test at the beginning.</p>
<p>So why is it so popular to talk about it and constantly try to use it? Do not know. You need to write test cases when you program difficult logic. That is the fact. But doing it FIRST? It&#8217;s just a waste of time and killing of enthusiasm. You won&#8217;t be clever and you&#8217;ll not write better code if you kill time with the test first.</p>
<p>What really needs to be done before you start programming is to draw a solution.</p>
 <img src="http://wp.freya.no/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1098" width="1" height="1" style="display: none;" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwp.freya.no%2F2012%2F01%2Ftdd-test-driven-development-is-bullshit%2F&amp;title=TDD%20%28test-driven%20development%29%20is%20Bullshit%21" id="wpa2a_14"><img src="http://wp.freya.no/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2012/01/tdd-test-driven-development-is-bullshit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hibernate: how to enable show sql</title>
		<link>http://wp.freya.no/2011/09/hibernate-how-to-enable-show-sql/</link>
		<comments>http://wp.freya.no/2011/09/hibernate-how-to-enable-show-sql/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 12:44:19 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=1073</guid>
		<description><![CDATA[To see all the sqls that your application do during execution, insert the following property in your test xml property file: No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p>To see all the sqls that your application do during execution, insert the following property in your test xml property file:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;bean id=&quot;sessionFactory&quot;
		class=&quot;my.class.MyEntitySessionFactory&quot;&gt;
		&lt;property name=&quot;hibernateProperties&quot;&gt;
			&lt;props&gt;
				&lt;prop key=&quot;hibernate.show_sql&quot;&gt;true&lt;/prop&gt;
			&lt;/props&gt;
		&lt;/property&gt;
		&lt;property name=&quot;dataSource&quot; ref=&quot;dbDataSource&quot; /&gt;
&lt;/bean&gt;
</pre>
 <img src="http://wp.freya.no/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1073" width="1" height="1" style="display: none;" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwp.freya.no%2F2011%2F09%2Fhibernate-how-to-enable-show-sql%2F&amp;title=Hibernate%3A%20how%20to%20enable%20show%20sql" id="wpa2a_22"><img src="http://wp.freya.no/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2011/09/hibernate-how-to-enable-show-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t work too hard</title>
		<link>http://wp.freya.no/2011/09/dont-work-too-hard/</link>
		<comments>http://wp.freya.no/2011/09/dont-work-too-hard/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 15:37:51 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[strips]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=1067</guid>
		<description><![CDATA[Core: How do I make Hibernate to not to retreive all objects at the same time? Mag: Do i lazy. Silly: Yeah, don&#8217;t work too hard! No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p><embed src="http://tatyana.freya.no/Flash/progs2.swf" quality="high" scale="exactfit" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" height="400px" width="550px"></embed></p>
<blockquote><p>Core: How do I make Hibernate to not to retreive all objects at the same time?<br />
Mag: Do i lazy.<br />
Silly: Yeah, don&#8217;t work too hard!</p></blockquote>
 <img src="http://wp.freya.no/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1067" width="1" height="1" style="display: none;" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwp.freya.no%2F2011%2F09%2Fdont-work-too-hard%2F&amp;title=Don%26%238217%3Bt%20work%20too%20hard" id="wpa2a_30"><img src="http://wp.freya.no/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2011/09/dont-work-too-hard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The most annoying comment</title>
		<link>http://wp.freya.no/2011/08/the-most-annoying-comment/</link>
		<comments>http://wp.freya.no/2011/08/the-most-annoying-comment/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 13:27:18 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=1041</guid>
		<description><![CDATA[No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<pre class="brush: cpp; title: ; notranslate">/** @deprecated this one must be resolved differently */
@Deprecated
public void setModeChange()
{
   this.mode = Mode.CHANGE;
}</pre>
 <img src="http://wp.freya.no/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1041" width="1" height="1" style="display: none;" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwp.freya.no%2F2011%2F08%2Fthe-most-annoying-comment%2F&amp;title=The%20most%20annoying%20comment" id="wpa2a_38"><img src="http://wp.freya.no/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2011/08/the-most-annoying-comment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse autocomplete problem</title>
		<link>http://wp.freya.no/2011/02/eclipse-autocomplete-problem/</link>
		<comments>http://wp.freya.no/2011/02/eclipse-autocomplete-problem/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 14:17:44 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Tip]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=983</guid>
		<description><![CDATA[If an autocomplete stopped working go Window -&#62; Preferences -&#62; Java -&#62; Editor -&#62; Content Assist -&#62; Advanced -&#62;  check for &#8220;Other Java Proposals&#8221; No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p>If an autocomplete stopped working go</p>
<p>Window -&gt; Preferences -&gt; Java -&gt; Editor -&gt; Content Assist -&gt; Advanced -&gt;  check for &#8220;Other Java Proposals&#8221;</p>
 <img src="http://wp.freya.no/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=983" width="1" height="1" style="display: none;" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwp.freya.no%2F2011%2F02%2Feclipse-autocomplete-problem%2F&amp;title=Eclipse%20autocomplete%20problem" id="wpa2a_46"><img src="http://wp.freya.no/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2011/02/eclipse-autocomplete-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Return empty objects, not nulls</title>
		<link>http://wp.freya.no/2010/10/return-empty-objects-not-nulls/</link>
		<comments>http://wp.freya.no/2010/10/return-empty-objects-not-nulls/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 19:14:51 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=861</guid>
		<description><![CDATA[It&#8217;s uncommon to see methods like this> There is no reason to make a Person object where there are no persons found. But doing so requires extra code in the client to handle the null value. This becomes a problem if a client is, for example, a GUI: The result of such code in cases [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s uncommon to see methods like this></p>
<pre class="brush: java; title: ; notranslate">
public Person findPerson() {
   if(someService) [
     return someService.getPerson();
   }
   return null;
}
</pre>
<p>There is no reason to make a Person object where there are no persons found. But doing so requires extra code in the client to handle the null value. This becomes a problem if a client is, for example, a GUI:</p>
<pre class="brush: java; title: ; notranslate">
somePage.jsp
&lt;%
  ...
  Person person = myService.findPerson();
%&gt;
&lt;table&gt;
   &lt;tr&gt;
      &lt;td&gt;${person.name}&lt;/td&gt;
      &lt;td&gt;${person.address}&lt;/td&gt;
      &lt;td&gt;${person.numberOfPurchases}&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p>The result of such code in cases where the person cannot be found is Server error. So,<strong> there is no reason ever to return <em>null </em>from an object-valued method instead of returning an empty object.</strong> Especially if you deal with arrays and collections.</p>
 <img src="http://wp.freya.no/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=861" width="1" height="1" style="display: none;" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwp.freya.no%2F2010%2F10%2Freturn-empty-objects-not-nulls%2F&amp;title=Return%20empty%20objects%2C%20not%20nulls" id="wpa2a_54"><img src="http://wp.freya.no/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/10/return-empty-objects-not-nulls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prefer two-element enum types to boolean parameters</title>
		<link>http://wp.freya.no/2010/10/prefer-two-element-enum-types-to-boolean-parameters/</link>
		<comments>http://wp.freya.no/2010/10/prefer-two-element-enum-types-to-boolean-parameters/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 10:14:03 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=852</guid>
		<description><![CDATA[How many times we write a program like this: And so we hear from our sjef that we can&#8217;t have same salary for male and female. So we do this: Yes, but what if we have more options later on? Or if we look just at the doSmth() function? What do these true/false mean? An [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>How many times we write a program like this:</p>
<pre class="brush: java; title: ; notranslate">
public void doSmth() {
    Salary s = calculateSalary(Person p);
    ...
}

private Salary calculateSalary(Person p) {
   return 100;
}
</pre>
<p>And so we hear from our sjef that we can&#8217;t have same salary for male and female. So we do this:</p>
<pre class="brush: java; title: ; notranslate">
public void doSmth() {
    Salary male = calculateSalary(Person p, true);
    Salary female = calculateSalary(Person p, false);
    ...
}

private Salary calculateSalary(Person p, boolean sex) {
   if(sex) return 100;
   else return 50;
}
</pre>
<p>Yes, but what if we have more options later on? Or if we look just at the doSmth() function? What do these true/false mean? </p>
<p>An enum type in such cases makes your code easier to read and to write, especially if you are using an IDE that supports autocomplition. Also, it makes it easy to add more options later. </p>
<p>So here&#8217;s how we should do it:</p>
<pre class="brush: java; title: ; notranslate">
public enum Sex {MALE, FEMALE}

public void doSmth() {
    Salary male = calculateSalary(Person p, Sex.MALE);
    Salary female = calculateSalary(Person p, Sex.FEMALE);
    ...
}

private Salary calculateSalary(Person p, Sex sex) {
   if(sex.equals(Sex.MALE) return 100;
   else return 50;
}
</pre>
 <img src="http://wp.freya.no/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=852" width="1" height="1" style="display: none;" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwp.freya.no%2F2010%2F10%2Fprefer-two-element-enum-types-to-boolean-parameters%2F&amp;title=Prefer%20two-element%20enum%20types%20to%20boolean%20parameters" id="wpa2a_62"><img src="http://wp.freya.no/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/10/prefer-two-element-enum-types-to-boolean-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EJB 3.0 Roles</title>
		<link>http://wp.freya.no/2010/03/ejb-3-0-roles/</link>
		<comments>http://wp.freya.no/2010/03/ejb-3-0-roles/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 19:14:18 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[ejb]]></category>
		<category><![CDATA[ejb3]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=619</guid>
		<description><![CDATA[I had some difficult time understanding all the roles regarding EJB3. Here is an easy-to-remember description of these roles that I found here. Imagine a factory producing computers: Bean Provider: Chip manufacturer. On the chip, there will be a label with &#8220;Warranty void if removed&#8221; the chip has the logic and the label sets a [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I had some difficult time understanding all the roles regarding EJB3. Here is an easy-to-remember description of these roles that I found <a href="http://www.coderanch.com/t/485260/EJB-Certification-SCBCD/certification/EJB-roles">here</a>.</p>
<p>Imagine a factory producing computers:</p>
<p><strong>Bean Provider: </strong><br />
Chip manufacturer. On the chip, there will be a label with  &#8220;Warranty void if removed&#8221; the chip has the logic and the label sets a  Role. If you are not authorized to repair it, warranty voids. (i.e. you  cannot access the internal chip if you are not in the role of &#8220;Warranty  Repair Person&#8221;.)</p>
<p><strong>Application Assembler</strong><br />
Mainboard assembler. It takes various chips and puts them on the  mainboard. If any additional resistor or cable are required, it will put  everything togheter to have something that is some kind of working unit  but requires additional assembling.</p>
<p><strong>EJB Server Provider</strong><br />
The EJB Server provider is the Computer Case manufacturer providing  a case with a power supply. Is a container for the mainboard</p>
<p><strong>Deployer</strong><br />
As every computer case is different and power voltage vary country  by country, the Deployer makes sure to adapt the mainboard to the  working environment. In this case adjusts the Voltage on the power  supply, and connects the cables. At the same time he will define who are  the person allowed to repair it (i.e. provide a list of authorized  repair centers)</p>
<p><strong>Persistence Provider</strong><br />
the persistence provider could be the network card company that  provides the driver to connect to a network.</p>
<p><strong>System Administrator</strong><br />
Is the person in charge to install the operating system and do  necessary configuration changes to the OS to connect to the server, and  will make sure to monitor that everything is working fine.</p>
<p>More about Enterprise Java Beans 3.0 and Sun Certified Business Component Developer (SCBCD) certification <a href="http://tatyana.freya.no/scbcd/">here</a>.</p>
 <img src="http://wp.freya.no/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=619" width="1" height="1" style="display: none;" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwp.freya.no%2F2010%2F03%2Fejb-3-0-roles%2F&amp;title=EJB%203.0%20Roles" id="wpa2a_70"><img src="http://wp.freya.no/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/03/ejb-3-0-roles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java certification preparation tools</title>
		<link>http://wp.freya.no/2010/02/java-certification-preparation-tools/</link>
		<comments>http://wp.freya.no/2010/02/java-certification-preparation-tools/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 21:55:56 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[certification]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=469</guid>
		<description><![CDATA[SCJP &#8211; Sun Certified Java Programmer SCBDC &#8211; Sun Certified Business Component Developer No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tatyana.freya.no/scjp/">SCJP &#8211; Sun Certified Java Programmer</a><br />
<a href="http://tatyana.freya.no/scbcd/">SCBDC &#8211; Sun Certified Business Component Developer</a></p>
 <img src="http://wp.freya.no/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=469" width="1" height="1" style="display: none;" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwp.freya.no%2F2010%2F02%2Fjava-certification-preparation-tools%2F&amp;title=Java%20certification%20preparation%20tools" id="wpa2a_78"><img src="http://wp.freya.no/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/02/java-certification-preparation-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

