<?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: Getting Started with JSF 2.0 and CDI in JEE 6 part 1</title>
	<atom:link href="http://www.andygibson.net/blog/2009/12/16/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/</link>
	<description>Open Source Projects &#38; Technical Writings</description>
	<lastBuildDate>Wed, 18 Jan 2012 00:05:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andrea</title>
		<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/comment-page-1/#comment-15710</link>
		<dc:creator>Andrea</dc:creator>
		<pubDate>Mon, 08 Nov 2010 21:52:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.andygibson.net/blog/?p=647#comment-15710</guid>
		<description>I tried to make the example webapp, with a difference: the war is contained in an EAR. In this case I can&#039;t deploy, due to java.lang.ClassNotFoundException: WEB-INF.classes.eedemo.DefaultItemDao.
Does anyone have any suggestion to make this simple example working? In my app, I want an EAR containing some WAR and some EJB_JARs packages.
Thank you. Andrea</description>
		<content:encoded><![CDATA[<p>I tried to make the example webapp, with a difference: the war is contained in an EAR. In this case I can&#8217;t deploy, due to java.lang.ClassNotFoundException: WEB-INF.classes.eedemo.DefaultItemDao.<br />
Does anyone have any suggestion to make this simple example working? In my app, I want an EAR containing some WAR and some EJB_JARs packages.<br />
Thank you. Andrea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/comment-page-1/#comment-14708</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Wed, 01 Sep 2010 06:59:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.andygibson.net/blog/?p=647#comment-14708</guid>
		<description>Thank you Andy, that&#039;s it. And your completely right! I used a test input post to pass values from one page to the other. Thanks again.</description>
		<content:encoded><![CDATA[<p>Thank you Andy, that&#8217;s it. And your completely right! I used a test input post to pass values from one page to the other. Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Gibson</title>
		<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/comment-page-1/#comment-14707</link>
		<dc:creator>Andy Gibson</dc:creator>
		<pubDate>Tue, 31 Aug 2010 18:09:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.andygibson.net/blog/?p=647#comment-14707</guid>
		<description>Hi Chris, 

Add javax.enterprise.context.@RequestScoped to the bean to give it scope. Currently the bean is without a scope (my bad). If it uses the default (no) scope then a new bean is created for each call. One is created for the setter and another for the getter. Adding request scoped means the same one will be used for the life of the request. I&#039;m guessing you have an input box or something on the page to set the value on postback?

Cheers,

Andy Gibson</description>
		<content:encoded><![CDATA[<p>Hi Chris, </p>
<p>Add javax.enterprise.context.@RequestScoped to the bean to give it scope. Currently the bean is without a scope (my bad). If it uses the default (no) scope then a new bean is created for each call. One is created for the setter and another for the getter. Adding request scoped means the same one will be used for the life of the request. I&#8217;m guessing you have an input box or something on the page to set the value on postback?</p>
<p>Cheers,</p>
<p>Andy Gibson</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/comment-page-1/#comment-14706</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Tue, 31 Aug 2010 06:31:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.andygibson.net/blog/?p=647#comment-14706</guid>
		<description>Hello Andy, thanks a lot! I tried this with JBoss 6.0 and it worked.
Just one thing: Upgrading to an EJB:

I was not able to store form data in a stateful session bean. Do I have to create a local/remote interface? 
I annotated the MessageServerBean with @stateful, created a String attribute, getter, setter.
The result was, that the setter was called with the right string, but the getter always returned null. Hence new new object was created each time the page was reloaded. Can you help me please ? Thanks Chris</description>
		<content:encoded><![CDATA[<p>Hello Andy, thanks a lot! I tried this with JBoss 6.0 and it worked.<br />
Just one thing: Upgrading to an EJB:</p>
<p>I was not able to store form data in a stateful session bean. Do I have to create a local/remote interface?<br />
I annotated the MessageServerBean with @stateful, created a String attribute, getter, setter.<br />
The result was, that the setter was called with the right string, but the getter always returned null. Hence new new object was created each time the page was reloaded. Can you help me please ? Thanks Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Gibson</title>
		<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/comment-page-1/#comment-14705</link>
		<dc:creator>Andy Gibson</dc:creator>
		<pubDate>Mon, 30 Aug 2010 15:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.andygibson.net/blog/?p=647#comment-14705</guid>
		<description>Diego, probably not because they come from different places. Hibernate needs to construct entities and CDI constructs beans for injection. If you did this, it would just inject a new instance of the entity. How would you load an entity with a specific ID? (CDI wouldn&#039;t know how).

See my latest blog post (http://www.andygibson.net/blog/tutorial/pattern-for-conversational-crud-in-java-ee-6/) on how to handle entities.

Cheers,

Andy Gibson</description>
		<content:encoded><![CDATA[<p>Diego, probably not because they come from different places. Hibernate needs to construct entities and CDI constructs beans for injection. If you did this, it would just inject a new instance of the entity. How would you load an entity with a specific ID? (CDI wouldn&#8217;t know how).</p>
<p>See my latest blog post (<a href="http://www.andygibson.net/blog/tutorial/pattern-for-conversational-crud-in-java-ee-6/" rel="nofollow">http://www.andygibson.net/blog/tutorial/pattern-for-conversational-crud-in-java-ee-6/</a>) on how to handle entities.</p>
<p>Cheers,</p>
<p>Andy Gibson</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diego</title>
		<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/comment-page-1/#comment-14703</link>
		<dc:creator>Diego</dc:creator>
		<pubDate>Mon, 30 Aug 2010 00:27:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.andygibson.net/blog/?p=647#comment-14703</guid>
		<description>Good night Andy.

It is possible to perform the injection of persistent classes?

Example:

@ Entity
public class ClientBean implements Serializable {
 / / Attributes
}

@ Named
@ SessionScoped
public class ClientController implements Serializable {

    @ Inject
    private ClientBean clientBean;

}</description>
		<content:encoded><![CDATA[<p>Good night Andy.</p>
<p>It is possible to perform the injection of persistent classes?</p>
<p>Example:</p>
<p>@ Entity<br />
public class ClientBean implements Serializable {<br />
 / / Attributes<br />
}</p>
<p>@ Named<br />
@ SessionScoped<br />
public class ClientController implements Serializable {</p>
<p>    @ Inject<br />
    private ClientBean clientBean;</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Vincent</title>
		<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/comment-page-1/#comment-14425</link>
		<dc:creator>Paul Vincent</dc:creator>
		<pubDate>Sun, 14 Mar 2010 19:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.andygibson.net/blog/?p=647#comment-14425</guid>
		<description>Thank&#039;s Andy Gibson, for this preview of two of the best players actually : Seam, an evolution of JEE, transformed in the JSR-299, and Facelets, now the default view of JSF2.0.  
Thank you very much, Seam (Gavin)</description>
		<content:encoded><![CDATA[<p>Thank&#8217;s Andy Gibson, for this preview of two of the best players actually : Seam, an evolution of JEE, transformed in the JSR-299, and Facelets, now the default view of JSF2.0.<br />
Thank you very much, Seam (Gavin)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Gibson</title>
		<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/comment-page-1/#comment-14363</link>
		<dc:creator>Andy Gibson</dc:creator>
		<pubDate>Mon, 08 Feb 2010 06:38:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.andygibson.net/blog/?p=647#comment-14363</guid>
		<description>Apologies Daniel, I thought I had replied to your comment. 

If it is the thing I think you are seeing, I believe this is an NPE on redeploy where it cannot restore the session state so the session data prior to the redeploy is lost. While this might be an error, its not one I care about to much since the redeploy works just fine, just the session information is lost which I can live with for the things I do with it.  In short the answer is, no I don&#039;t have a work around, it seems to be fixed though, but even if it isn&#039;t in your current version, don&#039;t worry about it unless having a reset session state on redeploy is a big deal.

Cheers,

Andy</description>
		<content:encoded><![CDATA[<p>Apologies Daniel, I thought I had replied to your comment. </p>
<p>If it is the thing I think you are seeing, I believe this is an NPE on redeploy where it cannot restore the session state so the session data prior to the redeploy is lost. While this might be an error, its not one I care about to much since the redeploy works just fine, just the session information is lost which I can live with for the things I do with it.  In short the answer is, no I don&#8217;t have a work around, it seems to be fixed though, but even if it isn&#8217;t in your current version, don&#8217;t worry about it unless having a reset session state on redeploy is a big deal.</p>
<p>Cheers,</p>
<p>Andy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/comment-page-1/#comment-14341</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sun, 24 Jan 2010 06:01:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.andygibson.net/blog/?p=647#comment-14341</guid>
		<description>How were you able to work around the problem one of your other readers submitted here: https://jira.jboss.org/jira/browse/WELD-350 (NPE on redeploy).

There is a comment 13/1 to say that it is fixed in trunk. Did you need to patch your GlassFish installation?

I have tried starting GlassFish with a different weld-osgi-bundle I found here:
http://oss.sonatype.org/content/groups/jboss/org/jboss/weld/weld-osgi-bundle/1.0.1-SNAPSHOT/</description>
		<content:encoded><![CDATA[<p>How were you able to work around the problem one of your other readers submitted here: <a href="https://jira.jboss.org/jira/browse/WELD-350" rel="nofollow">https://jira.jboss.org/jira/browse/WELD-350</a> (NPE on redeploy).</p>
<p>There is a comment 13/1 to say that it is fixed in trunk. Did you need to patch your GlassFish installation?</p>
<p>I have tried starting GlassFish with a different weld-osgi-bundle I found here:<br />
<a href="http://oss.sonatype.org/content/groups/jboss/org/jboss/weld/weld-osgi-bundle/1.0.1-SNAPSHOT/" rel="nofollow">http://oss.sonatype.org/content/groups/jboss/org/jboss/weld/weld-osgi-bundle/1.0.1-SNAPSHOT/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GlassFish v3 Resources and Links &#8211; Part 2 &#124; Developer @ UniUrs</title>
		<link>http://www.andygibson.net/blog/tutorial/getting-started-with-jsf-2-0-and-cdi-in-jee-6-part-1/comment-page-1/#comment-14337</link>
		<dc:creator>GlassFish v3 Resources and Links &#8211; Part 2 &#124; Developer @ UniUrs</dc:creator>
		<pubDate>Sat, 16 Jan 2010 01:09:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.andygibson.net/blog/?p=647#comment-14337</guid>
		<description>[...] Getting Started with JSF 2.0 and CDI in JEE 6 part 1 [...]</description>
		<content:encoded><![CDATA[<p>[...] Getting Started with JSF 2.0 and CDI in JEE 6 part 1 [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

