<?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: Layered architecture with Hibernate and Spring 3</title>
	<atom:link href="http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/</link>
	<description>Carlos Vara&#039;s writings about software development</description>
	<lastBuildDate>Thu, 22 Jul 2010 08:30:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=2373</generator>
	<item>
		<title>By: Bo</title>
		<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/comment-page-1/#comment-458</link>
		<dc:creator>Bo</dc:creator>
		<pubDate>Thu, 22 Jul 2010 08:30:56 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=59#comment-458</guid>
		<description>I tried your example and created a controller to test it.

I got an exception &quot;org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here&quot; with the following code. How can I fix it without adding proxy-target-class=”true”? Thanks.



@Controller
public class MyController {

    private UserService userService;

    @Autowired
    public MyController(UserService userService) {
        this.userService = userService;
    }

    @RequestMapping(&quot;/{page}&quot;)
    public ModelAndView category(@PathVariable String page) {
        ModelAndView mav = new ModelAndView();
        mav.addObject(&quot;page&quot;, page);
        userService.createUser(new User(&quot;Dummy&quot;, 30));
        mav.setViewName(&quot;/index&quot;);
        return mav;
    }</description>
		<content:encoded><![CDATA[<p>I tried your example and created a controller to test it.</p>
<p>I got an exception &#8220;org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here&#8221; with the following code. How can I fix it without adding proxy-target-class=”true”? Thanks.</p>
<p>@Controller<br />
public class MyController {</p>
<p>    private UserService userService;</p>
<p>    @Autowired<br />
    public MyController(UserService userService) {<br />
        this.userService = userService;<br />
    }</p>
<p>    @RequestMapping(&#8220;/{page}&#8221;)<br />
    public ModelAndView category(@PathVariable String page) {<br />
        ModelAndView mav = new ModelAndView();<br />
        mav.addObject(&#8220;page&#8221;, page);<br />
        userService.createUser(new User(&#8220;Dummy&#8221;, 30));<br />
        mav.setViewName(&#8220;/index&#8221;);<br />
        return mav;<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Vara</title>
		<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/comment-page-1/#comment-306</link>
		<dc:creator>Carlos Vara</dc:creator>
		<pubDate>Thu, 03 Jun 2010 18:27:35 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=59#comment-306</guid>
		<description>app-config.xml is generally associated with Spring MVC. For this tutorial, as the layering stops at the service layer and no presentation code is added, the file shouldn&#039;t be needed.</description>
		<content:encoded><![CDATA[<p>app-config.xml is generally associated with Spring MVC. For this tutorial, as the layering stops at the service layer and no presentation code is added, the file shouldn&#8217;t be needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giancasa</title>
		<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/comment-page-1/#comment-285</link>
		<dc:creator>Giancasa</dc:creator>
		<pubDate>Tue, 25 May 2010 10:36:49 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=59#comment-285</guid>
		<description>Very good!!!

Thanks</description>
		<content:encoded><![CDATA[<p>Very good!!!</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pkach00</title>
		<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/comment-page-1/#comment-228</link>
		<dc:creator>pkach00</dc:creator>
		<pubDate>Mon, 26 Apr 2010 18:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=59#comment-228</guid>
		<description>Heh... Used this tutorial. Seems one MAJOR thing missing... 
You should tell to put  into app-config.xml

I was fighting with errors half of the day :-\</description>
		<content:encoded><![CDATA[<p>Heh&#8230; Used this tutorial. Seems one MAJOR thing missing&#8230;<br />
You should tell to put  into app-config.xml</p>
<p>I was fighting with errors half of the day :-\</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Vara</title>
		<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/comment-page-1/#comment-138</link>
		<dc:creator>Carlos Vara</dc:creator>
		<pubDate>Wed, 17 Mar 2010 13:08:25 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=59#comment-138</guid>
		<description>Make sure that your service implementation class actually implements the interface HistoricalPriceService.

If you are coding a new Spring application, it is usually a good idea to adhere to the principle of coding to interfaces, and having to use proxy-target-class=”true” usually means the opposite.</description>
		<content:encoded><![CDATA[<p>Make sure that your service implementation class actually implements the interface HistoricalPriceService.</p>
<p>If you are coding a new Spring application, it is usually a good idea to adhere to the principle of coding to interfaces, and having to use proxy-target-class=”true” usually means the opposite.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/comment-page-1/#comment-128</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 11 Mar 2010 17:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=59#comment-128</guid>
		<description>I got it - I had to include proxy-target-class=&quot;true&quot; to the  tag.</description>
		<content:encoded><![CDATA[<p>I got it &#8211; I had to include proxy-target-class=&#8221;true&#8221; to the  tag.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marfk</title>
		<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/comment-page-1/#comment-127</link>
		<dc:creator>Marfk</dc:creator>
		<pubDate>Thu, 11 Mar 2010 16:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=59#comment-127</guid>
		<description>I&#039;ve tried following your instructions, but I receive the following error when I try to call the service&#039;s methods:

java.lang.ClassCastException: $Proxy66 cannot be cast to com.trs.service.impl.HistoricalPriceService</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried following your instructions, but I receive the following error when I try to call the service&#8217;s methods:</p>
<p>java.lang.ClassCastException: $Proxy66 cannot be cast to com.trs.service.impl.HistoricalPriceService</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gilson DElrei</title>
		<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/comment-page-1/#comment-120</link>
		<dc:creator>Gilson DElrei</dc:creator>
		<pubDate>Tue, 09 Mar 2010 02:05:15 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=59#comment-120</guid>
		<description>Very simplified, but a good article! I like to see the things made simple like it. Could you extend it to an more complete sample, maybe including the presentation Layer ?</description>
		<content:encoded><![CDATA[<p>Very simplified, but a good article! I like to see the things made simple like it. Could you extend it to an more complete sample, maybe including the presentation Layer ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/comment-page-1/#comment-105</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sun, 28 Feb 2010 17:49:17 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=59#comment-105</guid>
		<description>Great work, thanks a lot!</description>
		<content:encoded><![CDATA[<p>Great work, thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prashant Pandey</title>
		<link>http://carinae.net/2009/11/layered-architecture-with-hibernate-and-spring-3/comment-page-1/#comment-49</link>
		<dc:creator>Prashant Pandey</dc:creator>
		<pubDate>Mon, 01 Feb 2010 07:10:24 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=59#comment-49</guid>
		<description>Very good article needs to be more descriptive</description>
		<content:encoded><![CDATA[<p>Very good article needs to be more descriptive</p>
]]></content:encoded>
	</item>
</channel>
</rss>
