<?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"
	>
<channel>
	<title>Comments for Cake Solutions Team Blog</title>
	<atom:link href="http://www.cakesolutions.net/teamblogs/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cakesolutions.net/teamblogs</link>
	<description>void magic() { }</description>
	<pubDate>Fri, 21 Nov 2008 14:00:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>Comment on Brr! by Phill</title>
		<link>http://www.cakesolutions.net/teamblogs/2008/10/29/brr/#comment-121</link>
		<dc:creator>Phill</dc:creator>
		<pubDate>Thu, 30 Oct 2008 17:30:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakesolutions.net/teamblogs/?p=86#comment-121</guid>
		<description>I'd highly recommend these for sub-zero temperatures:
http://tinyurl.com/398law
.. and no I don't work for them, just tried loads of gloves and these really do work, but make sure you've got a spare pair of thinner gloves if the temperature rises &#62;5C as they get a bit uncomfortable.</description>
		<content:encoded><![CDATA[<p>I&#8217;d highly recommend these for sub-zero temperatures:<br />
<a href="http://tinyurl.com/398law" rel="nofollow">http://tinyurl.com/398law</a><br />
.. and no I don&#8217;t work for them, just tried loads of gloves and these really do work, but make sure you&#8217;ve got a spare pair of thinner gloves if the temperature rises &gt;5C as they get a bit uncomfortable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on And the winner is&#8230; by Jan Machacek</title>
		<link>http://www.cakesolutions.net/teamblogs/2008/10/16/and-the-winner-is/#comment-111</link>
		<dc:creator>Jan Machacek</dc:creator>
		<pubDate>Thu, 16 Oct 2008 19:44:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakesolutions.net/teamblogs/?p=80#comment-111</guid>
		<description>Yup, the footwear is really impressive! I wouldn't want to get on the wrong side of her -- it could get painful :)</description>
		<content:encoded><![CDATA[<p>Yup, the footwear is really impressive! I wouldn&#8217;t want to get on the wrong side of her &#8212; it could get painful <img src='http://www.cakesolutions.net/teamblogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on And the winner is&#8230; by Sally</title>
		<link>http://www.cakesolutions.net/teamblogs/2008/10/16/and-the-winner-is/#comment-110</link>
		<dc:creator>Sally</dc:creator>
		<pubDate>Thu, 16 Oct 2008 14:18:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakesolutions.net/teamblogs/?p=80#comment-110</guid>
		<description>Yeah, she must be Dutch.  Look at the footwear!! Although she looks to be carrying triplets...   :).  You made the best choice in my opinion - the Turkish man's moustache scares me, and that woman truly does look miserable!!</description>
		<content:encoded><![CDATA[<p>Yeah, she must be Dutch.  Look at the footwear!! Although she looks to be carrying triplets&#8230;   :).  You made the best choice in my opinion - the Turkish man&#8217;s moustache scares me, and that woman truly does look miserable!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Migrating J2EE web application to the dm Server by &#187; Migrating J2EE web application to the dm Server</title>
		<link>http://www.cakesolutions.net/teamblogs/2008/10/12/migrating-j2ee-web-application-to-the-dm-server/#comment-107</link>
		<dc:creator>&#187; Migrating J2EE web application to the dm Server</dc:creator>
		<pubDate>Sun, 12 Oct 2008 11:02:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakesolutions.net/teamblogs/?p=79#comment-107</guid>
		<description>[...] Investing articles and resources for the wise investor &#124; Investing 101 wrote an interesting post today onHere&#8217;s a quick excerpt Aleksa and I gave talk at the Spring in Finance Exchange in London on Friday 10th October. We took a large Java EE web application (a huge 22MB WAR file) and deployed it in the dm Server. And it worked! But that was just a small preview of things to come. Next, we deployed the application in the shared libraries WAR model. In short, this allows you to share the libraries from your applications amongst other applications running in the dm Server. Imagine that you have three large applications, [...]</description>
		<content:encoded><![CDATA[<p>[...] Investing articles and resources for the wise investor | Investing 101 wrote an interesting post today onHere&#8217;s a quick excerpt Aleksa and I gave talk at the Spring in Finance Exchange in London on Friday 10th October. We took a large Java EE web application (a huge 22MB WAR file) and deployed it in the dm Server. And it worked! But that was just a small preview of things to come. Next, we deployed the application in the shared libraries WAR model. In short, this allows you to share the libraries from your applications amongst other applications running in the dm Server. Imagine that you have three large applications, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Season&#8217;s end by Jan Machacek</title>
		<link>http://www.cakesolutions.net/teamblogs/2008/09/21/seasons-end/#comment-97</link>
		<dc:creator>Jan Machacek</dc:creator>
		<pubDate>Wed, 24 Sep 2008 16:54:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakesolutions.net/teamblogs/?p=71#comment-97</guid>
		<description>Thank you Moray! 

And yes, you are right -- it is almost like a wet, windy and doping-free (!) time trial in Tour de France.

-- Jan</description>
		<content:encoded><![CDATA[<p>Thank you Moray! </p>
<p>And yes, you are right &#8212; it is almost like a wet, windy and doping-free (!) time trial in Tour de France.</p>
<p>&#8211; Jan</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Season&#8217;s end by Moray</title>
		<link>http://www.cakesolutions.net/teamblogs/2008/09/21/seasons-end/#comment-94</link>
		<dc:creator>Moray</dc:creator>
		<pubDate>Mon, 22 Sep 2008 15:52:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakesolutions.net/teamblogs/?p=71#comment-94</guid>
		<description>Jan

Well done, Jan. Magnificent trophies! The 'Ted Currie memorial 50' is particularly intriguing? Like the Tour de France, only wetter? 

rgds, Moray</description>
		<content:encoded><![CDATA[<p>Jan</p>
<p>Well done, Jan. Magnificent trophies! The &#8216;Ted Currie memorial 50&#8242; is particularly intriguing? Like the Tour de France, only wetter? </p>
<p>rgds, Moray</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Spring WebFlow - Passing Objects Between Parent Flow and Subflows by Rob</title>
		<link>http://www.cakesolutions.net/teamblogs/2008/07/16/spring-webflow-passing-objects-between-parent-flow-and-subflows/#comment-91</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Mon, 15 Sep 2008 21:36:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakesolutions.net/teamblogs/?p=57#comment-91</guid>
		<description>Thanks for this post.  It's saved me some time today!!</description>
		<content:encoded><![CDATA[<p>Thanks for this post.  It&#8217;s saved me some time today!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Finished! by Bob Remond</title>
		<link>http://www.cakesolutions.net/teamblogs/2008/09/07/not-moving-at-all/#comment-88</link>
		<dc:creator>Bob Remond</dc:creator>
		<pubDate>Thu, 11 Sep 2008 10:55:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakesolutions.net/teamblogs/?p=62#comment-88</guid>
		<description>We congratulate you on this great effort Jan. We're proud of you and Christies is a good cause.
Hope you have now recovered as I heard you were making a presentation yesterday. Hope this went well.
Brenda and Bob (Guy's Mum and Dad)</description>
		<content:encoded><![CDATA[<p>We congratulate you on this great effort Jan. We&#8217;re proud of you and Christies is a good cause.<br />
Hope you have now recovered as I heard you were making a presentation yesterday. Hope this went well.<br />
Brenda and Bob (Guy&#8217;s Mum and Dad)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Finished! by Sally</title>
		<link>http://www.cakesolutions.net/teamblogs/2008/09/07/not-moving-at-all/#comment-87</link>
		<dc:creator>Sally</dc:creator>
		<pubDate>Tue, 09 Sep 2008 15:40:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakesolutions.net/teamblogs/?p=62#comment-87</guid>
		<description>Fantastic - well done Jan!</description>
		<content:encoded><![CDATA[<p>Fantastic - well done Jan!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Acegi Concurrent Login by Aleksa Vukotic</title>
		<link>http://www.cakesolutions.net/teamblogs/2008/05/08/acegi-concurrent-login/#comment-43</link>
		<dc:creator>Aleksa Vukotic</dc:creator>
		<pubDate>Sun, 01 Jun 2008 18:38:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakesolutions.net/teamblogs/2008/05/08/acegi-concurrent-login/#comment-43</guid>
		<description>Yes, you should have your own &lt;code&gt;UserContext&lt;/code&gt; implementation.
Following implementation has only two methods, &lt;code&gt;User getUser()&lt;/code&gt;, which gets the user currently logged in,  and &lt;code&gt;void logout()&lt;/code&gt;, which destroys the session for user currently logged in.
Here is the &lt;code&gt;UserContext&lt;/code&gt; interface, and sample implementation:
&lt;code&gt;
public interface UserContext {

	/**
	 * Gets the current user
	 * @return The User object identifying the user
	 */
	User getUser();
    
    /**
	 * Performs logout for current user
	 */
    void logout();
}
&lt;/code&gt;
&lt;code&gt;
public class AcegiUserContext implements UserContext, InitializingBean {
    private static final Log logger = LogFactory.getLog(AcegiUserDetails.class);

    private UserService userService;
    private SessionRegistry sessionRegistry;
    public User getUser() {
        SecurityContext context = SecurityContextHolder.getContext();
        if (context == null) return null;
        Authentication authentication = context.getAuthentication();
        if (authentication == null) return null;
        
        String username = authentication.getPrincipal().toString();

        if (authentication.getPrincipal() instanceof UserDetails) {
            username = ((UserDetails) authentication.getPrincipal()).getUsername();
        }

        return this.userService.findByUsername(username);
    }

    public void logout() {
        SecurityContext context = SecurityContextHolder.getContext();
        if (context == null) return;
        Authentication authentication = context.getAuthentication();
        if (authentication == null) return;
        String sessionId = SessionRegistryUtils.obtainSessionIdFromAuthentication(authentication);
        this.sessionRegistry.removeSessionInformation(sessionId);
    
    }

    public void afterPropertiesSet() throws Exception {
        if (this.userService == null) throw new FatalBeanException("Property [userService] of [" + getClass().getName() + "] is required.");
        if (this.sessionRegistry == null) throw new FatalBeanException("Property [sessionRegistry] of [" + getClass().getName() + "] is required.");
    }

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    public void setSessionRegistry(SessionRegistry sessionRegistry) {
        this.sessionRegistry = sessionRegistry;
    }
}
&lt;/code&gt;
Finally, you should  create bean definition for userContext bean:
&lt;code&gt;
&#60;bean id="userContext" class="net.cakesolutions.service.security.acegi.AcegiUserContext"&#62;
        &#60;property name="userService" ref="userService"/&#62;
        &#60;property name="sessionRegistry" ref="sessionRegistry" /&#62;
&#60;/bean&#62;
&lt;/code&gt;

SessionRegistry is the the reference to the implementation shown in the blog, and the userService is s standard service for use management.
        
     .

Hope this helps, let us know how are you getting on.</description>
		<content:encoded><![CDATA[<p>Yes, you should have your own <code>UserContext</code> implementation.<br />
Following implementation has only two methods, <code>User getUser()</code>, which gets the user currently logged in,  and <code>void logout()</code>, which destroys the session for user currently logged in.<br />
Here is the <code>UserContext</code> interface, and sample implementation:<br />
<code><br />
public interface UserContext {</p>
<p>	/**<br />
	 * Gets the current user<br />
	 * @return The User object identifying the user<br />
	 */<br />
	User getUser();</p>
<p>    /**<br />
	 * Performs logout for current user<br />
	 */<br />
    void logout();<br />
}<br />
</code><br />
<code><br />
public class AcegiUserContext implements UserContext, InitializingBean {<br />
    private static final Log logger = LogFactory.getLog(AcegiUserDetails.class);</p>
<p>    private UserService userService;<br />
    private SessionRegistry sessionRegistry;<br />
    public User getUser() {<br />
        SecurityContext context = SecurityContextHolder.getContext();<br />
        if (context == null) return null;<br />
        Authentication authentication = context.getAuthentication();<br />
        if (authentication == null) return null;</p>
<p>        String username = authentication.getPrincipal().toString();</p>
<p>        if (authentication.getPrincipal() instanceof UserDetails) {<br />
            username = ((UserDetails) authentication.getPrincipal()).getUsername();<br />
        }</p>
<p>        return this.userService.findByUsername(username);<br />
    }</p>
<p>    public void logout() {<br />
        SecurityContext context = SecurityContextHolder.getContext();<br />
        if (context == null) return;<br />
        Authentication authentication = context.getAuthentication();<br />
        if (authentication == null) return;<br />
        String sessionId = SessionRegistryUtils.obtainSessionIdFromAuthentication(authentication);<br />
        this.sessionRegistry.removeSessionInformation(sessionId);</p>
<p>    }</p>
<p>    public void afterPropertiesSet() throws Exception {<br />
        if (this.userService == null) throw new FatalBeanException("Property [userService] of [" + getClass().getName() + "] is required.&#8221;);<br />
        if (this.sessionRegistry == null) throw new FatalBeanException(&#8221;Property [sessionRegistry] of [" + getClass().getName() + "] is required.&#8221;);<br />
    }</p>
<p>    public void setUserService(UserService userService) {<br />
        this.userService = userService;<br />
    }</p>
<p>    public void setSessionRegistry(SessionRegistry sessionRegistry) {<br />
        this.sessionRegistry = sessionRegistry;<br />
    }<br />
}<br />
</code><br />
Finally, you should  create bean definition for userContext bean:<br />
<code><br />
&lt;bean id="userContext" class="net.cakesolutions.service.security.acegi.AcegiUserContext"&gt;<br />
        &lt;property name="userService" ref="userService"/&gt;<br />
        &lt;property name="sessionRegistry" ref="sessionRegistry" /&gt;<br />
&lt;/bean&gt;<br />
</code></p>
<p>SessionRegistry is the the reference to the implementation shown in the blog, and the userService is s standard service for use management.</p>
<p>     .</p>
<p>Hope this helps, let us know how are you getting on.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
