<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Depressed Programmer</title>
	<atom:link href="http://depressedprogrammer.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://depressedprogrammer.wordpress.com</link>
	<description>Because programming is depressing</description>
	<lastBuildDate>Tue, 24 Nov 2009 14:14:43 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Performing a LEFT OUTER JOIN using JPQL and JPA by Francisco</title>
		<link>http://depressedprogrammer.wordpress.com/2007/11/20/performing-a-left-outer-join-using-jpql-and-jpa/#comment-1049</link>
		<dc:creator>Francisco</dc:creator>
		<pubDate>Tue, 24 Nov 2009 14:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://arsenalist.com/2007/11/20/performing-a-left-outer-join-using-jpql-and-jpa/#comment-1049</guid>
		<description>Hello, nice article

But I&#039;ve some doubts...
I&#039;ve something like this;

    @ManyToMany
    @org.hibernate.annotations.MapKeyManyToMany(joinColumns = @JoinColumn(name = &quot;PROJECT_ID&quot;))
    @JoinTable(name = &quot;USER_PROJECT_ROLE&quot;, joinColumns = @JoinColumn(name = &quot;USER_ID&quot;), inverseJoinColumns = @JoinColumn(name = &quot;ROLE_ID&quot;))
    private Map projectAndRole = new HashMap();

How can I do an LEFT JOIN in this?

Thanks</description>
		<content:encoded><![CDATA[<p>Hello, nice article</p>
<p>But I&#8217;ve some doubts&#8230;<br />
I&#8217;ve something like this;</p>
<p>    @ManyToMany<br />
    @org.hibernate.annotations.MapKeyManyToMany(joinColumns = @JoinColumn(name = &#8220;PROJECT_ID&#8221;))<br />
    @JoinTable(name = &#8220;USER_PROJECT_ROLE&#8221;, joinColumns = @JoinColumn(name = &#8220;USER_ID&#8221;), inverseJoinColumns = @JoinColumn(name = &#8220;ROLE_ID&#8221;))<br />
    private Map projectAndRole = new HashMap();</p>
<p>How can I do an LEFT JOIN in this?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Integrating vBulletin with a WordPress theme by SoundJohn</title>
		<link>http://depressedprogrammer.wordpress.com/2009/07/06/integrating-vbulletin-with-a-wordpress-theme/#comment-1048</link>
		<dc:creator>SoundJohn</dc:creator>
		<pubDate>Sat, 21 Nov 2009 22:27:52 +0000</pubDate>
		<guid isPermaLink="false">http://depressedprogrammer.wordpress.com/?p=99#comment-1048</guid>
		<description>Hey! Thanx for this beautiful place of the Inet!!</description>
		<content:encoded><![CDATA[<p>Hey! Thanx for this beautiful place of the Inet!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Performing a LEFT OUTER JOIN using JPQL and JPA by Michel Ganguin</title>
		<link>http://depressedprogrammer.wordpress.com/2007/11/20/performing-a-left-outer-join-using-jpql-and-jpa/#comment-1045</link>
		<dc:creator>Michel Ganguin</dc:creator>
		<pubDate>Thu, 05 Nov 2009 23:29:15 +0000</pubDate>
		<guid isPermaLink="false">http://arsenalist.com/2007/11/20/performing-a-left-outer-join-using-jpql-and-jpa/#comment-1045</guid>
		<description>I meant:
SELECT * FROM nba_player p LEFT OUTER JOIN shoe_company s ON (p.shoecompany_id = s.id AND s.name &lt;&gt; ‘hiddencompany’)</description>
		<content:encoded><![CDATA[<p>I meant:<br />
SELECT * FROM nba_player p LEFT OUTER JOIN shoe_company s ON (p.shoecompany_id = s.id AND s.name &lt;&gt; ‘hiddencompany’)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Performing a LEFT OUTER JOIN using JPQL and JPA by Michel Ganguin</title>
		<link>http://depressedprogrammer.wordpress.com/2007/11/20/performing-a-left-outer-join-using-jpql-and-jpa/#comment-1044</link>
		<dc:creator>Michel Ganguin</dc:creator>
		<pubDate>Thu, 05 Nov 2009 23:27:04 +0000</pubDate>
		<guid isPermaLink="false">http://arsenalist.com/2007/11/20/performing-a-left-outer-join-using-jpql-and-jpa/#comment-1044</guid>
		<description>Is it possible to make more complex joins with jpql? lets say there can be a hidden company:

SELECT * FROM nba_player p LEFT OUTER JOIN shoe_company s ON (p.shoecompany_id = s.id AND s.name  &#039;hiddencompany&#039;)

but I still want to see all nba_player in the result, those with shoe_company &#039;hiddencompany&#039; set to null.

Is it possible to express this in jpql?</description>
		<content:encoded><![CDATA[<p>Is it possible to make more complex joins with jpql? lets say there can be a hidden company:</p>
<p>SELECT * FROM nba_player p LEFT OUTER JOIN shoe_company s ON (p.shoecompany_id = s.id AND s.name  &#8216;hiddencompany&#8217;)</p>
<p>but I still want to see all nba_player in the result, those with shoe_company &#8216;hiddencompany&#8217; set to null.</p>
<p>Is it possible to express this in jpql?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaRss.com hacked by the devil by Phan Đình Khải</title>
		<link>http://depressedprogrammer.wordpress.com/2007/04/12/javarsscom-hacked-by-the-devil/#comment-1043</link>
		<dc:creator>Phan Đình Khải</dc:creator>
		<pubDate>Sat, 31 Oct 2009 06:01:41 +0000</pubDate>
		<guid isPermaLink="false">http://arsenalist.com/2007/04/12/javarsscom-hacked-by-the-devil/#comment-1043</guid>
		<description>Hi Sir can you share for me this home ?: http://arsenalist.files.wordpress.com/2007/04/javarss-hacked.gif</description>
		<content:encoded><![CDATA[<p>Hi Sir can you share for me this home ?: <a href="http://arsenalist.files.wordpress.com/2007/04/javarss-hacked.gif" rel="nofollow">http://arsenalist.files.wordpress.com/2007/04/javarss-hacked.gif</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Integrating vBulletin with a WordPress theme by michael</title>
		<link>http://depressedprogrammer.wordpress.com/2009/07/06/integrating-vbulletin-with-a-wordpress-theme/#comment-1041</link>
		<dc:creator>michael</dc:creator>
		<pubDate>Tue, 06 Oct 2009 17:19:17 +0000</pubDate>
		<guid isPermaLink="false">http://depressedprogrammer.wordpress.com/?p=99#comment-1041</guid>
		<description>If you are having CSS conflicts you need to grab all the css properties for the header/footer and put something like #arras-vb at the start of each property. e.g.

#arras-vb td {

} 

then wrap the footer in a div


$wp_footer


it&#039;s rather time consuming and i&#039;m still having some problems getting it working but it does work eventually.</description>
		<content:encoded><![CDATA[<p>If you are having CSS conflicts you need to grab all the css properties for the header/footer and put something like #arras-vb at the start of each property. e.g.</p>
<p>#arras-vb td {</p>
<p>} </p>
<p>then wrap the footer in a div</p>
<p>$wp_footer</p>
<p>it&#8217;s rather time consuming and i&#8217;m still having some problems getting it working but it does work eventually.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Unit Testing Struts 2 Actions wired with Spring using JUnit by Arindam Ray</title>
		<link>http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/#comment-1040</link>
		<dc:creator>Arindam Ray</dc:creator>
		<pubDate>Tue, 06 Oct 2009 13:41:08 +0000</pubDate>
		<guid isPermaLink="false">http://arsenalist.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/#comment-1040</guid>
		<description>I have got the answer.

Complete BaseStrutsTestCase is like following:

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.ActionProxyFactory;
import junit.framework.TestCase;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.tiles.StrutsTilesListener;
import org.apache.struts2.views.JspSupportServlet;
import org.apache.tiles.impl.BasicTilesContainer;
import org.springframework.context.ApplicationContext;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockServletConfig;
import org.springframework.mock.web.MockServletContext;
import org.springframework.web.context.ContextLoader;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.ServletContextEvent;

/**
 * @author Arindam Ray
 */
@SuppressWarnings(&quot;unchecked&quot;)
public abstract class BaseStrutsTestCase extends TestCase {
	private static final String CONTEXT_CONFIG_LOCATION = &quot;/WEB-INF/applicationContext.xml,&quot; +
	&quot;/WEB-INF/dataAccessContext.xml&quot;;
	
	private static final String TILES_DEFINITIONS = &quot;/WEB-INF/tiles.xml&quot;;
	
	private static ApplicationContext applicationContext;
	private Dispatcher dispatcher;
	protected ActionProxy proxy;
	protected static MockServletContext servletContext;
	protected MockHttpServletRequest request;
	protected MockHttpServletResponse response;

	public BaseStrutsTestCase(String name) {
		super(name);
	}

	/**
	 * Created action class based on namespace and name
	 * @param clazz Class for which to create Action
	 * @param namespace Namespace of action
	 * @param name Action name
	 * @param parameters Request parameters
	 * @param session Session map
	 * @return Action class
	 * @throws Exception Catch-all exception
	 */
	protected Object createAction(Class clazz, String namespace, String name, Map parameters, Map session)
	throws Exception {

		// create a proxy class which is just a wrapper around the action call.
		// The proxy is created by checking the namespace and name against the
		// struts.xml configuration
		proxy = dispatcher.getContainer().getInstance(ActionProxyFactory.class).createActionProxy(namespace, name, null, true, false);

		ActionContext actionContext = proxy.getInvocation().getInvocationContext();
		
		if(parameters == null) {
			// by default, don&#039;t pass in any request parameters
			actionContext.setParameters(new HashMap());
		}
		else {
			//set the parameters
			actionContext.setParameters(parameters);
		}

		if(session == null) {
			actionContext.setSession(new HashMap());
		}
		else {
			//set the session
			actionContext.setSession(session);
		}

		// do not execute the result after executing the action
		proxy.setExecuteResult(true);

		// set the actions context to the one which the proxy is using
		ServletActionContext.setContext(actionContext);
		request = new MockHttpServletRequest();
		response = new MockHttpServletResponse();
		ServletActionContext.setRequest(request);
		ServletActionContext.setResponse(response);
		ServletActionContext.setServletContext(servletContext);
		return proxy.getAction();
	}

	protected void setUp() throws Exception {
		if( applicationContext == null ) {
			// this is the first time so initialize Spring context
			servletContext = new MockServletContext();
			servletContext.addInitParameter(ContextLoader.CONFIG_LOCATION_PARAM, CONTEXT_CONFIG_LOCATION);
			applicationContext = (new ContextLoader()).initWebApplicationContext(servletContext);

			// Struts JSP support servlet (for Freemarker)
			new JspSupportServlet().init(new MockServletConfig(servletContext));
			
			//for tiles
			servletContext.addInitParameter(BasicTilesContainer.DEFINITIONS_CONFIG, TILES_DEFINITIONS);
			final StrutsTilesListener tilesListener = new StrutsTilesListener();
			final ServletContextEvent event = new ServletContextEvent(servletContext);
			tilesListener.contextInitialized(event);
		}
		// Dispatcher is the guy that actually handles all requests.  Pass in
		// an empty. Map as the parameters but if you want to change stuff like
		// what config files to read, you need to specify them here.  Here&#039;s how to
		// scan packages for actions (thanks to Hardy Ferentschik - Comment 66)
		// (see Dispatcher&#039;s source code)
		HashMap params = new HashMap();
		params.put(&quot;actionPackages&quot;, &quot;gc.action&quot;);
		dispatcher = new Dispatcher(servletContext, params);
		dispatcher.init();
		Dispatcher.setInstance(dispatcher);
	}
}</description>
		<content:encoded><![CDATA[<p>I have got the answer.</p>
<p>Complete BaseStrutsTestCase is like following:</p>
<p>import com.opensymphony.xwork2.ActionContext;<br />
import com.opensymphony.xwork2.ActionProxy;<br />
import com.opensymphony.xwork2.ActionProxyFactory;<br />
import junit.framework.TestCase;<br />
import org.apache.struts2.ServletActionContext;<br />
import org.apache.struts2.dispatcher.Dispatcher;<br />
import org.apache.struts2.tiles.StrutsTilesListener;<br />
import org.apache.struts2.views.JspSupportServlet;<br />
import org.apache.tiles.impl.BasicTilesContainer;<br />
import org.springframework.context.ApplicationContext;<br />
import org.springframework.mock.web.MockHttpServletRequest;<br />
import org.springframework.mock.web.MockHttpServletResponse;<br />
import org.springframework.mock.web.MockServletConfig;<br />
import org.springframework.mock.web.MockServletContext;<br />
import org.springframework.web.context.ContextLoader;</p>
<p>import java.util.HashMap;<br />
import java.util.Map;</p>
<p>import javax.servlet.ServletContextEvent;</p>
<p>/**<br />
 * @author Arindam Ray<br />
 */<br />
@SuppressWarnings(&#8220;unchecked&#8221;)<br />
public abstract class BaseStrutsTestCase extends TestCase {<br />
	private static final String CONTEXT_CONFIG_LOCATION = &#8220;/WEB-INF/applicationContext.xml,&#8221; +<br />
	&#8220;/WEB-INF/dataAccessContext.xml&#8221;;</p>
<p>	private static final String TILES_DEFINITIONS = &#8220;/WEB-INF/tiles.xml&#8221;;</p>
<p>	private static ApplicationContext applicationContext;<br />
	private Dispatcher dispatcher;<br />
	protected ActionProxy proxy;<br />
	protected static MockServletContext servletContext;<br />
	protected MockHttpServletRequest request;<br />
	protected MockHttpServletResponse response;</p>
<p>	public BaseStrutsTestCase(String name) {<br />
		super(name);<br />
	}</p>
<p>	/**<br />
	 * Created action class based on namespace and name<br />
	 * @param clazz Class for which to create Action<br />
	 * @param namespace Namespace of action<br />
	 * @param name Action name<br />
	 * @param parameters Request parameters<br />
	 * @param session Session map<br />
	 * @return Action class<br />
	 * @throws Exception Catch-all exception<br />
	 */<br />
	protected Object createAction(Class clazz, String namespace, String name, Map parameters, Map session)<br />
	throws Exception {</p>
<p>		// create a proxy class which is just a wrapper around the action call.<br />
		// The proxy is created by checking the namespace and name against the<br />
		// struts.xml configuration<br />
		proxy = dispatcher.getContainer().getInstance(ActionProxyFactory.class).createActionProxy(namespace, name, null, true, false);</p>
<p>		ActionContext actionContext = proxy.getInvocation().getInvocationContext();</p>
<p>		if(parameters == null) {<br />
			// by default, don&#8217;t pass in any request parameters<br />
			actionContext.setParameters(new HashMap());<br />
		}<br />
		else {<br />
			//set the parameters<br />
			actionContext.setParameters(parameters);<br />
		}</p>
<p>		if(session == null) {<br />
			actionContext.setSession(new HashMap());<br />
		}<br />
		else {<br />
			//set the session<br />
			actionContext.setSession(session);<br />
		}</p>
<p>		// do not execute the result after executing the action<br />
		proxy.setExecuteResult(true);</p>
<p>		// set the actions context to the one which the proxy is using<br />
		ServletActionContext.setContext(actionContext);<br />
		request = new MockHttpServletRequest();<br />
		response = new MockHttpServletResponse();<br />
		ServletActionContext.setRequest(request);<br />
		ServletActionContext.setResponse(response);<br />
		ServletActionContext.setServletContext(servletContext);<br />
		return proxy.getAction();<br />
	}</p>
<p>	protected void setUp() throws Exception {<br />
		if( applicationContext == null ) {<br />
			// this is the first time so initialize Spring context<br />
			servletContext = new MockServletContext();<br />
			servletContext.addInitParameter(ContextLoader.CONFIG_LOCATION_PARAM, CONTEXT_CONFIG_LOCATION);<br />
			applicationContext = (new ContextLoader()).initWebApplicationContext(servletContext);</p>
<p>			// Struts JSP support servlet (for Freemarker)<br />
			new JspSupportServlet().init(new MockServletConfig(servletContext));</p>
<p>			//for tiles<br />
			servletContext.addInitParameter(BasicTilesContainer.DEFINITIONS_CONFIG, TILES_DEFINITIONS);<br />
			final StrutsTilesListener tilesListener = new StrutsTilesListener();<br />
			final ServletContextEvent event = new ServletContextEvent(servletContext);<br />
			tilesListener.contextInitialized(event);<br />
		}<br />
		// Dispatcher is the guy that actually handles all requests.  Pass in<br />
		// an empty. Map as the parameters but if you want to change stuff like<br />
		// what config files to read, you need to specify them here.  Here&#8217;s how to<br />
		// scan packages for actions (thanks to Hardy Ferentschik &#8211; Comment 66)<br />
		// (see Dispatcher&#8217;s source code)<br />
		HashMap params = new HashMap();<br />
		params.put(&#8220;actionPackages&#8221;, &#8220;gc.action&#8221;);<br />
		dispatcher = new Dispatcher(servletContext, params);<br />
		dispatcher.init();<br />
		Dispatcher.setInstance(dispatcher);<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Unit Testing Struts 2 Actions wired with Spring using JUnit by Arindam Ray</title>
		<link>http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/#comment-1039</link>
		<dc:creator>Arindam Ray</dc:creator>
		<pubDate>Tue, 06 Oct 2009 13:38:36 +0000</pubDate>
		<guid isPermaLink="false">http://arsenalist.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/#comment-1039</guid>
		<description>use like this:

private static final String CONFIG_LOCATIONS =
“/WEB-INF/web.xml,”+ “/hibernate.cfg.xml,” + “/aplicationContext-dao.xml,” + “/applicationContext-resources.xml,” + “/applicationContext-service.xml,” + “/applicationContext-struts.xml”;</description>
		<content:encoded><![CDATA[<p>use like this:</p>
<p>private static final String CONFIG_LOCATIONS =<br />
“/WEB-INF/web.xml,”+ “/hibernate.cfg.xml,” + “/aplicationContext-dao.xml,” + “/applicationContext-resources.xml,” + “/applicationContext-service.xml,” + “/applicationContext-struts.xml”;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Unit Testing Struts 2 Actions wired with Spring using JUnit by Arindam Ray</title>
		<link>http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/#comment-1038</link>
		<dc:creator>Arindam Ray</dc:creator>
		<pubDate>Tue, 06 Oct 2009 10:24:46 +0000</pubDate>
		<guid isPermaLink="false">http://arsenalist.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/#comment-1038</guid>
		<description>can you pls tell me what to do when action returns a tiles type result??</description>
		<content:encoded><![CDATA[<p>can you pls tell me what to do when action returns a tiles type result??</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Unit Testing Struts 2 Actions wired with Spring using JUnit by Arindam Ray</title>
		<link>http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/#comment-1037</link>
		<dc:creator>Arindam Ray</dc:creator>
		<pubDate>Tue, 06 Oct 2009 10:21:50 +0000</pubDate>
		<guid isPermaLink="false">http://arsenalist.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/#comment-1037</guid>
		<description>I am also having the same problem...Can anyone pls help me?...</description>
		<content:encoded><![CDATA[<p>I am also having the same problem&#8230;Can anyone pls help me?&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
