myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Korherr <jakob.korh...@gmail.com>
Subject Re: Need help getting started with GlassFish, MyFaces, and Trinidad
Date Tue, 19 Oct 2010 10:20:04 GMT
Hi Alan,

Great to here that the app is running now!

Those things you're encountering really seem like GlassFish (or
NetBeans) bugs to me.

Actually @Model really should work, because it is just a Stereotype
for @Named @RequestScoped. My guess here is that GlassFish does not
enable CDI correctly when running with MyFaces, because if you test
@Model in Tomcat using MyFaces-2 and Apache OpenWebBeans it works
fine!

Regards,
Jakob

2010/10/19 Alan <omegaobject@gmail.com>:
> On Mon, Oct 18, 2010 at 12:53 PM, Jakob Korherr <jakob.korherr@gmail.com>wrote:
>
>>
>> You need to have myfaces-api and myfaces-impl dependencies in your
>> project like this:
>>
>>
> OK, thanks to Jakob's hints I got MyFaces-2 running under GlassFish.  One
> thing that is essential (I am putting it here for reference) is the format
> of the sun-web.xml entry has to be:
>
>  <property name="useMyFaces" value="true"/>
>
> Also you have to set:
>
>    <class-loader delegate="false"/>
>
> I encountered something very disturbing when experimenting with this.  In
> many cases something actually over-writes the sun-web.xml file when I try to
> run the application.  It seems to happen somewhere in the deployment
> process.  I don't know if this is a bug in netbeans or the MyFaces servlet
> is doing something.  Has anyone else seen this?
>
> Another thing I discovered is that when using MyFaces, the CDI services no
> longer work for managed beans.  You have to use the
> @java.faces.bean.ManagedBean annotation. The @javax.enterprise.inject.Model
> annotation will not work.  This is sort of a show-stopper for me since I
> have a fair amount of code that uses CDI now and I read that the faces
> annotations may end up deprecated.  Is there any workaround on this or any
> word if this is going to be fixed?
>
> Thanks for all the help.
>
> Regards,
>
> A.
>



-- 
Jakob Korherr

blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at

Mime
View raw message