<?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>demetrio.it blog &#187; ear</title>
	<atom:link href="http://blog.demetrio.it/tag/ear/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.demetrio.it</link>
	<description>nessun limite all'immaginazione</description>
	<lastBuildDate>Thu, 15 Jul 2010 15:42:55 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding Cache support to a seam-gen generated EAR project</title>
		<link>http://blog.demetrio.it/2009/04/03/adding-cache-support-to-a-seam-gen-generated-ear-project/</link>
		<comments>http://blog.demetrio.it/2009/04/03/adding-cache-support-to-a-seam-gen-generated-ear-project/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 00:08:33 +0000</pubDate>
		<dc:creator>Demetrio Filocamo</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[ear]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jboss cache]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[seam-gen]]></category>

		<guid isPermaLink="false">http://blog.demetrio.it/?p=110</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Adding Cache support to a Seam project (Seam 2.1.x) it&#8217;s very simple and it is described in the<a title="JBoss Seam Cache documentation" href="http://docs.jboss.com/seam/2.1.1.GA/reference/en-US/html/cache.html" target="_blank"> official Seam developer documentation</a>, anyways it doesn&#8217;t explain the exact steps to accomplish the task into an EAR project, I&#8217;m writing them to make your life even more simple <img src='http://blog.demetrio.it/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<ul>
<li>Add treecache.xml (you can find it into the seam blog example) to /resources/META-INF/</li>
<li>Open build.xml for editing, go to the &#8220;ear&#8221; target and tell to copy the treecache.xml file:<br />
&lt;target name=&#8221;ear&#8221; description=&#8221;Build the EAR structure in a staging directory&#8221;&gt;<br />
&#8230;<br />
    &lt;copy todir=&#8221;${ear.dir}/META-INF&#8221;&gt;<br />
        &lt;fileset dir=&#8221;${basedir}/resources/META-INF&#8221;&gt;<br />
            &lt;include name=&#8221;application.xml&#8221;/&gt;<br />
            &lt;include name=&#8221;jboss-app.xml&#8221;/&gt;<br />
            &lt;include name=&#8221;seam-deployment.properties&#8221;/&gt;<br />
            &lt;include name=&#8221;treecache.xml&#8221;/&gt;<br />
        &lt;/fileset&gt;<br />
    &lt;/copy&gt;<br />
&lt;/target&gt;</li>
<li>Edit components.xml, add the following XMLNS:<br />
xmlns:cache=&#8221;http://jboss.com/products/seam/cache&#8221;The following schema location:<br />
http://jboss.com/products/seam/cache http://jboss.com/products/seam/cache-2.1.xsd </p>
<p>And the following declaration:<br />
&lt;cache:jboss-cache-provider configuration=&#8221;META-INF/treecache.xml&#8221; /&gt;</li>
<li>Edit deployed-jars-ear.list and add the required JARs, I used the JBoss Cache 1.x for JBoss AS 4.2.X:<br />
jboss-cache.jar<br />
jgroups.jarHere there is the <a href="http://docs.jboss.com/seam/2.1.1.GA/reference/en-US/html/cache.html#d0e21178">list</a> of jars (and versions) for other configurations.</li>
</ul>
<p>And <a href="http://docs.jboss.com/seam/2.1.1.GA/reference/en-US/html/cache.html#d0e21343">here</a> you find the way how to use it in your projects.</p>
<p>Hope you liked it.</p>
<p>Demetrio</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.demetrio.it/2009/04/03/adding-cache-support-to-a-seam-gen-generated-ear-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
