<?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>Burningice</title>
	<atom:link href="http://blog.burningice.pl/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.burningice.pl</link>
	<description>bury me in smoke</description>
	<lastBuildDate>Thu, 03 Nov 2011 23:27:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Grails and Ehcache Annotations for Spring</title>
		<link>http://blog.burningice.pl/2011/11/04/grails-and-ehcache-annotations-for-spring/</link>
		<comments>http://blog.burningice.pl/2011/11/04/grails-and-ehcache-annotations-for-spring/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 23:23:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Grails]]></category>

		<guid isPermaLink="false">http://blog.burningice.pl/?p=633</guid>
		<description><![CDATA[Ehcache Annotations for Spring is a project that allows "declarative, aspect based caching to be added to a Spring Framework based application by simple annotation". And because Grails stands on Spring, there is no problem to do that. We are using spring xml based configuration here, but if any one know how rewrite it to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/ehcache-spring-annotations/" target="_blank">Ehcache Annotations for Spring</a> is a project that allows "declarative, aspect based caching to be added to a Spring Framework based application by simple annotation". And because Grails stands on Spring, there is no problem to do that. We are using spring xml based configuration here, but if any one know how rewrite it to Groovy DSL, please leave a comment.  </p>
<p>1) Configure dependencies in BuildConfig.groovy.</p>
<div style="overflow:auto">
<pre class="groovy">&nbsp;
compile<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'com.googlecode.ehcache-spring-annotations:ehcache-spring-annotations:1.2.0'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
    excludes <span style="color: #ff0000;">'ehcache-core'</span>, <span style="color: #ff0000;">'slf4j-api'</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
</div>
<p>2) Configure spring resources.xml. We are using proxy-target-class="true" option to avoid <a href="http://notetodogself.blogspot.com/2009/12/jdkdynamicaopproxy-classcastexception.html" target="_blank">JdkDynamicAopProxy ClassCastException</a> problem.</p>
<div style="overflow:auto">
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;beans</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/beans&quot;</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
    <span style="color: #000066;">xmlns:context</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/context&quot;</span> <span style="color: #000066;">xmlns:ehcache</span>=<span style="color: #ff0000;">&quot;http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring&quot;</span>
    <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ehcache:annotation-driven</span> <span style="color: #000066;">proxy-target-class</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ehcache:config</span> <span style="color: #000066;">cache-manager</span>=<span style="color: #ff0000;">&quot;cacheManager&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ehcache:evict-expired-elements</span> <span style="color: #000066;">interval</span>=<span style="color: #ff0000;">&quot;60&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ehcache:config<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;cacheManager&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.springframework.cache.ehcache.EhCacheManagerFactoryBean&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/beans<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
</div>
<p>3) Configure Ehcache in ehcache.xml.</p>
<div style="overflow:auto">
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ehcache</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
         <span style="color: #000066;">xsi:noNamespaceSchemaLocation</span>=<span style="color: #ff0000;">&quot;ehcache.xsd&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;diskStore</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;java.io.tmpdir&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;defaultCache</span>
            <span style="color: #000066;">maxElementsInMemory</span>=<span style="color: #ff0000;">&quot;10000&quot;</span>
            <span style="color: #000066;">eternal</span>=<span style="color: #ff0000;">&quot;false&quot;</span>
            <span style="color: #000066;">overflowToDisk</span>=<span style="color: #ff0000;">&quot;false&quot;</span>
            <span style="color: #000066;">timeToIdleSeconds</span>=<span style="color: #ff0000;">&quot;300&quot;</span>
            <span style="color: #000066;">timeToLiveSeconds</span>=<span style="color: #ff0000;">&quot;300&quot;</span>
            <span style="color: #000066;">diskPersistent</span>=<span style="color: #ff0000;">&quot;false&quot;</span>
            <span style="color: #000066;">diskExpiryThreadIntervalSeconds</span>=<span style="color: #ff0000;">&quot;120&quot;</span>
            <span style="color: #000066;">memoryStoreEvictionPolicy</span>=<span style="color: #ff0000;">&quot;LRU&quot;</span>
            <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;cache</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;cacheableService&quot;</span>
           <span style="color: #000066;">maxElementsInMemory</span>=<span style="color: #ff0000;">&quot;30000&quot;</span>
           <span style="color: #000066;">eternal</span>=<span style="color: #ff0000;">&quot;false&quot;</span>
           <span style="color: #000066;">overflowToDisk</span>=<span style="color: #ff0000;">&quot;false&quot;</span>
           <span style="color: #000066;">diskPersistent</span>=<span style="color: #ff0000;">&quot;false&quot;</span>
           <span style="color: #000066;">timeToLiveSeconds</span>=<span style="color: #ff0000;">&quot;86400&quot;</span>
           <span style="color: #000066;">timeToIdleSeconds</span>=<span style="color: #ff0000;">&quot;0&quot;</span>
            <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ehcache<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
</div>
<p>4) Use annotations in code:</p>
<div style="overflow:auto">
<pre class="groovy">&nbsp;
<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> CacheableService <span style="color: #66cc66;">&#123;</span>
&nbsp;
    @Cacheable<span style="color: #66cc66;">&#40;</span>cacheName=<span style="color: #ff0000;">&quot;cacheableService&quot;</span><span style="color: #66cc66;">&#41;</span>
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20public"><span style="color: #000000; font-weight: bold;">public</span></a> MyData getData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        ...
        <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a> myData
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    @Transactional
    @TriggersRemove<span style="color: #66cc66;">&#40;</span>cacheName=<span style="color: #ff0000;">&quot;cacheableService&quot;</span>, removeAll=<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20true"><span style="color: #000000; font-weight: bold;">true</span></a><span style="color: #66cc66;">&#41;</span>
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20public"><span style="color: #000000; font-weight: bold;">public</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> updateData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        ...
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.burningice.pl/2011/11/04/grails-and-ehcache-annotations-for-spring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails Gmock partial mock example</title>
		<link>http://blog.burningice.pl/2011/10/21/grails-gmock-partial-mock-example/</link>
		<comments>http://blog.burningice.pl/2011/10/21/grails-gmock-partial-mock-example/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 11:27:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Grails]]></category>

		<guid isPermaLink="false">http://blog.burningice.pl/?p=617</guid>
		<description><![CDATA[&#160; class Foo &#123; &#160; def methodFoo&#40;String param&#41;&#123; return &#34;methodFoo&#34; &#125; &#125; &#160; ... &#160; class Bar &#123; &#160; def foo &#160; def methodBar&#40;String param&#41;&#123; return foo.methodFoo&#40;param&#41; + methodBarSecond&#40;param&#41;; &#125; &#160; def methodBarSecond&#40;String param&#41;&#123; return &#34;methodBarSecond&#34; &#125; &#125; &#160; ... &#160; import static org.hamcrest.Matchers.any &#160; @WithGmock class BarTests &#123; &#160; @Test public void checkMethodBar&#40;&#41;&#123; def [...]]]></description>
			<content:encoded><![CDATA[<pre class="groovy">&nbsp;
<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> Foo <span style="color: #66cc66;">&#123;</span>
&nbsp;
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> methodFoo<span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> param<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a> <span style="color: #ff0000;">&quot;methodFoo&quot;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
...
&nbsp;
<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> Bar <span style="color: #66cc66;">&#123;</span>
&nbsp;
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> foo
&nbsp;
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> methodBar<span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> param<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a> foo.<span style="color: #006600;">methodFoo</span><span style="color: #66cc66;">&#40;</span>param<span style="color: #66cc66;">&#41;</span> + methodBarSecond<span style="color: #66cc66;">&#40;</span>param<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> methodBarSecond<span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> param<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
         <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a> <span style="color: #ff0000;">&quot;methodBarSecond&quot;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
...
&nbsp;
<span style="color: #a1a100;">import static org.hamcrest.Matchers.any</span>
&nbsp;
@WithGmock
<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> BarTests <span style="color: #66cc66;">&#123;</span>
&nbsp;
    @Test
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20public"><span style="color: #000000; font-weight: bold;">public</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> checkMethodBar<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> result = <span style="color: #ff0000;">&quot;my other result&quot;</span>
        <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> mockFoo = mock<span style="color: #66cc66;">&#40;</span>Foo<span style="color: #66cc66;">&#41;</span>
        mockFoo.<span style="color: #006600;">testMethod</span><span style="color: #66cc66;">&#40;</span>any<span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">returns</span><span style="color: #66cc66;">&#40;</span>result<span style="color: #66cc66;">&#41;</span>
&nbsp;
        Bar bar = <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Bar<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
        bar.<span style="color: #006600;">foo</span> = mockFoo
        mock<span style="color: #66cc66;">&#40;</span>bar<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">methodBarSecond</span><span style="color: #66cc66;">&#40;</span>any<span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">returns</span><span style="color: #66cc66;">&#40;</span>result<span style="color: #66cc66;">&#41;</span>
&nbsp;
        play <span style="color: #66cc66;">&#123;</span>
            assertEquals <span style="color: #66cc66;">&#40;</span>result * <span style="color: #cc66cc;">2</span>, bar.<span style="color: #006600;">methodBar</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.burningice.pl/2011/10/21/grails-gmock-partial-mock-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails bean factory + method with parameters</title>
		<link>http://blog.burningice.pl/2011/10/20/grails-bean-factory-method-with-parameters/</link>
		<comments>http://blog.burningice.pl/2011/10/20/grails-bean-factory-method-with-parameters/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 21:42:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Grails]]></category>

		<guid isPermaLink="false">http://blog.burningice.pl/?p=602</guid>
		<description><![CDATA[&#160; class MyObjectFactory &#123; static final int TYPE_ONE = 1 static final int TYPE_TWO = 2 &#160; def produce&#40;int type&#41;&#123; if &#40;type == TYPE_ONE&#41;&#123; return ... // type one &#125; &#160; if &#40;type == TYPE_TWO&#41;&#123; return ... // type two &#125; &#160; throw new IllegalArgumentException&#40;&#41; &#125; &#125; &#160; ... &#160; beans &#123; &#160; myObjectFactoryBean&#40;MyObjectFactory&#41; &#160; [...]]]></description>
			<content:encoded><![CDATA[<pre class="groovy">&nbsp;
<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> MyObjectFactory <span style="color: #66cc66;">&#123;</span>
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20final"><span style="color: #000000; font-weight: bold;">final</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20int"><span style="color: #993333;">int</span></a> TYPE_ONE = <span style="color: #cc66cc;">1</span>
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20final"><span style="color: #000000; font-weight: bold;">final</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20int"><span style="color: #993333;">int</span></a> TYPE_TWO = <span style="color: #cc66cc;">2</span>
&nbsp;
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> produce<span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20int"><span style="color: #993333;">int</span></a> type<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
         <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>type == TYPE_ONE<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
              <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a> ... <span style="color: #808080; font-style: italic;">// type one</span>
         <span style="color: #66cc66;">&#125;</span>
&nbsp;
         <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>type == TYPE_TWO<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
              <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a> ... <span style="color: #808080; font-style: italic;">// type two</span>
         <span style="color: #66cc66;">&#125;</span>
&nbsp;
         <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20throw"><span style="color: #000000; font-weight: bold;">throw</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> <a href="http://www.google.de/search?as_q=IllegalArgumentException&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">IllegalArgumentException</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span> 
&nbsp;
...
&nbsp;
<span style="color: #006600;">beans</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
    myObjectFactoryBean<span style="color: #66cc66;">&#40;</span>MyObjectFactory<span style="color: #66cc66;">&#41;</span>
&nbsp;
    myObjectBean<span style="color: #66cc66;">&#40;</span>myObjectFactoryBean:<span style="color: #ff0000;">'produce'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>bean-&gt;
         bean.<span style="color: #006600;">constructorArgs</span> = <span style="color: #66cc66;">&#91;</span>MyObjectFactory.<span style="color: #006600;">TYPE_ONE</span> <span style="color: #66cc66;">&#93;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.burningice.pl/2011/10/20/grails-bean-factory-method-with-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>After DevMeeting</title>
		<link>http://blog.burningice.pl/2011/05/22/after-devmeeting/</link>
		<comments>http://blog.burningice.pl/2011/05/22/after-devmeeting/#comments</comments>
		<pubDate>Sun, 22 May 2011 21:39:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.burningice.pl/?p=591</guid>
		<description><![CDATA[DevMeeting is after us, and only thing I can say after it is "more". Meeting started at 9 a.m. and we worked with short breaks till 9 p.m. Whole meeting was leaded by David de Rosier and I must say that I have been under deep impression how big and broad knowledge he has. We [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://devmeetings.com/trainings/javascript-na-serwerze-ringojs-v8cgi-i-nodejs" target="_blank">DevMeeting </a>is after us, and only thing I can say after it is "more". Meeting started at 9 a.m. and we worked with short breaks till 9 p.m. Whole meeting was leaded by David de Rosier and I must say that I have been under deep impression how big and broad knowledge he has.</p>
<p>We started with JavaScript refreshing - quick review of JavaScript magick. As a exercise we got task to implement elements of Aspect Programming in JavaScript.</p>
<p>Next we jumped to <a href="http://nodejs.org/" target="_blank">NodeJS </a> and I must say that this was the most interesting part of whole meeting. His callback approach provide really powerful way for creating server-side code. After theoretical part we started implementation of chat - part of online code editor that was ours goal on this meeting. It was rally amazing to see that the same library  (<a href="http://socket.io/" target="_blank">Socket.IO</a>) is used on client and server side, JSON is transparent for both sides and all was running in less than 15 minutes. </p>
<p>As last element we explore <a href="http://ringojs.org/" target="_blank">RingoJS</a> - MVC Server framework. It wasn't impressive - yet another framework. Only interesting thing in it is possibility of Java libraries usage. But there is no "magic" that NodeJS is offering and there is a lot of much better frameworks around in any other language. </p>
<p>Whole meeting was really successful, it has given me wider look on server side JavaScript, and I am definitely recommending it any one who want to learn something interesting. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burningice.pl/2011/05/22/after-devmeeting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pre DevMeeting</title>
		<link>http://blog.burningice.pl/2011/04/27/pre-dev-meeting/</link>
		<comments>http://blog.burningice.pl/2011/04/27/pre-dev-meeting/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 21:25:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://blog.burningice.pl/?p=571</guid>
		<description><![CDATA[On 14 May in Poznan there will be interesting meeting (with I hope to take part) about RingoJS, V8cgi and NodeJS. I am still confused with "server side JavaScript" concept and I hope to clarify my point of view after this meeting. Meanwhile I strongly recommend two videos where Ryan Dahl is explaining why he [...]]]></description>
			<content:encoded><![CDATA[<p>On 14 May in Poznan there will be interesting <a href="http://devmeetings.pl/trainings/javascript-na-serwerze-ringojs-v8cgi-i-nodejs" target="_blank">meeting</a> (with I hope to take part) about <a href="http://ringojs.org/" target="_blank">RingoJS</a>, <a href="http://code.google.com/p/v8cgi/" target="_blank">V8cgi</a> and <a href="http://nodejs.org/" target="_blank">NodeJS</a>. I am still confused with "server side JavaScript" concept and I hope to clarify my point of view after this meeting. Meanwhile I strongly recommend two videos where Ryan Dahl is explaining why he has created NodeJS, it general architecture and for what and where NodeJS can be used. </p>
<p><iframe title="YouTube video player" width="500" height="400" src="http://www.youtube.com/embed/F6k8lTrAE2g?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p><iframe title="YouTube video player" width="500" height="400" src="http://www.youtube.com/embed/jo_B4LTHi3I?rel=0" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burningice.pl/2011/04/27/pre-dev-meeting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GAE as free Java hosting? Not really.</title>
		<link>http://blog.burningice.pl/2011/02/25/gae-as-free-java-hosting-not-really/</link>
		<comments>http://blog.burningice.pl/2011/02/25/gae-as-free-java-hosting-not-really/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 14:57:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[GAE]]></category>

		<guid isPermaLink="false">http://blog.burningice.pl/?p=541</guid>
		<description><![CDATA[If you plan to deploy your new, shiny, low traffic application on Google App Engine, because you think that you can get it for free - don't bother. That was my idea recently - to took Play framework (nice integration with GAE and Siena through modules) build simple (but not trivial)  low traffic application, and deploy [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-547" title="appengine_lowres" src="http://blog.burningice.pl/wp-content/uploads/appengine_lowres.gif" alt="" width="142" height="109" />If you plan to deploy your new, shiny, low traffic application on <a href="http://code.google.com/appengine/" target="_blank">Google App Engine</a>, because you think that you can get it for free - don't bother. That was my idea recently - to took <a href="http://www.playframework.org/" target="_blank">Play framework </a> (nice integration with GAE and <a href="http://www.sienaproject.com/index.html" target="_blank">Siena </a>through modules) build simple (but not trivial)  low traffic application, and deploy it on GAE. Quota that is assigned to free GAE option was more than enough for my requirements.</p>
<p>After quick warm-up with framework and GAE infrastructure I have created first snapshot of my application.  All was smooth and easy. The only problem was with page response time: it was taking even ~5s to get response. In logs I found this information:</p>
<blockquote><p>This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.</p></blockquote>
<p>Quick search through a mailing lists and I found <a href="http://code.google.com/p/googleappengine/issues/detail?id=2931" target="_blank">information</a> that GAE will utilize your instances, if they are not used (with in case of low traffic application is more than sure). There is solution to prevent that: you can buy <a href="http://code.google.com/appengine/docs/adminconsole/instances.html#Always_On" target="_blank">Always On</a> option, but at this moment it costs 9$/month. Its not much as for Java hosting solution, but well - its still more than PHP.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burningice.pl/2011/02/25/gae-as-free-java-hosting-not-really/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AndEngine in action</title>
		<link>http://blog.burningice.pl/2011/01/03/andengine-in-action/</link>
		<comments>http://blog.burningice.pl/2011/01/03/andengine-in-action/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 20:27:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://blog.burningice.pl/?p=487</guid>
		<description><![CDATA[Any one interested in making games on Android platform, should definitely check AndEngine. This framework will help with creating 2D OpenGL games. It is easy, quick and powerful. Extension allows to create games based on physic or even multiplayer games. Below you can find video that shows what can be done in just two evenings.]]></description>
			<content:encoded><![CDATA[<p>Any one interested in making games on Android platform, should definitely check <a href="http://www.andengine.org/" target="_blank">AndEngine</a>. This framework will help with creating 2D OpenGL games. It is easy, quick and powerful. Extension allows to create games based on physic or even multiplayer games. Below you can find video that shows what can be done in just two evenings. </p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/uM8WsY7UP_o?fs=1&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="500" height="400" src="http://www.youtube.com/v/uM8WsY7UP_o?fs=1&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burningice.pl/2011/01/03/andengine-in-action/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JavaScriptMVC and Skylinetrooper.net</title>
		<link>http://blog.burningice.pl/2010/12/23/javascriptmvc-and-skylinetrooper-net/</link>
		<comments>http://blog.burningice.pl/2010/12/23/javascriptmvc-and-skylinetrooper-net/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 16:12:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSMVC]]></category>

		<guid isPermaLink="false">http://blog.burningice.pl/?p=473</guid>
		<description><![CDATA[My another friend has asked my to update his portfolio. And again I have chosen JavaScriptMVC as client side framework. I think that final effect is more than good. If you want to check it, visit www.skylinetrooper.net. I strongly recommend to check also Piotr private gallery under www.skylinesleep.net.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-474" title="skylinetrooper.net" src="http://blog.burningice.pl/wp-content/uploads/0c269a1f4ffdbe5af828dda54a8ef425-newest.jpg" alt="" width="134" height="134" /> My another friend has asked my to update his portfolio. And again I have chosen JavaScriptMVC as client side framework. I think that final effect is more than good. If you want to check it, visit <a target="_blank" href="http://www.skylinetrooper.net">www.skylinetrooper.net</a>. I strongly recommend to check also Piotr private gallery under  <a target="_blank" href="http://www.skylinesleep.net/">www.skylinesleep.net</a>.
<div style="clear: both;"></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.burningice.pl/2010/12/23/javascriptmvc-and-skylinetrooper-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Madness? This is ImpactJS!</title>
		<link>http://blog.burningice.pl/2010/09/20/madness-this-is-impactjs/</link>
		<comments>http://blog.burningice.pl/2010/09/20/madness-this-is-impactjs/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 20:58:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.burningice.pl/?p=466</guid>
		<description><![CDATA[Another great JS gaming engine is in the way. Just check out this awesome presentation where you can find some info about engine and editor (!): You can play in Biolab disaster to check how cool it is. I am over deep impression about it.]]></description>
			<content:encoded><![CDATA[<p>Another great JS gaming engine is in the way. Just check out this awesome presentation where you can find some info about engine and editor (!):</p>
<p><iframe src="http://player.vimeo.com/video/14920760" width="400" height="300" frameborder="0"></iframe></p>
<p>You can play in <a href="http://www.phoboslab.org/biolab/" target="_blank">Biolab disaster</a> to check how cool it is. I am over deep impression about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burningice.pl/2010/09/20/madness-this-is-impactjs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bye Google Wave</title>
		<link>http://blog.burningice.pl/2010/08/09/bye-google-wave/</link>
		<comments>http://blog.burningice.pl/2010/08/09/bye-google-wave/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 20:53:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Wave]]></category>

		<guid isPermaLink="false">http://blog.burningice.pl/?p=455</guid>
		<description><![CDATA[Today I have back from vacations, and I found bad news from Google: they will close Google Wave at the end of the year. But despite these wins, and numerous loyal fans, Wave has not seen the user adoption we would have liked. For me its quite strange: in my company we use Wave and [...]]]></description>
			<content:encoded><![CDATA[<p>Today I have back from vacations, and I found <a href="http://googleblog.blogspot.com/2010/08/update-on-google-wave.html" target="_blank">bad news</a> from Google: they will close Google Wave at the end of the year.</p>
<blockquote><p>But despite these wins, and numerous loyal fans, Wave has not seen the user adoption we would have liked.</p></blockquote>
<p>For me its quite strange: in my company we use Wave and it works very well and for sure there is lots of companies that are in the same position. Why they can keep it online like other closed products (like <a href="http://www.google.com/notebook/" target="_blank">Google Notebook</a>)? Did Google think that it will be competition for Twitter? What it mean "user adoption" for Google?</p>
<p>Lots of questions but there is on sure - for <a href="http://www.novell.com/products/pulse/" target="_blank">Novel Pulse</a> it's good news.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burningice.pl/2010/08/09/bye-google-wave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

