<?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 (Acegi) Security Account Lockout</title>
	<atom:link href="http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/</link>
	<description>From the desk of a gadget lover</description>
	<lastBuildDate>Wed, 25 Aug 2010 18:40:34 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Hari Gangadharan</title>
		<link>http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/comment-page-1/#comment-547</link>
		<dc:creator>Hari Gangadharan</dc:creator>
		<pubDate>Wed, 25 Aug 2010 18:40:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.harinair.com/?p=167#comment-547</guid>
		<description>@Michel
Interesting. Normally it should throw a LockedException.</description>
		<content:encoded><![CDATA[<p>@Michel<br />
Interesting. Normally it should throw a LockedException.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomek</title>
		<link>http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/comment-page-1/#comment-546</link>
		<dc:creator>Tomek</dc:creator>
		<pubDate>Wed, 25 Aug 2010 13:48:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.harinair.com/?p=167#comment-546</guid>
		<description>..... but as of Spring 3.0, new ApplicationListener can be declared and registered in AppContext to automatically filter events of exact type</description>
		<content:encoded><![CDATA[<p>&#8230;.. but as of Spring 3.0, new ApplicationListener can be declared and registered in AppContext to automatically filter events of exact type</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomek</title>
		<link>http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/comment-page-1/#comment-545</link>
		<dc:creator>Tomek</dc:creator>
		<pubDate>Wed, 25 Aug 2010 13:32:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.harinair.com/?p=167#comment-545</guid>
		<description>Good job :)</description>
		<content:encoded><![CDATA[<p>Good job <img src='http://www.harinair.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michel</title>
		<link>http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/comment-page-1/#comment-542</link>
		<dc:creator>Michel</dc:creator>
		<pubDate>Wed, 21 Jul 2010 11:56:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.harinair.com/?p=167#comment-542</guid>
		<description>@Hari Gangadharan

Great explanation and examples. I implemented your good and get it to work without the autowire and a couple of adjustments.

Now After 3 wrong login attempts spring change the value of accountNonlocked from 1 to 0 and failedLoginAttempts stand on 3. I think this is correct. But when I filled in a good Login, the user isn&#039;t blocked. The LoginSuccessEventlistener don&#039;t even come in the function isAccountNonLocked() so he never checked if the account is locked.

I use Spring 2.5.6 en Spring-security 2.0 Do you have some experience with this? seems like a bug to me....</description>
		<content:encoded><![CDATA[<p>@Hari Gangadharan</p>
<p>Great explanation and examples. I implemented your good and get it to work without the autowire and a couple of adjustments.</p>
<p>Now After 3 wrong login attempts spring change the value of accountNonlocked from 1 to 0 and failedLoginAttempts stand on 3. I think this is correct. But when I filled in a good Login, the user isn&#8217;t blocked. The LoginSuccessEventlistener don&#8217;t even come in the function isAccountNonLocked() so he never checked if the account is locked.</p>
<p>I use Spring 2.5.6 en Spring-security 2.0 Do you have some experience with this? seems like a bug to me&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hari Gangadharan</title>
		<link>http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/comment-page-1/#comment-522</link>
		<dc:creator>Hari Gangadharan</dc:creator>
		<pubDate>Thu, 01 Jul 2010 07:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.harinair.com/?p=167#comment-522</guid>
		<description>@Chalapathi: It is been years since I have coded context xml. Even in the days when the annotations were not there we used fake annotations in comments and used xdoclets to generate the context xml. First, you have to add all the Java classes without the annotations. Then find all classes that had @Component Annotation and define them in context xml (find the file with all these bean definitions):
instead of @Component(&quot;eventDispatcher&quot;)  you have to do the bean definition in the context xml:
&lt;bean id=&quot;eventDispatcher&quot; class=&quot;your.package.EventDispatcher&quot; /&gt;

For beans that have attributes with @Autowired, you have to define property injection in the bean definition - example:
&lt;bean id=&quot;loginFailureEventListener&quot; class=&quot;your.package.LoginFailureEventListener&quot; &gt;
     &lt;property name=&quot;userManager&quot; ref=&quot;yourUserServiceBeanId&quot; /&gt;
     (You have to also add the @Autowired properties of the parent too - parent of this bean is EventListener and that has @Autowired for eventDispatcher attribute) 
     &lt;property name=&quot;eventDispatcher&quot; ref=&quot;eventDispatcher&quot; /&gt;
&lt;bean &gt;


 Hope this helps.</description>
		<content:encoded><![CDATA[<p>@Chalapathi: It is been years since I have coded context xml. Even in the days when the annotations were not there we used fake annotations in comments and used xdoclets to generate the context xml. First, you have to add all the Java classes without the annotations. Then find all classes that had @Component Annotation and define them in context xml (find the file with all these bean definitions):<br />
instead of @Component(&#8221;eventDispatcher&#8221;)  you have to do the bean definition in the context xml:<br />
&lt;bean id=&#8221;eventDispatcher&#8221; class=&#8221;your.package.EventDispatcher&#8221; /&gt;</p>
<p>For beans that have attributes with @Autowired, you have to define property injection in the bean definition &#8211; example:<br />
&lt;bean id=&#8221;loginFailureEventListener&#8221; class=&#8221;your.package.LoginFailureEventListener&#8221; &gt;<br />
     &lt;property name=&#8221;userManager&#8221; ref=&#8221;yourUserServiceBeanId&#8221; /&gt;<br />
     (You have to also add the @Autowired properties of the parent too &#8211; parent of this bean is EventListener and that has @Autowired for eventDispatcher attribute)<br />
     &lt;property name=&#8221;eventDispatcher&#8221; ref=&#8221;eventDispatcher&#8221; /&gt;<br />
&lt;bean &gt;</p>
<p> Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chalapathi</title>
		<link>http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/comment-page-1/#comment-520</link>
		<dc:creator>Chalapathi</dc:creator>
		<pubDate>Mon, 28 Jun 2010 11:29:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.harinair.com/?p=167#comment-520</guid>
		<description>Hi Gangadhar,
Your post is very very helpful and very well explained also.
I have just started working on acegi security. I&#039;m working on an existing solution which is built on acegi-security 1.0.3.
Also I&#039;m new to Spring.

My application is a web application which has a acegi-security.xml defined and placed in the WEB-INF folder.
Can you please let me know how to add the above listeners in the above mentioned xml without using annotations and autowiring.
Your inputs are highly appreciated.

Thanks and regards,
Chalapathi</description>
		<content:encoded><![CDATA[<p>Hi Gangadhar,<br />
Your post is very very helpful and very well explained also.<br />
I have just started working on acegi security. I&#8217;m working on an existing solution which is built on acegi-security 1.0.3.<br />
Also I&#8217;m new to Spring.</p>
<p>My application is a web application which has a acegi-security.xml defined and placed in the WEB-INF folder.<br />
Can you please let me know how to add the above listeners in the above mentioned xml without using annotations and autowiring.<br />
Your inputs are highly appreciated.</p>
<p>Thanks and regards,<br />
Chalapathi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hari Gangadharan</title>
		<link>http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/comment-page-1/#comment-513</link>
		<dc:creator>Hari Gangadharan</dc:creator>
		<pubDate>Wed, 02 Jun 2010 04:27:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.harinair.com/?p=167#comment-513</guid>
		<description>I use annotations to register the Spring beans. If you don&#039;t use annotations, you may have to define these beans in spring context XML. No separate registration of listeners is needed. It is all auto-wired and initialized by Spring... And Spring automatically registers the ApplicationEventListener since it implements ApplicationListener interface.</description>
		<content:encoded><![CDATA[<p>I use annotations to register the Spring beans. If you don&#8217;t use annotations, you may have to define these beans in spring context XML. No separate registration of listeners is needed. It is all auto-wired and initialized by Spring&#8230; And Spring automatically registers the ApplicationEventListener since it implements ApplicationListener interface.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: User</title>
		<link>http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/comment-page-1/#comment-509</link>
		<dc:creator>User</dc:creator>
		<pubDate>Fri, 23 Apr 2010 18:43:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.harinair.com/?p=167#comment-509</guid>
		<description>Hi.
Thanks for posting a solution to implement the custom listener. The question is where do I register these listeners? Reply is appreciated.

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi.<br />
Thanks for posting a solution to implement the custom listener. The question is where do I register these listeners? Reply is appreciated.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
