Hi John,

thank you for your reply. I'm not sure if I need a provider because when I read 
the documentation of Deltaspike under 
https://deltaspike.apache.org/documentation/projectstage.html
it says that the ConfigResover searches for a String -> 
"-Dorg.apache.deltaspike.ProjectStage=Development"

Since the ConfigResolver works with JNDI, Propertiefiles, JVM Arguments etc. I 
assumed, that with the correct JNDI Configuration in glassfish, it should work 
with no further producers etc.

br
Thomas


-----Ursprüngliche Nachricht-----
Von: John D. Ament [mailto:[email protected]] 
Gesendet: Dienstag, 04. Oktober 2016 16:37
An: [email protected]
Betreff: Re: Projectstage -> JNDI - Third Try

Hi Thomas,

I'm not too familiar with this type of usage.  However, ProjectStage is a 
concrete type in DeltaSpike, not a string.  That might be part of it.  You may 
also need to provide a producer method.

John

On Tue, Oct 4, 2016 at 6:59 AM Thomas Kernstock < 
[email protected]> wrote:

> Sorry guys,
>
> I don't want to bug you but its seems that all images and attachments 
> are removed from my mails.
>
> I would like to configure the Deltaspike ProjectStage via JNDI as 
> Custom resource on Payara 4.1 but it doesn't get picked up. I tried 
> two different
> configurations:
>
> 1) <custom-resource
> factory-class="org.glassfish.resources.custom.factory.PrimitivesAndStringFactory"
> res-type="java.lang.String" jndi-name="deltaspike/ProjectStage">
>               <property name="value" value="Development"></property>
>     </custom-resource>
>
> 2) In combination with an entry in Web.xml - similar to the 
> configuration for the jsf/ProjectStage:
>
>     <custom-resource
> factory-class="org.glassfish.resources.custom.factory.PrimitivesAndStringFactory"
> res-type="java.lang.String" jndi-name="org.apache.deltaspike.ProjectStage">
>       <property name="value" value="UnitTest"></property>
>     </custom-resource>
>
>
> <resource-ref>
>     <res-ref-name>deltaspike/ProjectStage</res-ref-name>
>     <res-type>java.lang.String</res-type>
>     <mapped-name>org.apache.deltaspike.ProjectStage</mapped-name>
> </resource-ref>
>
>
> To make sure my environment and my tests work, I also tried to set the 
> stage with a JVM Parameter. This works.
>
> Also setting the JSF ProjectStage works fine in Payara
>
>    <custom-resource
> factory-class="com.sun.faces.application.ProjectStageJndiFactory"
> res-type="java.lang.String" jndi-name="javax.faces.PROJECT_STAGE">
>       <property name="stage" value="Development"></property>
>     </custom-resource>
>
> in combination with Web.xml
>
> <resource-ref>
>     <res-ref-name>jsf/ProjectStage</res-ref-name>
>     <res-type>java.lang.String</res-type>
>     <mapped-name>javax.faces.PROJECT_STAGE</mapped-name>
> </resource-ref>
>
>
>
> So the question is what is wrong with my Deltaspike configuration. Any 
> ideas?
>
> best regards
> Thomas
>
>

Reply via email to