You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Mark Struberg <st...@yahoo.de> on 2011/10/10 16:51:46 UTC
Fw: How to specify ProjectStage with CODI
oops, should have gone to the myfaces-dev list^^
LieGrue,
strub
----- Forwarded Message -----
> From: Mark Struberg <st...@yahoo.de>
> To: Ben Utzer <ro...@googlemail.com>
> Cc:
> Sent: Monday, October 10, 2011 4:51 PM
> Subject: Re: How to specify ProjectStage with CODI
>
> CODI does _not_ parse the web.xml context.xml!
>
> The reason is that web.xml magic only works in web containers and make no sense
> in unit tests nor does it provide sufficient flexibility for using it in a real
> world project.
>
> If you write config which might change from installation to installation (some
> JDBC connection settings, the ProjectStage, etc) into your web.xml, then you
> would need to re-package your WAR for each and every server. I don't think
> this is practicable!.
>
> So rather do it via JNDI or java property.
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
>> From: Ben Utzer <ro...@googlemail.com>
>> To: MyFaces Discussion <us...@myfaces.apache.org>; Mark Struberg
> <st...@yahoo.de>
>> Cc:
>> Sent: Monday, October 10, 2011 3:54 PM
>> Subject: Re: How to specify ProjectStage with CODI
>>
>> Hi and thanks for your suggestion. And what's the best way to do it
>> outside of a JSF application?
>>
>> Also when I try with JSF and specify
>> javax.faces.ProjectStage=Development as context-param CODI complains
>> about different ProjectStages as CODI resolves the ProjectStage to
>> Production.
>>
>> Ben
>>
>> 2011/10/10 Mark Struberg <st...@yahoo.de>:
>>> or you could also just set
>>>
>>> -Dfaces.PROJECT_STAGE=SystemTest
>>>
>>>
>>> on the Java commandline.
>>>
>>> Another way is to set it via JNDI:
>>>
>>> in ${catalina.base}/conf/context.xml
>>> just add the follwing lines
>>>
>>> <Environment name="jsf/ProjectStage"
>> value="SystemTest"
>>> type="java.lang.String"
> override="false"/>
>>>
>>> LieGrue,
>>> strub
>>>
>>>
>>> ----- Original Message -----
>>>> From: Michael Kurz <mi...@gmx.at>
>>>> To: MyFaces Discussion <us...@myfaces.apache.org>
>>>> Cc:
>>>> Sent: Monday, October 10, 2011 2:42 PM
>>>> Subject: Re: How to specify ProjectStage with CODI
>>>>
>>>> Hi,
>>>>
>>>> the JSF 2 project stage is set via a context parameter in the
> web.xml:
>>>>
>>>> <context-param>
>>>> <param-name>javax.faces.PROJECT_STAGE</param-name>
>>>> <param-value>Production</param-value>
>>>> </context-param>
>>>>
>>>> Best regards
>>>> Michael
>>>>
>>>>
>>>> Am 10.10.2011 um 13:19 schrieb Chris Eggers:
>>>>
>>>>> Hi guys,
>>>>>
>>>>> I'm trying to tell my application that it is currently in
>>>>> ProjectStage.Development.
>>>>> No luck, though. Can somebody help, please?
>>>>>
>>>>> Ben
>>>>
>>>
>>
>>
>>
>> --
>> o
>> L_
>> OL
>>
>
Re: Fw: How to specify ProjectStage with CODI
Posted by Gerhard Petracek <ge...@gmail.com>.
hi ben,
the web.xml isn't supported by default. that's mentioned in the wiki [1] (+
the reason why we don't support such configuration sources for the
project-stage).
mark mentioned some of the supported possibilities.
however, it's a pluggable mechanism -> you can extend it and us any custom
config format/source.
regards,
gerhard
[1]
https://cwiki.apache.org/confluence/display/EXTCDI/Core+Usage#CoreUsage-Activation
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
2011/10/10 Mark Struberg <st...@yahoo.de>
> oops, should have gone to the myfaces-dev list^^
>
> LieGrue,
> strub
>
>
>
> ----- Forwarded Message -----
> > From: Mark Struberg <st...@yahoo.de>
> > To: Ben Utzer <ro...@googlemail.com>
> > Cc:
> > Sent: Monday, October 10, 2011 4:51 PM
> > Subject: Re: How to specify ProjectStage with CODI
> >
> > CODI does _not_ parse the web.xml context.xml!
> >
> > The reason is that web.xml magic only works in web containers and make no
> sense
> > in unit tests nor does it provide sufficient flexibility for using it in
> a real
> > world project.
> >
> > If you write config which might change from installation to installation
> (some
> > JDBC connection settings, the ProjectStage, etc) into your web.xml, then
> you
> > would need to re-package your WAR for each and every server. I don't
> think
> > this is practicable!.
> >
> > So rather do it via JNDI or java property.
> >
> > LieGrue,
> > strub
> >
> >
> >
> > ----- Original Message -----
> >> From: Ben Utzer <ro...@googlemail.com>
> >> To: MyFaces Discussion <us...@myfaces.apache.org>; Mark Struberg
> > <st...@yahoo.de>
> >> Cc:
> >> Sent: Monday, October 10, 2011 3:54 PM
> >> Subject: Re: How to specify ProjectStage with CODI
> >>
> >> Hi and thanks for your suggestion. And what's the best way to do it
> >> outside of a JSF application?
> >>
> >> Also when I try with JSF and specify
> >> javax.faces.ProjectStage=Development as context-param CODI complains
> >> about different ProjectStages as CODI resolves the ProjectStage to
> >> Production.
> >>
> >> Ben
> >>
> >> 2011/10/10 Mark Struberg <st...@yahoo.de>:
> >>> or you could also just set
> >>>
> >>> -Dfaces.PROJECT_STAGE=SystemTest
> >>>
> >>>
> >>> on the Java commandline.
> >>>
> >>> Another way is to set it via JNDI:
> >>>
> >>> in ${catalina.base}/conf/context.xml
> >>> just add the follwing lines
> >>>
> >>> <Environment name="jsf/ProjectStage"
> >> value="SystemTest"
> >>> type="java.lang.String"
> > override="false"/>
> >>>
> >>> LieGrue,
> >>> strub
> >>>
> >>>
> >>> ----- Original Message -----
> >>>> From: Michael Kurz <mi...@gmx.at>
> >>>> To: MyFaces Discussion <us...@myfaces.apache.org>
> >>>> Cc:
> >>>> Sent: Monday, October 10, 2011 2:42 PM
> >>>> Subject: Re: How to specify ProjectStage with CODI
> >>>>
> >>>> Hi,
> >>>>
> >>>> the JSF 2 project stage is set via a context parameter in the
> > web.xml:
> >>>>
> >>>> <context-param>
> >>>> <param-name>javax.faces.PROJECT_STAGE</param-name>
> >>>> <param-value>Production</param-value>
> >>>> </context-param>
> >>>>
> >>>> Best regards
> >>>> Michael
> >>>>
> >>>>
> >>>> Am 10.10.2011 um 13:19 schrieb Chris Eggers:
> >>>>
> >>>>> Hi guys,
> >>>>>
> >>>>> I'm trying to tell my application that it is currently in
> >>>>> ProjectStage.Development.
> >>>>> No luck, though. Can somebody help, please?
> >>>>>
> >>>>> Ben
> >>>>
> >>>
> >>
> >>
> >>
> >> --
> >> o
> >> L_
> >> OL
> >>
> >
>
Re: Fw: How to specify ProjectStage with CODI
Posted by Gerhard Petracek <ge...@gmail.com>.
hi ben,
the web.xml isn't supported by default. that's mentioned in the wiki [1] (+
the reason why we don't support such configuration sources for the
project-stage).
mark mentioned some of the supported possibilities.
however, it's a pluggable mechanism -> you can extend it and us any custom
config format/source.
regards,
gerhard
[1]
https://cwiki.apache.org/confluence/display/EXTCDI/Core+Usage#CoreUsage-Activation
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
2011/10/10 Mark Struberg <st...@yahoo.de>
> oops, should have gone to the myfaces-dev list^^
>
> LieGrue,
> strub
>
>
>
> ----- Forwarded Message -----
> > From: Mark Struberg <st...@yahoo.de>
> > To: Ben Utzer <ro...@googlemail.com>
> > Cc:
> > Sent: Monday, October 10, 2011 4:51 PM
> > Subject: Re: How to specify ProjectStage with CODI
> >
> > CODI does _not_ parse the web.xml context.xml!
> >
> > The reason is that web.xml magic only works in web containers and make no
> sense
> > in unit tests nor does it provide sufficient flexibility for using it in
> a real
> > world project.
> >
> > If you write config which might change from installation to installation
> (some
> > JDBC connection settings, the ProjectStage, etc) into your web.xml, then
> you
> > would need to re-package your WAR for each and every server. I don't
> think
> > this is practicable!.
> >
> > So rather do it via JNDI or java property.
> >
> > LieGrue,
> > strub
> >
> >
> >
> > ----- Original Message -----
> >> From: Ben Utzer <ro...@googlemail.com>
> >> To: MyFaces Discussion <us...@myfaces.apache.org>; Mark Struberg
> > <st...@yahoo.de>
> >> Cc:
> >> Sent: Monday, October 10, 2011 3:54 PM
> >> Subject: Re: How to specify ProjectStage with CODI
> >>
> >> Hi and thanks for your suggestion. And what's the best way to do it
> >> outside of a JSF application?
> >>
> >> Also when I try with JSF and specify
> >> javax.faces.ProjectStage=Development as context-param CODI complains
> >> about different ProjectStages as CODI resolves the ProjectStage to
> >> Production.
> >>
> >> Ben
> >>
> >> 2011/10/10 Mark Struberg <st...@yahoo.de>:
> >>> or you could also just set
> >>>
> >>> -Dfaces.PROJECT_STAGE=SystemTest
> >>>
> >>>
> >>> on the Java commandline.
> >>>
> >>> Another way is to set it via JNDI:
> >>>
> >>> in ${catalina.base}/conf/context.xml
> >>> just add the follwing lines
> >>>
> >>> <Environment name="jsf/ProjectStage"
> >> value="SystemTest"
> >>> type="java.lang.String"
> > override="false"/>
> >>>
> >>> LieGrue,
> >>> strub
> >>>
> >>>
> >>> ----- Original Message -----
> >>>> From: Michael Kurz <mi...@gmx.at>
> >>>> To: MyFaces Discussion <us...@myfaces.apache.org>
> >>>> Cc:
> >>>> Sent: Monday, October 10, 2011 2:42 PM
> >>>> Subject: Re: How to specify ProjectStage with CODI
> >>>>
> >>>> Hi,
> >>>>
> >>>> the JSF 2 project stage is set via a context parameter in the
> > web.xml:
> >>>>
> >>>> <context-param>
> >>>> <param-name>javax.faces.PROJECT_STAGE</param-name>
> >>>> <param-value>Production</param-value>
> >>>> </context-param>
> >>>>
> >>>> Best regards
> >>>> Michael
> >>>>
> >>>>
> >>>> Am 10.10.2011 um 13:19 schrieb Chris Eggers:
> >>>>
> >>>>> Hi guys,
> >>>>>
> >>>>> I'm trying to tell my application that it is currently in
> >>>>> ProjectStage.Development.
> >>>>> No luck, though. Can somebody help, please?
> >>>>>
> >>>>> Ben
> >>>>
> >>>
> >>
> >>
> >>
> >> --
> >> o
> >> L_
> >> OL
> >>
> >
>