<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Spring: Many applicationContext.xml &gt; One applicationContext.xml</title>
	<atom:link href="http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/feed/" rel="self" type="application/rss+xml" />
	<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/</link>
	<description></description>
	<lastBuildDate>Sun, 27 Feb 2011 22:42:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Andrew Sazonov</title>
		<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/comment-page-1/#comment-54</link>
		<dc:creator>Andrew Sazonov</dc:creator>
		<pubDate>Sat, 07 Jun 2008 06:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://72miles.com/blog/?p=27#comment-54</guid>
		<description>Just my 2 cents - suggestion from Mike regarding testing via bean overriding (i.e registering bean in text context using the same name as one in production) will work, but only if context is configured to allows bean definition overriding (there is appropriate setting for that)</description>
		<content:encoded><![CDATA[<p>Just my 2 cents &#8211; suggestion from Mike regarding testing via bean overriding (i.e registering bean in text context using the same name as one in production) will work, but only if context is configured to allows bean definition overriding (there is appropriate setting for that)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/comment-page-1/#comment-51</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 29 May 2008 12:45:34 +0000</pubDate>
		<guid isPermaLink="false">http://72miles.com/blog/?p=27#comment-51</guid>
		<description>Max, good points on test datasouces. With a Spring context, you could create a datasource bean with the same name, and then load that test context AFTER the production context, the test context would be used. That way you can keep all the configuration in the application contexts and have them injected.</description>
		<content:encoded><![CDATA[<p>Max, good points on test datasouces. With a Spring context, you could create a datasource bean with the same name, and then load that test context AFTER the production context, the test context would be used. That way you can keep all the configuration in the application contexts and have them injected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max Power</title>
		<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/comment-page-1/#comment-50</link>
		<dc:creator>Max Power</dc:creator>
		<pubDate>Wed, 28 May 2008 23:15:03 +0000</pubDate>
		<guid isPermaLink="false">http://72miles.com/blog/?p=27#comment-50</guid>
		<description>Splitting your bean definitions into multiple files is definitely a good practice.  However, regarding how your old way of not splitting it up caused the app context to connect to the database reminds me of something I read where I believe the preferred way of coding unit tests is to create the beans programmaticly in the setup methods.  This way the tests aren&#039;t tied to configuration files that may be changed, causing the tests to become invalid since they aren&#039;t being run in the same configuration against which they were coded.</description>
		<content:encoded><![CDATA[<p>Splitting your bean definitions into multiple files is definitely a good practice.  However, regarding how your old way of not splitting it up caused the app context to connect to the database reminds me of something I read where I believe the preferred way of coding unit tests is to create the beans programmaticly in the setup methods.  This way the tests aren&#8217;t tied to configuration files that may be changed, causing the tests to become invalid since they aren&#8217;t being run in the same configuration against which they were coded.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Neagomir</title>
		<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/comment-page-1/#comment-49</link>
		<dc:creator>Adrian Neagomir</dc:creator>
		<pubDate>Tue, 27 May 2008 15:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://72miles.com/blog/?p=27#comment-49</guid>
		<description>I use two definition files when doing web applications with Spring: one containing the database access and the service layer while the web related stuff in the configuration file that&#039;s used to configure the DispatcherServlet. 

The advantage of having this setup is that I can instantiate a console application that has access to the entire service layer for batch jobs, tests etc. using only the first file without having any dependency to a servlet container.

Using more files one can assemble  different application using the same codebase.</description>
		<content:encoded><![CDATA[<p>I use two definition files when doing web applications with Spring: one containing the database access and the service layer while the web related stuff in the configuration file that&#8217;s used to configure the DispatcherServlet. </p>
<p>The advantage of having this setup is that I can instantiate a console application that has access to the entire service layer for batch jobs, tests etc. using only the first file without having any dependency to a servlet container.</p>
<p>Using more files one can assemble  different application using the same codebase.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/comment-page-1/#comment-48</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Tue, 27 May 2008 14:55:04 +0000</pubDate>
		<guid isPermaLink="false">http://72miles.com/blog/?p=27#comment-48</guid>
		<description>Another issue we ran into is having several applicationContext.xml on the classpath leads to some very hard to track errors.  By giving the file a unique name, you can help avoid these conflicts.</description>
		<content:encoded><![CDATA[<p>Another issue we ran into is having several applicationContext.xml on the classpath leads to some very hard to track errors.  By giving the file a unique name, you can help avoid these conflicts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/comment-page-1/#comment-46</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 26 May 2008 14:19:18 +0000</pubDate>
		<guid isPermaLink="false">http://72miles.com/blog/?p=27#comment-46</guid>
		<description>Thank you Peter. the 90th percentile states

&lt;blockquote&gt;
This is an old habit of mine, a &quot;main index file&quot; that imports everything else. It is a bit cleaner than specifying every file in the web.xml descriptor
&lt;/blockquote&gt;

and follows up that with an example of how to import many application contexts into a main one.</description>
		<content:encoded><![CDATA[<p>Thank you Peter. the 90th percentile states</p>
<blockquote><p>
This is an old habit of mine, a &#8220;main index file&#8221; that imports everything else. It is a bit cleaner than specifying every file in the web.xml descriptor
</p></blockquote>
<p>and follows up that with an example of how to import many application contexts into a main one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Warhol</title>
		<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/comment-page-1/#comment-45</link>
		<dc:creator>Peter Warhol</dc:creator>
		<pubDate>Sun, 25 May 2008 19:23:43 +0000</pubDate>
		<guid isPermaLink="false">http://72miles.com/blog/?p=27#comment-45</guid>
		<description>I think that was covered recently in the 90th percentile:
http://icoloma.blogspot.com/2008/01/mock-your-spring-config-for-fun-and.html</description>
		<content:encoded><![CDATA[<p>I think that was covered recently in the 90th percentile:<br />
<a href="http://icoloma.blogspot.com/2008/01/mock-your-spring-config-for-fun-and.html" rel="nofollow">http://icoloma.blogspot.com/2008/01/mock-your-spring-config-for-fun-and.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashkan</title>
		<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/comment-page-1/#comment-44</link>
		<dc:creator>Ashkan</dc:creator>
		<pubDate>Sat, 24 May 2008 22:53:33 +0000</pubDate>
		<guid isPermaLink="false">http://72miles.com/blog/?p=27#comment-44</guid>
		<description>...
Clearly, working with a smaller xml file is easier than working with one enormous file.
...
And working with as little as possible XML stuff is the utopia so take a look at Guice Mike.</description>
		<content:encoded><![CDATA[<p>&#8230;<br />
Clearly, working with a smaller xml file is easier than working with one enormous file.<br />
&#8230;<br />
And working with as little as possible XML stuff is the utopia so take a look at Guice Mike.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cherouvim</title>
		<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/comment-page-1/#comment-43</link>
		<dc:creator>cherouvim</dc:creator>
		<pubDate>Sat, 24 May 2008 22:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://72miles.com/blog/?p=27#comment-43</guid>
		<description>Yep. Many files and imports is how I prefer it as well. Especially those which are deployment related (datasource, mail session details etc).

And I see no problems with that.</description>
		<content:encoded><![CDATA[<p>Yep. Many files and imports is how I prefer it as well. Especially those which are deployment related (datasource, mail session details etc).</p>
<p>And I see no problems with that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamo Smith</title>
		<link>http://72miles.com/blog/spring-many-applicationcontextxml-one-applicationcontextxml/comment-page-1/#comment-42</link>
		<dc:creator>Jamo Smith</dc:creator>
		<pubDate>Sat, 24 May 2008 22:52:29 +0000</pubDate>
		<guid isPermaLink="false">http://72miles.com/blog/?p=27#comment-42</guid>
		<description>I&#039;ve used a folder called springbeans to hold all my context files. They are module or entity centric:

- user.xml
- project.xml
- hibernate.xml
- security.xml

Tests are able to isolate only 1 or 2 contexts that are required to do the given test.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve used a folder called springbeans to hold all my context files. They are module or entity centric:</p>
<p>- user.xml<br />
- project.xml<br />
- hibernate.xml<br />
- security.xml</p>
<p>Tests are able to isolate only 1 or 2 contexts that are required to do the given test.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

