<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Session-scoped Beans in Spring 2.0</title>
	<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/</link>
	<description>Exploring the Spring Framework and Application Development</description>
	<pubDate>Fri, 21 Nov 2008 12:48:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1</generator>

	<item>
		<title>By: Ron Forrester</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-1688</link>
		<author>Ron Forrester</author>
		<pubDate>Wed, 11 Oct 2006 05:15:02 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-1688</guid>
					<description>Sweet. Glad you're back. Thanks for another great explanation of a cool feature.

Cheers,
rjf&#38;</description>
		<content:encoded><![CDATA[<p>Sweet. Glad you&#8217;re back. Thanks for another great explanation of a cool feature.</p>
<p>Cheers,<br />
rjf&amp;</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Umang Doctor</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-1705</link>
		<author>Umang Doctor</author>
		<pubDate>Mon, 16 Oct 2006 20:15:51 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-1705</guid>
					<description>Hi, thank you for your example. I am trying to use a session scoped bean in my application. I am doing the same what you showed in your example, but getting following error:
----------------------------
Caused by: 
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy53] to required type [com.bglobal.reuse.hibernateApp.value.UserInfo] for property 'userInfo'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found
Caused by: 
java.lang.IllegalArgumentException: No matching editors or conversion strategy found
---------------------

Appreciating your time and effort in advance,
Umang</description>
		<content:encoded><![CDATA[<p>Hi, thank you for your example. I am trying to use a session scoped bean in my application. I am doing the same what you showed in your example, but getting following error:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Caused by:<br />
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:<br />
PropertyAccessException 1:<br />
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy53] to required type [com.bglobal.reuse.hibernateApp.value.UserInfo] for property &#8216;userInfo&#8217;; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found<br />
Caused by:<br />
java.lang.IllegalArgumentException: No matching editors or conversion strategy found<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Appreciating your time and effort in advance,<br />
Umang</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: tech</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-1706</link>
		<author>tech</author>
		<pubDate>Mon, 16 Oct 2006 21:29:26 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-1706</guid>
					<description>Ron - thanks ;-)

Umang - that error isn't coming from my code.  I suspect you've got something else in your context.  It looks like you're injecting something (maybe the session scoped bean?) that isn't of the same type as the property in the bean into which you are injecting it.</description>
		<content:encoded><![CDATA[<p>Ron - thanks <img src='http://www.memestorm.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Umang - that error isn&#8217;t coming from my code.  I suspect you&#8217;ve got something else in your context.  It looks like you&#8217;re injecting something (maybe the session scoped bean?) that isn&#8217;t of the same type as the property in the bean into which you are injecting it.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: amir</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-11403</link>
		<author>amir</author>
		<pubDate>Mon, 09 Apr 2007 16:13:37 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-11403</guid>
					<description>i want to have some kind of control on the bean initialization in session bean like ejb. what i mean that i can initialize the bean and then when the usecase completes release or destroy the session bean</description>
		<content:encoded><![CDATA[<p>i want to have some kind of control on the bean initialization in session bean like ejb. what i mean that i can initialize the bean and then when the usecase completes release or destroy the session bean</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: joseph</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-25249</link>
		<author>joseph</author>
		<pubDate>Wed, 15 Aug 2007 04:07:33 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-25249</guid>
					<description>This is very cool article for a newbie like me! Thanks. I Learn a lot, a lot from your web.</description>
		<content:encoded><![CDATA[<p>This is very cool article for a newbie like me! Thanks. I Learn a lot, a lot from your web.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Ali K</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-27556</link>
		<author>Ali K</author>
		<pubDate>Sat, 08 Sep 2007 23:52:39 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-27556</guid>
					<description>Nice article. I was looking for a way to do that and spring provides this nice mechanism through AOP. Thanks for enlightening us on this feature.</description>
		<content:encoded><![CDATA[<p>Nice article. I was looking for a way to do that and spring provides this nice mechanism through AOP. Thanks for enlightening us on this feature.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-30845</link>
		<author>Jason</author>
		<pubDate>Fri, 26 Oct 2007 15:41:17 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-30845</guid>
					<description>Thanks, this article saved my ass at work.  I had everything right except the RequestContextListener setup in the DD, once this article cleared up that issue for me.</description>
		<content:encoded><![CDATA[<p>Thanks, this article saved my ass at work.  I had everything right except the RequestContextListener setup in the DD, once this article cleared up that issue for me.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Ravi</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-35920</link>
		<author>Ravi</author>
		<pubDate>Thu, 20 Dec 2007 17:27:01 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-35920</guid>
					<description>Thanks for the article. The one gotcha (after a day of pain) to watch out for is to add spring-aop dependency jar in the pom (classpath). Spring ignores the  tag is ignored and the bean is treated like a singleton when the aop jar did not exist in the classpath.</description>
		<content:encoded><![CDATA[<p>Thanks for the article. The one gotcha (after a day of pain) to watch out for is to add spring-aop dependency jar in the pom (classpath). Spring ignores the  tag is ignored and the bean is treated like a singleton when the aop jar did not exist in the classpath.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-40860</link>
		<author>Josh</author>
		<pubDate>Wed, 27 Feb 2008 15:05:54 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-40860</guid>
					<description>First and foremost, great site and great content.

Now, 

A - I love the CSS style for the site.
B - How do I gain access to the session using the DispatchServlet ?

I am using a MultiActionController and for some reason some session attributes I cannot access.  Originally, I added a regular servlet and extracted the attributes I needed, the forwarded it to the Spring application.  Although this is a hack, I'm sure there are better ways to do this.

Any advice?

Warm regards,

Josh
Boston, MA.</description>
		<content:encoded><![CDATA[<p>First and foremost, great site and great content.</p>
<p>Now, </p>
<p>A - I love the CSS style for the site.<br />
B - How do I gain access to the session using the DispatchServlet ?</p>
<p>I am using a MultiActionController and for some reason some session attributes I cannot access.  Originally, I added a regular servlet and extracted the attributes I needed, the forwarded it to the Spring application.  Although this is a hack, I&#8217;m sure there are better ways to do this.</p>
<p>Any advice?</p>
<p>Warm regards,</p>
<p>Josh<br />
Boston, MA.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Deha Peker</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-40896</link>
		<author>Deha Peker</author>
		<pubDate>Wed, 27 Feb 2008 21:53:00 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-40896</guid>
					<description>How can I create a bean with session scope, but that bean creation shoulld be contingent to some priviledge settings for the user, For example if the admin=true, I want to create the bean otherwise not. 
Basically I don't want to instantiate that bean for all users session, but just users with admin priviledges. Is it possible to control this with IOC settings in Spring?</description>
		<content:encoded><![CDATA[<p>How can I create a bean with session scope, but that bean creation shoulld be contingent to some priviledge settings for the user, For example if the admin=true, I want to create the bean otherwise not.<br />
Basically I don&#8217;t want to instantiate that bean for all users session, but just users with admin priviledges. Is it possible to control this with IOC settings in Spring?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: tech</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-40967</link>
		<author>tech</author>
		<pubDate>Thu, 28 Feb 2008 14:52:48 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-40967</guid>
					<description>Josh - I believe you just need to add a third parameter of type HttpSession.  For example, call your method:
 public ModelAndView viewCart(HttpServletRequest req, HttpServletResponse res, HttpSession ses) { ..}
Grep for "anyMeaningfulName" in &lt;a href="http://static.springframework.org/spring/docs/2.5.x/reference/mvc.html#mvc-servlet" rel="nofollow"&gt;this doc&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Josh - I believe you just need to add a third parameter of type HttpSession.  For example, call your method:<br />
 public ModelAndView viewCart(HttpServletRequest req, HttpServletResponse res, HttpSession ses) { ..}<br />
Grep for &#8220;anyMeaningfulName&#8221; in <a href="http://static.springframework.org/spring/docs/2.5.x/reference/mvc.html#mvc-servlet" rel="nofollow">this doc</a>.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: tmaus</title>
		<link>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-53775</link>
		<author>tmaus</author>
		<pubDate>Mon, 11 Aug 2008 09:31:41 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/#comment-53775</guid>
					<description>thanks for your documentation. 

running into a problem and wanted to know if anyone had the same experience before. 

Setup my spring mvc and deployed into to the springsource application platform (s2ap)

executing the following line always throws a NullPointerException
ac = WebApplicationContextUtils.getRequiredWebApplicationContext(request.getSession().getServletContext());

In my partly web.xml I added  the one approriate listener:
 
  		org.springframework.web.context.request.RequestContextListener
	

Does anyone have a clue or a hint on this issue ???</description>
		<content:encoded><![CDATA[<p>thanks for your documentation. </p>
<p>running into a problem and wanted to know if anyone had the same experience before. </p>
<p>Setup my spring mvc and deployed into to the springsource application platform (s2ap)</p>
<p>executing the following line always throws a NullPointerException<br />
ac = WebApplicationContextUtils.getRequiredWebApplicationContext(request.getSession().getServletContext());</p>
<p>In my partly web.xml I added  the one approriate listener:</p>
<p>  		org.springframework.web.context.request.RequestContextListener</p>
<p>Does anyone have a clue or a hint on this issue ???</p>
]]></content:encoded>
				</item>
</channel>
</rss>
