<?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>Technotrance, Illusions and Perspectives &#187; springmodules</title>
	<atom:link href="http://myblog.shriharisc.com/tag/springmodules/feed/" rel="self" type="application/rss+xml" />
	<link>http://myblog.shriharisc.com</link>
	<description>A dose of everyday bruises with Java/JEE</description>
	<lastBuildDate>Mon, 02 Aug 2010 17:45:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Chaining Apache CXF, JackRabbit using SpringModules</title>
		<link>http://myblog.shriharisc.com/2009/09/11/chaining-apache-cxf-jackrabbit-using-springmodules/</link>
		<comments>http://myblog.shriharisc.com/2009/09/11/chaining-apache-cxf-jackrabbit-using-springmodules/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 17:54:52 +0000</pubDate>
		<dc:creator>Shrihari</dc:creator>
				<category><![CDATA[jee-light]]></category>
		<category><![CDATA[apache-cxf]]></category>
		<category><![CDATA[apache-jackrabbit]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[springmodules]]></category>

		<guid isPermaLink="false">http://schakrap.wordpress.com/?p=103</guid>
		<description><![CDATA[Apache CXF integration with Spring and SpringModules support for Apache JackRabbit provides a nice combination for chaining command of actions to be delegated across layers of the enterprise application tiers . Here is a quick tip as how to do this. A more detailed tutorial has been hosted at http://bit.ly/TmmJx
1) Web application configuration (/WEB-INF/web.xml) snippet [...]]]></description>
			<content:encoded><![CDATA[<p>Apache CXF integration with Spring and SpringModules support for Apache JackRabbit provides a nice combination for chaining command of actions to be delegated across layers of the enterprise application tiers . Here is a quick tip as how to do this. A more detailed tutorial has been hosted at <a rel="http://bit.ly/plugins/iframe?hashUrl=http%3A%2F%2Fbit.ly%2FTmmJx" href="http://bit.ly/TmmJx" target="_blank">http://bit.ly/TmmJx</a></p>
<p>1) Web application configuration (/WEB-INF/web.xml) snippet (as specified below) loads Apache CXF configuration (classpath:cxf.xml) and delegates to CXF container</p>
<pre class="brush: xml">
&lt;context-param&gt;
 &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
 &lt;param-value&gt;classpath:cxf.xml&lt;/param-value&gt;
 &lt;/context-param&gt;

 &lt;servlet&gt;
 &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
 &lt;servlet-class&gt;org.apache.cxf.transport.servlet.CXFServlet&lt;/servlet-class&gt;
 &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 &lt;/servlet&gt;

 &lt;servlet-mapping&gt;
 &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
 &lt;url-pattern&gt;/service/*&lt;/url-pattern&gt;
 &lt;/servlet-mapping&gt;
</pre>
<p>2) Apache CXF&#8217;s configuration (cxf.xml) loads the Spring context configuration</p>
<pre class="brush: xml">
 &lt;import resource=&quot;classpath:META-INF/cxf/cxf.xml&quot; /&gt;
 &lt;import resource=&quot;classpath:META-INF/cxf/cxf-extension-soap.xml&quot; /&gt;
 &lt;import resource=&quot;classpath:META-INF/cxf/cxf-servlet.xml&quot; /&gt;
 &lt;import resource=&quot;classpath:jcrcontext.xml&quot;/&gt;
</pre>
<p>where the SpringModules JCRContext configuration loads the JackRabbit&#8217;s RepositoryFactoryBean</p>
<pre class="brush: xml">
&lt;bean id=&quot;repository&quot; class=&quot;org.springmodules.jcr.jackrabbit.RepositoryFactoryBean&quot;&gt;
  &lt;property name=&quot;configuration&quot; value=&quot;classpath:repository.xml&quot;/&gt;
  &lt;property name=&quot;homeDir&quot; ref=&quot;./target/myrepository&quot;/&gt;
 &lt;/bean&gt;

 &lt;bean id=&quot;sessionFactory&quot;  class=&quot;org.springmodules.jcr.jackrabbit.JackrabbitSessionFactory&quot;&gt;
  &lt;property name=&quot;repository&quot; ref=&quot;repository&quot; /&gt;
  &lt;property name=&quot;credentials&quot; ref=&quot;simpleCredentials&quot;/&gt;
 &lt;/bean&gt;

 &lt;bean id=&quot;jcrTemplate&quot; class=&quot;org.springmodules.jcr.JcrTemplate&quot;&gt;
  &lt;property name=&quot;sessionFactory&quot; ref=&quot;sessionFactory&quot; /&gt;
  &lt;property name=&quot;allowCreate&quot; value=&quot;true&quot; /&gt;
 &lt;/bean&gt;

 &lt;bean id=&quot;simpleCredentials&quot; class=&quot;javax.jcr.SimpleCredentials&quot;&gt;
  &lt;constructor-arg index=&quot;0&quot; value=&quot;bogus&quot;/&gt;
  &lt;constructor-arg index=&quot;1&quot;&gt;
   &lt;bean factory-bean=&quot;password&quot; factory-method=&quot;toCharArray&quot;/&gt;
  &lt;/constructor-arg&gt;
 &lt;/bean&gt;

 &lt;bean id=&quot;password&quot;  class=&quot;java.lang.String&quot;&gt;
  &lt;constructor-arg index=&quot;0&quot; value=&quot;pass&quot;/&gt;
 &lt;/bean&gt;
</pre>
<p>This chaining can be extended to any depth and a myriad range of implementation stacks could be acheived, if a container (Spring, Seam, Guice) offer support for seamless intra-container configuration and component resolution.</p>
]]></content:encoded>
			<wfw:commentRss>http://myblog.shriharisc.com/2009/09/11/chaining-apache-cxf-jackrabbit-using-springmodules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
